ConnectionString and ServerName

  • Im modifying an SSIS package that uses several sqlserver databases and a few .mdb files (I import from these)

    At the moment all the database connection strings and server names are hard coded. I want to avoid that to make it more portable. Whats the best way to go about this, are configuration files best or could I use variables ? Im pretty new to SSIS so any help would be greatly appreciated

  • I would use configuration files, they are fairly easy to setup and make moving packages from dev to prod a lot easier.

    You can either assign the connection strings to variables and set these variables in the config file, or even easier would be to set the connection string directly in the config file.

    There loads of example on Google/Bing to show you how it is done.

  • ok, thanks, ive taken a look at how to use them. How can the actual information inside the config file be edited though ?

    Ive run through the config wizard and have built a config file for the current connections I have. Looking at the connectionstring for one sql server connection, I cant actually change its contents. Can this only be changed if I open the file up in notepad ? Thats not a great way to do this because its not formatted. I could probably do a search and replace, but it would be much nicer to be able to change it inside the configuration wizard itself

  • You can use Notepad to edit them but it is a bit messy, I perfer to use visual studio as this will format the file nicely for editing

    this blog post outlines the steps..

    http://consultingblogs.emc.com/jamiethomson/archive/2009/08/04/editing-configuration-files-ssis-nugget.aspx"> http://consultingblogs.emc.com/jamiethomson/archive/2009/08/04/editing-configuration-files-ssis-nugget.aspx

  • Thats excellent, thank you.

  • Hi.

    Please refer to the url below:

    http://support.microsoft.com/kb/313295

    http://www.connectionstrings.com/sql-server-2005

    I wish it will be helpful.

    Regards,

    becklery.

    RAQ Report: Web-based Excel-like Java reporting tool[/url]

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply