Wednesday, March 21, 2012

how to Set variable value in sub package?

hi !

how to set variable value for sub package inside another package?

some thing like this:

xp_cmdshell 'dtexec /f \"D:\\SSISProject\\Integration Services Project1\\ArchiveMainMultiTables.dtsx\" /Set \package.Variables[User::ArchivePackageName].Properties[Value];\"ArchiveTicketLog\" /Set \package.Variables[User::ArchiveFileType].Properties[Value];\"text\" /Set \package.Variables[User::connectst].Properties[Value];\"Data/tSource=SE413695\AASQL2005;Initial/tCatalog=TestDB;Provider=SQLNCLI.1;Integrated/tSecurity=SSPI;\[ConnectionString]'

Main Package = ArchiveMainMultiTables.dtsx

sub packge = ArchiveTicketLog. when i try to execute the sub pacakge it thorughs up error saying the connection string in not set. i am setting in the parent connection string of the main package. when i execute through the pacakge itself it works fine but when i execute through the Sql command line it fails.

is there some thing to to "/Set [package name]\Package.Connections[ConnectStringArchiveTicket].Properties[Value];

please help

thanks

jas

Have you looked at parent package configurations?

Kirk Haselden
Author "SQL Server Integration Services"

|||

Some links here that may help as well:

Accessing variables in a parent package
(http://blogs.conchango.com/jamiethomson/archive/2005/09/01/2096.aspx)

Passing variables between packages
(http://blogs.conchango.com/jamiethomson/archive/2005/03/17/1151.aspx)

-Jamie

|||thanks

No comments:

Post a Comment