Solved

Editing a saved SQL SSIS (.dtx) package

Posted on 2009-07-08
4
1,234 Views
Last Modified: 2013-11-30
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
0
Comment
Question by:beverleydunster
4 Comments
 
LVL 11

Accepted Solution

by:
dodge20 earned 500 total points
ID: 24804108
Do you have either bids or management studio installed? You can edit the dtsx file with either of those programs.
0
 
LVL 7

Expert Comment

by:stelth240
ID: 24804137
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.
0
 
LVL 22

Expert Comment

by:PedroCGD
ID: 24804140
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
0
 

Author Closing Comment

by:beverleydunster
ID: 31601084
I have noticed you can open the dtsx file with Management Studio and edit all the properties of it in the designer.
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question