Question

I tried to search for a previous answer but the most similar is on a completely different question.

On TOAD for Oracle when I press F5 on an update I still have to choose if I want to commit or rollback.

On SSMS the commit is automatic.

Can I configure it to the need for an explicit commit?

EDIT

I've found that my question has got an exact response here:

https://stackoverflow.com/a/8748818/196210

Was it helpful?

Solution

You can set implicit transactions in SQL-Server Managemenet Studio. Therefore you have to change the default option from off to on here:

  • Tools
  • Options
  • Query Execution
  • SQL Server
  • ANSI
  • SET IMPLICIT_TRANSACTIONS

Here is an image:

enter image description here

OTHER TIPS

Put BEGIN TRANSACTION at the top of your script.

Or use SET IMPLICIT_TRANSACTIONS ON (courtesy of How do you set autocommit in an SQL Server session?)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top