Using Connection Strings in Config files
Hi,
I am new to SSIS. I created a Package and the package works fine. The package has 2 data connections. One is integrated security and one has SQL User name and password. When ever I try to execute the package, I get an Login failed error for SQL Account.
If I go in and out the password for the account in Connection manager settings, it works again. I tried using Config file. But was not sure where to Place the password. How do I get this to save the password with out entering every time? I want to run
this as a SQL Agent Job.
<Configuration ConfiguredType="Property" Path="\Package.Connections[DEV].Properties[ConnectionString]" ValueType="String">
<ConfiguredValue>Data Source=localhost;User ID=Test;Initial Catalog=DEV;Provider=SQLNCLI10.1;Persist Security Info=False;Auto Translate=True;Application Name=Test Downloader;Tag with column collation when possible=True;MARS Connection=True;</ConfiguredValue>
</Configuration>
November 22nd, 2010 4:22pm
Set persist security Info = True and try... Gaurav Gupta http://sqlservermsbiblog.blogspot.com/
Free Windows Admin Tool Kit Click here and download it now
November 22nd, 2010 4:24pm
That was set to True by Default. I changed it to see if it makes any difference. When it is true also, the same situation
November 22nd, 2010 4:38pm
where you run the package? from BIDS? or SSMS ? http://www.rad.pasfu.com
Free Windows Admin Tool Kit Click here and download it now
November 22nd, 2010 4:42pm
SSIS won't save a "password" element to the connection string when it generates the configuration file. You'll have to add that yourself. It doesn't save it in order to protect that sensitive information. SSIS is relying on you to add that
information, after you ensure that the configuration file is in a secure location. If it did anything differently, there would be an opportunity for malicious eyes to read your username and password in plain-text.
For SQL Server, you should just have to modify the connection string to read:
Data Source=localhost;User ID=Test;Password=YourPasswordHere;Initial Catalog=DEV;Provider=SQLNCLI10.1;Persist Security Info=False;Auto Translate=True;Application Name=Test Downloader;Tag with column collation when possible=True;MARS Connection=True;
Talk to me now on
November 22nd, 2010 9:35pm
Thank you Todd. I have one more Question. Does the Application name matter in the connection string? By Default it was "SSIS-Package-" + a GUID. I modified it.
Free Windows Admin Tool Kit Click here and download it now
November 23rd, 2010 9:47am
No - in fact, it's considered a very good idea to modify that string to identify your connection better. That string gets reported in SQL monitoring - like when you use Profiler. GUIDs typically don't help anyone...
Talk to me now on
November 23rd, 2010 9:32pm