Scripts rolling back automatically?

Hello all,

I’m running Toad for Oracle version 9.7.2.5 and having a strange problem. Whenever I use the “Execute as a Script” (lightning bolt) button, the changes get rolled back automatically immediately after TOAD gets to the end of the script. This happens for a wide variety of scripts, never throws any errors and the code that I’m trying to execute works fine if I choose “Execute Statement” instead.

The only way that I’m able to view and/or keep the changes from statements Executed as a Script from being rolled back automatically is to write a COMMIT and execute it along with them (a practice that is highly discouraged in my organization.)

Does anyone have experience with a problem like this and if so what did you do? Any ideas on what would cause this behavior?

Dan,

Two things to check:

Oracle -> Transactions -> Execute scripts in Toad session

Oracle -> Transactions -> When closing connections

If the first one is unchecked, the script engine will create a new session,
execute the script, and close the session. If the second option is set to
Rollback, that would explain the behavior you are seeing.

Greg

Thanks for the reply, Greg.

In my Toad options, Execute scripts in Toad session is checked and when closing connections it is supposed to prompt for commit/rollback.

Does anyone else have an opinion on what might cause this issue?