This is a deprecated version of the SnowConvert documentation, please visit the official site HERE.
Severity
Medium
Description
A database link connection reference was removed from the object name because the database links and its references are not supported in Snowflake. The only part that is kept is the name before the @ character.
Example Code
Input Code:
-- Creation of the database linkCREATEDATABASELINK mylinkCONNECTTO user1 IDENTIFIED BY password1USING'connection_str';-- Statements that use the database link we createdSELECT*FROM employees@mylink;INSERT INTO employees@mylink (employee_id, last_name, email, hire_date, job_id)VALUES (999, 'Claus', 'sclaus@oracle.com', SYSDATE, 'SH_CLERK');UPDATE employees@mylink SET min_salary =3000WHERE job_id ='SH_CLERK';DELETEFROM employees@mylinkWHERE employee_id =999;
Output Code:
-- ** MSC-WARNING - MSCEWI3073 - CREATE DATABASE LINK NOT SUPPORTED [ DBLINK: mylink | USER: user1/password1 | CONNECTION: 'connection_str' ] **---- Creation of the database link--CREATE DATABASE LINK mylink-- CONNECT TO user1 IDENTIFIED BY password1-- USING 'connection_str'-- Statements that use the database link we createdSELECT*FROM--** MSC-ERROR - MSCEWI3123 - DBLINK CONNECTIONS NOT SUPPORTED [ DBLINK : mylink | USER: user1/password1 | CONNECTION: 'connection_str' ] ** DATAWAREHOUSE.PUBLIC.employees;INSERT INTO--** MSC-ERROR - MSCEWI3123 - DBLINK CONNECTIONS NOT SUPPORTED [ DBLINK : mylink | USER: user1/password1 | CONNECTION: 'connection_str' ] **DATAWAREHOUSE.PUBLIC.employees (employee_id, last_name, email, hire_date, job_id)VALUES (999, 'Claus', 'sclaus@oracle.com', CURRENT_DATE, 'SH_CLERK');UPDATE--** MSC-ERROR - MSCEWI3123 - DBLINK CONNECTIONS NOT SUPPORTED [ DBLINK : mylink | USER: user1/password1 | CONNECTION: 'connection_str' ] **DATAWAREHOUSE.PUBLIC.employeesSET min_salary =3000WHERE job_id ='SH_CLERK';DELETEFROM--** MSC-ERROR - MSCEWI3123 - DBLINK CONNECTIONS NOT SUPPORTED [ DBLINK : mylink | USER: user1/password1 | CONNECTION: 'connection_str' ] ** DATAWAREHOUSE.PUBLIC.employeesWHERE employee_id =999;
Recommendations
It is important to check that all DB Links have different names, if two DB Links share the same and the code is migrated multiple times, then the EWI can change de information based on what DB Link is processed first.
Move the database objects from the database link reference into the same database instance that is being used in Snowflake.