When you use SAS/ACCESS® Interface to Netezza to create a Netezza table based on an existing Netezza table, the entire statement might not be passed to the database. This issue might occur even when you use two librefs with the same connection parameters along with the DBIDIRECTEXEC system option.
This issue occurs when the following is true about the code that is being executed:
- You specify the DEFER=YES LIBNAME option and set CONNECTION= to something other than UNIQUE. Using CONNECTION=UNIQUE causes the DEFER=YES option to be ignored.
- You specify the DEFER=YES LIBNAME option and you have executed a prior query that creates a new Netezza table or drops an existing one.
This problem occurs because SAS breaks the single step of creating a Netezza table from an existing Netezza table into the following steps.
- SAS passes the CREATE TABLE statement to Netezza.
- A query is constructed and passed to the Database Management System (DBMS) to retrieve the data from the existing Netezza table.
- This data is subsequently passed back to Netezza to insert into the newly created table. When this step occurs, the following error might appear in the output written to the SAS log as a result of the SASTRACE system option:
ERROR: This SQL statement will not be passed to the DBMS for processing because it involves a join across librefs with different connection properties.
When the entire statement is not passed to the DBMS, processing might take longer.
The only workaround is to not use DEFER=YES LIBNAME option.