Netezza Incremental load from Sql server using SSI

2019-07-10 01:41发布

I am trying to do a incremental load from Sql server 2008 to Netezza (Nps6) using SSIS. Netezza 5.x version OLEDB driver used. I am using Table or View - Fast Load option with Maximum insert commit size = 0.

Here I am trying to insert few thousands of records to a Netezza table. This destination table contains millions of records. This Data flow task was taking a hours to complete. When I looked into the Netezza Administrator Active Queries I could see that a query like below was the problem,

SELECT * FROM Destination_Table;

The next step is an external table load like below,

insert into "destination_table"(col1, col2, col3)
select c0, c1, c2 from external '/dev/null' (c0, c1, c2) using ( 
    remotesource odbc' delimiter ' ' escapechar '\' ctrlchars 'yes' crinstring 'yes' timeroundnanos 'yes' encoding 'internal' maxerrors 1
) ;

Can anyone help me understand why a SELECT * FROM the Destination Table is required for load. Or how a Netezza OLEDB driver works with SSIS.

Appreciate your help.

2条回答
小情绪 Triste *
2楼-- · 2019-07-10 02:26

After installing OLEDB 6.x version this "SELECT * FROM DESTINATION TABLE" issue is not occurring. I could see a good performance improvement with OLEDB 6 version. But, If we are working on OLEDB 5.x version, i believe it is better to load to a stage table and then load to the destination table

查看更多
Root(大扎)
3楼-- · 2019-07-10 02:27

Without looking at details in your package, the behavior which you have explained occurs if you have not selected the Table or View -fast load option for your Data access mode in your OLE DB Destination component. The fast load option would internally use a BULK INSERT for uploading data into the destination table.

Fast Load Option

Using the Table or view behaves like a SELECT * and pulls all the columns. This access mode should be used only if you need all the columns of the table or view from the source to the destination.

The problem for you is that this option might not be appearing for you by default, since you are using Netezza.

See issue discussed here along with possible workarounds:

http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/965b6d83-cf5e-405b-8784-7981e4386adc

Official bug report raised here:

https://connect.microsoft.com/SQLServer/feedback/details/569087

查看更多
登录 后发表回答