Home > Archive > microsoft.public.cert.exam.mcsd > June 2003 > rollback in sql server 2000 not working





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author rollback in sql server 2000 not working
amrita

2003-06-23, 3:23 pm

if i am right now in database "master" and run the
following


begin tran
use pubs
rollback tran

but i m still in pubs database,why does it not roll backed
the database to master
Tim

2003-06-23, 5:23 pm

"amrita" <bhatia_amrita@hotmail.com> wrote in message
news:03b901c339c3$0d7e8ff0$a40
1280a@phx.gbl...
> if i am right now in database "master" and run the
> following
>
>
> begin tran
> use pubs
> rollback tran
>
> but i m still in pubs database,why does it not roll backed
> the database to master


USE is not a data modification command. Similarly, this won't undo the work
in the transaction either:

declare @x int
set @x = 0
begin tran
set @x = 5
rollback tran

Transactions only cover stuff that is written to the transaction log - DML
commands.


Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2008 examnotes.net