Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
GhantaBro
Posting Yak Master
215 Posts |
Posted - 2009-07-24 : 05:41:59
|
Not sure if this is the correct way to call SSIS package with filename and staging table as parameters... it fails rite nowdeclare @cmd varchar(1000)declare @ssispath varchar(1000)declare @filePath varchar(1000)declare @stagingtable varchar(1000)set @ssispath = 'C:\Visual Studio 2005\Projects\Test\Test\Data Import SB.dtsx'set @filePath = 'C:\test.txt'set @stagingtable = 'u_mart.dbo.test'select @cmd = 'dtexec /F "' + @ssispath + '"'select @cmd = @cmd + ' /SET \Package.Variables[User::InputFile].Properties[Value];"' + @filePath + '"'select @cmd = @cmd + ' /SET \Package.Variables[User::stagingTableName].Properties[Value];"' + @stagingtable + '"' print @cmd------------------ This is the errorMicrosoft (R) SQL Server Execute Package UtilityVersion 9.00.3042.00 for 64-bitCopyright (C) Microsoft Corp 1984-2005. All rights reserved.NULLStarted: 5:21:39 AMWarning: 2009-07-24 05:22:09.76Code: 0x80012017Source: Data Import SB Description: The package path referenced an object that cannot be found: "\Package.Variables[User::stagingTableName].Properties[Value]". This occurs when an attempt is made to resolve a package path to an object that cannot be found.End WarningDTExec: Could not set \Package.Variables[User::stagingTableName].Properties[Value] value to u_mart.dbo.test.Started: 5:21:39 AMFinished: 5:22:09 AMElapsed: 30.39 secondsNULLdtexec /F "C:\Visual Studio 2005\Projects\Test\Test\Data Import SB.dtsx" /SET \Package.Variables[User::InputFile].Properties[Value];"C:\test.txt" /SET \Package.Variables[User::stagingTableName].Properties[Value];"u_mart.dbo.test" |
|
GhantaBro
Posting Yak Master
215 Posts |
Posted - 2009-07-24 : 06:22:46
|
Ok this is fine... I had mis-spelt the variable name. |
|
|
|
|
|