SSIS 2008: can't change connection string in existing connection manager

  • I'm attempting to use an old package as a starting point for a new project. Of course, the first thing I want to do is point it to a different database. This is driving me nuts; when I run the package, the connection string reverts back to the old connection string. I've gone as far as changing both database name & related GUID directly in the dtsx file using notepad, searching files, searching the registry. I can't figure out how the package even knows what the old config string is!

    I had initially tried creating a new connection manager and switching various tasks to use that one instead, but that got into all sorts of problems like the package saying it was corrupt.

    BTW, yes, this is within visual studio. I understand that at runtime I can pull this in from an XML file, but I need to develop first.

    Any suggestions would be helpful here; I'd rather get some reuse from previous projects instead of starting from scratch, that seems silly!

  • Bozohead Jones (4/22/2011)


    I'm attempting to use an old package as a starting point for a new project. Of course, the first thing I want to do is point it to a different database. This is driving me nuts; when I run the package, the connection string reverts back to the old connection string. I've gone as far as changing both database name & related GUID directly in the dtsx file using notepad, searching files, searching the registry. I can't figure out how the package even knows what the old config string is!

    I had initially tried creating a new connection manager and switching various tasks to use that one instead, but that got into all sorts of problems like the package saying it was corrupt.

    BTW, yes, this is within visual studio. I understand that at runtime I can pull this in from an XML file, but I need to develop first.

    Any suggestions would be helpful here; I'd rather get some reuse from previous projects instead of starting from scratch, that seems silly!

    I've run into similar problems with a number of the tools in SSIS. Generally I have to put a new instance of that task into the process, configure it and delete the old one to get it to work. In this case I would have suggested creating a new connection string and deleting the old one, but you say you've tried that and it doesn't work.

    What's the error you get when it says it is corrupt?

    --------------------------------------
    When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
    --------------------------------------
    It’s unpleasantly like being drunk.
    What’s so unpleasant about being drunk?
    You ask a glass of water. -- Douglas Adams

  • Also, once you change the connection, you have to go through and manually change every task that used that connection, primarily to make sure the tables and rows that are being accessed exist in the new location. Even if they do exist and everything in that task is ok, you'll have to edit the task and click OK for Visual Studio to acknowledge that the new path is correct.

    If you want to only change some of the tasks at a time, you'll have to create a new connection, and not delete the old one until you've changed every task.

    --------------------------------------
    When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
    --------------------------------------
    It’s unpleasantly like being drunk.
    What’s so unpleasant about being drunk?
    You ask a glass of water. -- Douglas Adams

  • Thank you for quick reply!

    Soon after I posted, I believe I've figured this out. The package has a hardcoded path to a dtsConfig in the old project! I remove that and it is now remembering the new connection string.

    Sometimes I think the process of asking a question gets you thinking in a different way and the solution comes quickly.

  • Bozohead Jones (4/22/2011)


    Thank you for quick reply!

    Soon after I posted, I believe I've figured this out. The package has a hardcoded path to a dtsConfig in the old project! I remove that and it is now remembering the new connection string.

    Sometimes I think the process of asking a question gets you thinking in a different way and the solution comes quickly.

    Glad you got it worked out.

    Yeah, I frequently find that just by typing out my problem I think of several other ways to approach it. Glad that worked for you.

    --------------------------------------
    When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
    --------------------------------------
    It’s unpleasantly like being drunk.
    What’s so unpleasant about being drunk?
    You ask a glass of water. -- Douglas Adams

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

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