Migrating IBM PureData System for Analytics (Netezza) routines to Db2
Using IBM tools, you can automatically change much of the source code of your Netezza NZPLSQL routines to Db2® SQL PL.
About this task
If you are moving from Netezza to Db2, you might want to permanently change your NZPLSQL source code to SQL PL, as described in the following procedure. You can then take advantage of any future SQL PL enhancements. However, if you do not want to permanently change your code, you can set the SQL_COMPAT global variable to 'NPS' before you compile your NZPLSQL source in Db2. The routine is then sent to an NZPLSQL cross-compiler, which attempts to convert the routine from NZPLSQL to SQL PL before sending it to the SQL PL compiler. Some manual changes might still be needed.
For more information about NZPLSQL support in Db2, see Routines written in NZPLSQL.
Procedure
- Evaluate compatibility by using the Database Conversion Workbench or Database Harmony Profiler. For information about how to obtain and use these tools, see the Database Conversion Workbench page and IBM Database Conversion Workbench (DCW) topic.
- If the tool flags NZPLSQL code that it cannot convert to SQL PL, manually change the code.
- Automatically convert the remaining code to SQL PL by running the Database Conversion Workbench or Database Harmony Profiler again.