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

Était-ce utile?

La 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

Autres conseils

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?)

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top