Auto commit

  • May be this is very basic question for experts..

    I have read somewhere that SQL Server 2005 by default property is auto commit.

    when you write insert statement in SSMS without any explicit transaction and execute then it commits and inserts the record into table.

    My question is where can i change this property? i want to test by changing the property to Rollback instead of commit??

    --NewBeeSQL

    -----------------------------------------------------------------------
    For better assistance in answering your questions[/url]
    Perforamance Issues[/url]
    Cross Tabs and Pivots[/url]
    Cross Apply[/url]
    The Numbers or Tally Table- Jeff Moden[/url]

  • Yes you can:

    - You can set your SSMS query properties to use ANSI implicit_transactions.

    ( Tools / Options / Query execution / SQLServer / ANSI )

    OR

    - you can set this in your script itself ( set implicit_transactions on )

    OR

    - you can actually code "begin transaction" in your script.

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • Thanks ALZDBA...

    -----------------------------------------------------------------------
    For better assistance in answering your questions[/url]
    Perforamance Issues[/url]
    Cross Tabs and Pivots[/url]
    Cross Apply[/url]
    The Numbers or Tally Table- Jeff Moden[/url]

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply