![]() | |
![]() |
| | Thread Tools | Display Modes |
#21
| |||
| |||
|
|
I have a Master Package with script task which is used to get the list of packages and parameters from database table and then run the required packages (the number of packages we need to run varies). And Master Package is run using a SQL Agent job. "Todd C" wrote: SSIS tends to be a little protective of saved passwords. Why use a script task when you have a built-in task for running a child package? Just curious. You may need to pass the ConnectionString (with password) to the child via a String variable, then set the ConnectionString in the child using an Expression. HTH -- Todd C [If this response was helpful, please indicate by clicking the appropriate answer at the bottom] "xyz_jat" wrote: I'm trying to modify an existing connection for a package which I call from another package using a script task. The connection string gets modified but password does not get modified. Here is the code I'm using - Dim pkg As Package() = app.LoadPackage(MyPackageFullPath, Nothing) Dim ConMgr As ConnectionManager ConMgr = pkg.Connections("MyConnectionString") ConMgr.ConnectionString = "Data Source=MyServer;User ID=MyID;Password=MyPassword;Initial Catalog=MyDatabase;Provider=SQLOLEDB.1;Persist Security Info=True;" Server, database, User ID information gets modified but password never gets updated and results in failure. Any help is appreciated. Thanks |
#22
| |||
| |||
|
|
I have a Master Package with script task which is used to get the list of packages and parameters from database table and then run the required packages (the number of packages we need to run varies). And Master Package is run using a SQL Agent job. "Todd C" wrote: SSIS tends to be a little protective of saved passwords. Why use a script task when you have a built-in task for running a child package? Just curious. You may need to pass the ConnectionString (with password) to the child via a String variable, then set the ConnectionString in the child using an Expression. HTH -- Todd C [If this response was helpful, please indicate by clicking the appropriate answer at the bottom] "xyz_jat" wrote: I'm trying to modify an existing connection for a package which I call from another package using a script task. The connection string gets modified but password does not get modified. Here is the code I'm using - Dim pkg As Package() = app.LoadPackage(MyPackageFullPath, Nothing) Dim ConMgr As ConnectionManager ConMgr = pkg.Connections("MyConnectionString") ConMgr.ConnectionString = "Data Source=MyServer;User ID=MyID;Password=MyPassword;Initial Catalog=MyDatabase;Provider=SQLOLEDB.1;Persist Security Info=True;" Server, database, User ID information gets modified but password never gets updated and results in failure. Any help is appreciated. Thanks |
#23
| |||
| |||
|
|
I have a Master Package with script task which is used to get the list of packages and parameters from database table and then run the required packages (the number of packages we need to run varies). And Master Package is run using a SQL Agent job. "Todd C" wrote: SSIS tends to be a little protective of saved passwords. Why use a script task when you have a built-in task for running a child package? Just curious. You may need to pass the ConnectionString (with password) to the child via a String variable, then set the ConnectionString in the child using an Expression. HTH -- Todd C [If this response was helpful, please indicate by clicking the appropriate answer at the bottom] "xyz_jat" wrote: I'm trying to modify an existing connection for a package which I call from another package using a script task. The connection string gets modified but password does not get modified. Here is the code I'm using - Dim pkg As Package() = app.LoadPackage(MyPackageFullPath, Nothing) Dim ConMgr As ConnectionManager ConMgr = pkg.Connections("MyConnectionString") ConMgr.ConnectionString = "Data Source=MyServer;User ID=MyID;Password=MyPassword;Initial Catalog=MyDatabase;Provider=SQLOLEDB.1;Persist Security Info=True;" Server, database, User ID information gets modified but password never gets updated and results in failure. Any help is appreciated. Thanks |
#24
| |||
| |||
|
|
I have a Master Package with script task which is used to get the list of packages and parameters from database table and then run the required packages (the number of packages we need to run varies). And Master Package is run using a SQL Agent job. "Todd C" wrote: SSIS tends to be a little protective of saved passwords. Why use a script task when you have a built-in task for running a child package? Just curious. You may need to pass the ConnectionString (with password) to the child via a String variable, then set the ConnectionString in the child using an Expression. HTH -- Todd C [If this response was helpful, please indicate by clicking the appropriate answer at the bottom] "xyz_jat" wrote: I'm trying to modify an existing connection for a package which I call from another package using a script task. The connection string gets modified but password does not get modified. Here is the code I'm using - Dim pkg As Package() = app.LoadPackage(MyPackageFullPath, Nothing) Dim ConMgr As ConnectionManager ConMgr = pkg.Connections("MyConnectionString") ConMgr.ConnectionString = "Data Source=MyServer;User ID=MyID;Password=MyPassword;Initial Catalog=MyDatabase;Provider=SQLOLEDB.1;Persist Security Info=True;" Server, database, User ID information gets modified but password never gets updated and results in failure. Any help is appreciated. Thanks |
#25
| |||
| |||
|
|
I have a Master Package with script task which is used to get the list of packages and parameters from database table and then run the required packages (the number of packages we need to run varies). And Master Package is run using a SQL Agent job. "Todd C" wrote: SSIS tends to be a little protective of saved passwords. Why use a script task when you have a built-in task for running a child package? Just curious. You may need to pass the ConnectionString (with password) to the child via a String variable, then set the ConnectionString in the child using an Expression. HTH -- Todd C [If this response was helpful, please indicate by clicking the appropriate answer at the bottom] "xyz_jat" wrote: I'm trying to modify an existing connection for a package which I call from another package using a script task. The connection string gets modified but password does not get modified. Here is the code I'm using - Dim pkg As Package() = app.LoadPackage(MyPackageFullPath, Nothing) Dim ConMgr As ConnectionManager ConMgr = pkg.Connections("MyConnectionString") ConMgr.ConnectionString = "Data Source=MyServer;User ID=MyID;Password=MyPassword;Initial Catalog=MyDatabase;Provider=SQLOLEDB.1;Persist Security Info=True;" Server, database, User ID information gets modified but password never gets updated and results in failure. Any help is appreciated. Thanks |
![]() |
| Thread Tools | |
| Display Modes | |
| |