0

SQL server 2012, I have multiple execs calling the same package with different parameters. Normally i'll highlight one at a time and run them individually but I'd like to be able to hit go and run them all in order. One exec pulls results that were created from another so it has to be in order. Is there a way to pull this off? i'm not sure if it's the default nature but I haven't been able to verify it.

  • By "package" do you mean SSIS? Where are you highlighting and running them? Can you show an example of the call? (If you are running in SSMS and shelling out to the OS via xp_cmdshell to call sqlpackage.exe for example, or using SQLCMD mode inside SSMS, I might be a little nervous.) – Aaron Bertrand Jan 25 '17 at 19:59
2

Short answer is yes, that is the default behavior.

SQL is a data access language that will run statments in batches, you'd have to use other features (Service Broker for example) to run statements asynchronously.

One of the main concepts of the language is the idea of Transactions. There are several articles out there which explain this concept in detail with straightforward examples. For Example.

I'd highly recommend practicing this because understanding how to use Transactions becomes especially important when one statement relies on the successful execution of the previous statement.

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