dbTalk Databases Forums  

dtsx - how to store connection password in variable

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


Discuss dtsx - how to store connection password in variable in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Screaming Eagles 101
 
Posts: n/a

Default dtsx - how to store connection password in variable - 08-13-2009 , 07:55 AM






Hi,

I'd like to store the connection password in a variable (DB2 connection)
and then use the variable for the connection in a VS2005 - SQL Server 2005
dtsx project.
Making a package variable is ok, but what about the next step ? How do I use
the variable ?

--
Filip
http://www.ww2airborne.net/
Official Site of the 101st Airborne - 463rd PFA
skype: airborne463pfa-fiwi
[It's nice to be important, but it's more important to be nice!]
----------------------------------------------------------------

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

Default RE: dtsx - how to store connection password in variable - 08-14-2009 , 07:51 AM






Hello Filip:

Yes, it can be done, and I'll explain how to do it, but please do yourself a
favor and consider using Package Configurations. Check out my blog on the
subject:
http://toddchitt.wordpress.com/
(Yes, it's shameless self-promotion, but I posted it just so I would not
have to repeat it in forums like this!)

OK, Here is how you use a variable that contains a password:
Click on the Connection Manager in question. In the Properties pane, find
the Expressions section and create an Expression for the Connection String.
Set it to:
"Provider = blah, blah, blah;userid=blah;Password=" + [User::Password] +
";more blah here".

HTH
=====
Todd C


"Screaming Eagles 101" wrote:

Quote:
Hi,

I'd like to store the connection password in a variable (DB2 connection)
and then use the variable for the connection in a VS2005 - SQL Server 2005
dtsx project.
Making a package variable is ok, but what about the next step ? How do I use
the variable ?

--
Filip
http://www.ww2airborne.net/
Official Site of the 101st Airborne - 463rd PFA
skype: airborne463pfa-fiwi
[It's nice to be important, but it's more important to be nice!]
----------------------------------------------------------------



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.