Showing posts with label dtexec. Show all posts
Showing posts with label dtexec. Show all posts

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

Friday, February 24, 2012

how to set connection string value by using SET switch of dtexec sql server 2005 command

hi

I need to load a text file into sql server table using SSIS package.

the idea is to load this file with the help of dtexec command by giving the file path and name in the SET switch of dtexec command.

anyone having an idea; would be of great help.

Regards,

Salman Shehbaz.

Try using the package configuration wizard to get the property path:

Jamie talks about it here:

http://blogs.conchango.com/jamiethomson/archive/2007/03/13/SSIS_3A00_-Property-Paths-syntax.aspx

|||

o.kays

i finally got hold of the command;

here it is

execute master.dbo.xp_cmdshell 'dtexec /Ser "ServerName" /SQ "SSISPackagehName" /SET "\Package.Connections[ConnectionManagerName].Properties[ConnectionString]";"TextFilePath/Name"'

Regards,

Salman Shehbaz.