SSIS: Execute SSIS Package in command prompt 【Update】

COMMAND: "C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\dtexec.exe" /De 1234 /F D:\sample.dtsx /L DTS.LogProviderTextFile;samplelog.log /Set \package.Connections[samplelog.log].Properties[ConnectionString];D:\samplelog.log /Set \package.Connections[DestinationConnectionADONET].Properties[ConnectionString];"\"Data Source=.\SQL2K8;Initial Catalog=Northwind;Provider=SQLOLEDB.1;Integrated Security=SSPI;\""

"C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\dtexec.exe":这是32bit的DTExec Utility。如果要用64bit的话,就将路径中的(x86)删了!32bit不会和64bit一起安装的哦。除非你把BI Studio以及Management Tools都选了,那么就会32bit和64bit都有。

参数:

1、/De[crypt] password :[]中的字是可选的;password 为 1234。如果你的SSIS设置了ProtectionLevel为EncryptSensitiveWithPassword或EncryptAllWithPassword的话,那么就会这个password。

2、/F[ile] filespec :[]中的字是可选的;filespec 为 D:\sample.dtsx。

3、/L[ogger] classid_orprogid;configstring :[]中的字是可选的;classid_orprogid 为 DTS.LogProviderTextFile;configstring 为 samplelog.log。中间的‘;’是必须的哦。

4、/Set propertyPath;value propertyPath 为 \package.Connections[samplelog.log].Properties[ConnectionString];value 为 D:\samplelog.log。中间的‘;’是必须的哦。加多了一个Connection的Set Property。

posted @ 2009-06-30 17:33  David  Views(558)  Comments(0Edit  收藏  举报
Freelance Jobs