Link to home
Start Free TrialLog in
Avatar of beverleydunster
beverleydunster

asked on

Editing a saved SQL SSIS (.dtx) package

Hi

I have set up a pretty long-winded SSIS package in SQL Server to import some data from a flat file in to a SQL table. I saved the SSIS in the file system  and have the .dtx file, which enables me to run it whenever necessary. However, one of the parameters in the package needs to be amended - it's a database name in a connection string that needs altering. I can open the .dtx file with the Execute utility and can apparently edit the destination connection under the Connection Managers menu. Unfortunately this doesn't seem to take effect - and when I close the utility, the change isn't saved.

Is there a way I can edit this saved SSIS package - to avoid me needing to go through the entire process of creating a new one, just for the sake of one tiny amendment?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of dodge20
dodge20

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of stelth240
Package configurations are usually a good way to update properties within Connection Managers, but since your package is all created and working, it's probably easier to use variables.  You can create an expression on the Connection Manager that you need to change, and set the connection string property to the same string that's in the current property.  Then just insert the variable where you need it to be added:

"Data Source=ServerAddress;Intial Catalog=" + @[User::DatabaseName] + ";Trusted_Connection=True;"

Then you would add the variable to the execution of the package.  If you're using DTEXEC, it would be:

dtexec /f MyPackage.dtsx /SET \package.variables[DatabaseName].Value;MyDatabase

If you're using the Execute Utility, you can add the information under the Set Values page.  you would specify \package.variables[DatabaseName] as the Property Path and MyDatabase as the Value.

I would think the Connection Managers page would do what you're referring to but I'm not sure why it isn't working for you.  I'm assuming you made sure the connection you wanted to change was checked and the string was modified.
If you dont want to edit the package directly you can use dtexec Utility.
http://msdn.microsoft.com/en-us/library/ms162810.aspx

Helped?
Regards,
Pedro
Avatar of beverleydunster
beverleydunster

ASKER

I have noticed you can open the dtsx file with Management Studio and edit all the properties of it in the designer.