3

I have a SQL Server 2005 SSIS package with an Execute SQL task. I edit the SQL statement, go through the OKs to make the change. I go back in to the Execute SQL task- and the changes have taken hold. Great.

I now go to save the package. I click save. I look back in the Execute SQL task, and the changes have been lost.

What is going on here and how can I stop it?

2
  • I think there might be some kind of corruption in the file. I noticed some other strange goings on. I've now created another Execute SQL task with the same settings and that's more than happy to let me edit it and save it. But if someone has a more specific explanation I'm still looking for an answer.
    – Rich
    Commented Mar 18, 2011 at 14:36
  • The other goings on I mentioned are that this package was a copy of another package. In the execute SQL task, the package itself is mentioned in the SQL (in a where clause). When I renamed the package, it actually changed the SQL to have the new package name! Hence further evidence for a somewhat corrupt package.
    – Rich
    Commented Mar 18, 2011 at 14:37

3 Answers 3

10
  • Click the Execute SQL Task
  • Click F4 to see the list of properties
  • Click the Expressions line and then the little [...] box to see the expressions
  • Change the expressions (or remove them if you don't want your name/sqlstatementsource/etc. to be set dynamically).

This is a nice feature for reusability and template based development of SSIS packages. We use it allt he time.

2
  • Spent hours looking into this issue. Thank you so much
    – AlpacaRG
    Commented Apr 10, 2023 at 19:22
  • Also, you can get to the expression by double-clicking the Execute SQL Task, then clicking on Expressions in the left menu. And for the record, the fact you can edit the "SQLStatement" and it shows the edits...and then doesn't save them or warn you, is ridiculous.
    – Mike
    Commented Aug 21 at 12:34
4

I had the same issue. The reason was that I used a config file with all the executables included, and sql code is just a property of one of the executable which is stored in the config file. When you change your code the config file does NOT get updated, but when you close/open your project the values are getting pulled from the config file which reverse your change to the initial state!

In order to fix this you need either to exclude your executable from the config file (what I did) or re-create the config file every time you change the package.

I hope this helps.

-2

I found I was unable to change the "To" in the Send Mail Task. Or rather, I would press OK on the new value and then bring it up again and it would be the old value. What I did -- was to edit the dtsx file in Notepad by searching for the old value and changing it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.