IBM DB2 to Snowflake Migration

SQLines provides tools to help you convert database schema (DDL), views, queries and SQL scripts from IBM DB2 to Snowflake.

  • SQLines SQL Converter - SQL scripts assessment and conversion tool

Databases:

  • IBM DB2 for LUW, z/OS and OS/400 11.x, 10.x, 9.x, 8.x and 7.x
  • Snowflake

Migration Reference

Built-in SQL Functions

Converting functions:

DB2 Snowflake
1 CURRENT DATE Get the current date CURRENT_DATE
CURRENT_DATE

CREATE SEQUENCE

Converting CREATE SEQUENCE statements:

DB2 Snowflake
1 CREATE [OR REPLACE] SEQUENCE seq_name CREATE [OR REPLACE] SEQUENCE seq_name
2 INCREMENT BY num Positive or negative increment, default is 1 INCREMENT BY num
3 START WITH num Initial value START WITH num
4 MAXVALUE num Maximum value is num Removed
NO MAXVALUE System limit Removed
5 MINVALUE num Minimum value is num Removed
NO MINVALUE System limit Removed
6 CYCLE Reuse values after reaching the limit Removed
NO CYCLE No reuse, this is default Removed
7 CACHE num Cache num values Removed
NO CACHE Values are not preallocated Removed
8 ORDER Guarantee numbers in order of requests ORDER
NO ORDER No guarantee, this is default NOORDER

SQL Statements

Converting SQL statements:

DB2 Snowflake
1 CONNECT TO dbname Connect to the database Commented
2 CREATE SCHEMA schema Create a schema CREATE SCHEMA schema