I have an SSIS Package that I've created. I worked with SSIS a # of years ago so I'm rusty :).
I have 3 Connection Managers - DataWarehouse, DataWarehouse_PROD, DataWarehouse_TEST.
I am attempting to assign the connection string from the DataWarehouse_PROD or DataWarehouse_TEST Connection Managers to the DataWarehouse Connection Manager depending on another Package variable which could be PROD or TEST using a Script Task.
I've manually edited the password and connection string properties for each of the Connection Managers (per numerous forum entries stating that this works) in the dtsconfig file. I'm assuming I can then retrieve the connection string and password values from the loaded Package Configuration in the Script Task. I'm finding that the password is stripped out when I pull the Connection. Here is a snippet of my code:
string connectionString = Dts.Connections["ACORDDataWarehouse_PROD"].ConnectionString;
Dts.Connections["ACORDDataWarehouse"].ConnectionString = connectionString;
When I inspect the connectionString variable in the code, the password property is not part of the connection. If I manually add the password to the connection string in code, the connection is set correctly and I can retrieve data. From what I've read when using Package Configurations, the configuration is read when the Package is loaded into SSIS so these manual changes should be there.
I'm missing something . . .
Thanks for the assistance. Tom
Run As
when running the BIDS tool to run as someone else, which is admittedly a PITA. If running in SQL Agent you can use proxies. However in a 'mature' environment you would have a DEV database which all developers have windows access to (via a group) so it's not a problem. I dislike SQL accounts because once you give out the password to someone they can pass it around all they like, and you don't actually know who has access, and you can't revoke access to a single person, can't identify who is actually logged in – Nick.McDermaid