dbTalk Databases Forums  

SSIS Connection not updated programmatically

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss SSIS Connection not updated programmatically in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #21  
Old   
Todd C
 
Posts: n/a

Default RE: SSIS Connection not updated programmatically - 12-09-2008 , 11:14 AM






Try this:

Use an Execute SQL Task to read the table and load results into a variable
of type: Object. Then have a For Each loop iterate over the records in the
(Object) table, assigning fields in the table to Variables in the package.
Have a single Execute SSIS Package inside the loop. Use its Expressions to
dynamically decide which package to run based on the contents of the
respective variables.

HTH
--
Todd C

[If this response was helpful, please indicate by clicking the appropriate
answer at the bottom]


"xyz_jat" wrote:

Quote:
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

Reply With Quote
  #22  
Old   
Todd C
 
Posts: n/a

Default RE: SSIS Connection not updated programmatically - 12-09-2008 , 11:14 AM






Try this:

Use an Execute SQL Task to read the table and load results into a variable
of type: Object. Then have a For Each loop iterate over the records in the
(Object) table, assigning fields in the table to Variables in the package.
Have a single Execute SSIS Package inside the loop. Use its Expressions to
dynamically decide which package to run based on the contents of the
respective variables.

HTH
--
Todd C

[If this response was helpful, please indicate by clicking the appropriate
answer at the bottom]


"xyz_jat" wrote:

Quote:
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

Reply With Quote
  #23  
Old   
Todd C
 
Posts: n/a

Default RE: SSIS Connection not updated programmatically - 12-09-2008 , 11:14 AM



Try this:

Use an Execute SQL Task to read the table and load results into a variable
of type: Object. Then have a For Each loop iterate over the records in the
(Object) table, assigning fields in the table to Variables in the package.
Have a single Execute SSIS Package inside the loop. Use its Expressions to
dynamically decide which package to run based on the contents of the
respective variables.

HTH
--
Todd C

[If this response was helpful, please indicate by clicking the appropriate
answer at the bottom]


"xyz_jat" wrote:

Quote:
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

Reply With Quote
  #24  
Old   
Todd C
 
Posts: n/a

Default RE: SSIS Connection not updated programmatically - 12-09-2008 , 11:14 AM



Try this:

Use an Execute SQL Task to read the table and load results into a variable
of type: Object. Then have a For Each loop iterate over the records in the
(Object) table, assigning fields in the table to Variables in the package.
Have a single Execute SSIS Package inside the loop. Use its Expressions to
dynamically decide which package to run based on the contents of the
respective variables.

HTH
--
Todd C

[If this response was helpful, please indicate by clicking the appropriate
answer at the bottom]


"xyz_jat" wrote:

Quote:
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

Reply With Quote
  #25  
Old   
Todd C
 
Posts: n/a

Default RE: SSIS Connection not updated programmatically - 12-09-2008 , 11:14 AM



Try this:

Use an Execute SQL Task to read the table and load results into a variable
of type: Object. Then have a For Each loop iterate over the records in the
(Object) table, assigning fields in the table to Variables in the package.
Have a single Execute SSIS Package inside the loop. Use its Expressions to
dynamically decide which package to run based on the contents of the
respective variables.

HTH
--
Todd C

[If this response was helpful, please indicate by clicking the appropriate
answer at the bottom]


"xyz_jat" wrote:

Quote:
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

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.