bgreenhouse
Technical User
Hi Everyone
I've created a job that consists of 15 steps. Step 1 is simply BEGIN TRAN. Step 14 is ROLLBACK TRAN, and step 15 is COMMIT TRAN.
Every step goes to the next step on success, and on failure goes to step 14. Step 13 goes to step 15 on success.
I get an error when I run step 14 (by forcing an error) or 15 (if everything else runs smoothly). It says it can't find a matching begin transaction.
I realize that perhaps you can't run a transaction like this in a job. My question is: how would I run a transaction in this case? Is a job in it's entirety a transaction (i.e. if one step fails, it rollsback all changes)?
Thanks for any help.
Ben
I've created a job that consists of 15 steps. Step 1 is simply BEGIN TRAN. Step 14 is ROLLBACK TRAN, and step 15 is COMMIT TRAN.
Every step goes to the next step on success, and on failure goes to step 14. Step 13 goes to step 15 on success.
I get an error when I run step 14 (by forcing an error) or 15 (if everything else runs smoothly). It says it can't find a matching begin transaction.
I realize that perhaps you can't run a transaction like this in a job. My question is: how would I run a transaction in this case? Is a job in it's entirety a transaction (i.e. if one step fails, it rollsback all changes)?
Thanks for any help.
Ben