Quantcast
Channel: Visual Studio General Questions forum
Viewing all articles
Browse latest Browse all 21115

How can we call db2 command load client from in dotnet

$
0
0

Hi

We have a project transfer csv files from windows server to Unix DB2, each file around 30MB and 600,000 records ,

Frist,  we have tried to use the SSIS data flow but it need to spend 15 minutes per file.

Then we tried to use batch file with following code, it just need 3 seconds to complete one file,   but we are not accept to use batch file in our production envirnoment.

ANY METHOD CAN DO SAME THING IN SSIS ???????

-------------------------------------------------------------------------------------------------------------

db2 %DB2_CONNECT_STRING%

DB2 "insert into STG.POS_SYS_FILE_LOG(%LOG_COLUMN%) SELECT MAX(FILE_ID)+1, '%FILE_NAME%',SUBSTR('%FILE_NAME%',1,2),'%FILE_DATE%','%strdatetime%',null,null,'IN PROCESS','POS','Daily' FROM STG.POS_SYS_FILE_LOG"

db2 "commit"

db2 "load client from %DATA_FILE% of del modified by identitymissing dateformat=\"YYYY-MM-DD\" coldel| codepage=1208 insert into %DB_TABLE% (%COLUMN_LIST%) NONRECOVERABLE CPU_PARALLELISM 1"

db2 "set integrity for %DB_TABLE% immediate checked"

---------------------------------------------------------------------------------------------------------------


Viewing all articles
Browse latest Browse all 21115

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>