/* check if a table already exits before we drop it*/
IF EXISTS(SELECT name FROM sys.tables
WHERE name = 'Table_TempForTest')
BEGIN
/* drop table */
DROP TABLE Table_TempForTest
END
GO
/* see all the tables */
select * from sys.tables
2009年7月24日星期五
powershell can't recognize the vairable setting for dtexec.exe
when I run dtexec.exe in powershell,the value after ";" is treated as a cmdlet and throw a exception" not recognized as a cmdlet, function, operable program, or script file".
This script can execute under cmd-line, but not in powershell.....
This script can execute under cmd-line, but not in powershell.....
dtexec /f "C:\Users\Administrator\Documents\Visual Studio 2008\Projects\Integration Services Project1\Integration Services Project1\FileCopyPackage.dtsx" /set \package.variables[User::SourceFileName].Value;"C:\sharefolder\ssiscopied"
2009年7月21日星期二
在64位机上运行dtexec转换Excel数据
在64位操作系统上,dtexec默认是在64位模式下运行的,但是在三种情况下我们需要让dtexec运行于x86的模式:
参考资料:
64-bit Considerations for Integration Services
- 运行sql server 2000的DTS包
- DTS包中使用的托管的.NET Framework Data Provider或者是本地OLE DB provider不支持64位模式
- 脚本中引用的其它程序集或Com组件没有64位版本或者没有安装64位版本
cd C:\Program Files\Microsoft SQL Server\100\DTS\Binn上面的例子中我们通过参数的形式重新设置了两个连接的值。在dtexec运行时,每个连接都可以通过一个单独的/connection参数来制定新的值,当有多个连接的时候,就设定多个/connection参数,这个好像在文档中没有提到。
dtexec /x86 /f c:\Sharefolder\Package2.dtsx /connection SourceConnectionExcel;"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Sharefolder\BusinessTemplate.xls;Extended Properties=Excel 8.0;HDR=YES" /connection DestinationConnectionOLEDB;"Data Source=.\SQLEXPRESS;Intial Catalog=SSISSampleDb;Provider=SQLNCLI10;Integrated Security=SSPI;Auto Translate=false"
pause
参考资料:
64-bit Considerations for Integration Services
2009年7月10日星期五
订阅:
博文 (Atom)