If a query is successfully cancelled in QA, does any part of it commit ?
1. if autocommit is in effect ?
2. if implicit transactions are in effect and the text in QA is as follows :
sql statement
go
commit
go
Hi,
If a query is successfully cancelled in QA, does any part of it commit ?
1. if autocommit is in effect ?
Depends up on the way you are performing the DML (Insert / update / delete)
If you are doing a row by row operation with out Begin Tran...Rollback tran
... commit tran
then SQL server does auto commit on the rows and will rollback only the DML
which was fired during the
time time you click cancel button. Rest will be successfully committed.
(If it is single Insert / Update / Delete chich handle lots of records , in
that case if you press cancel button then all the activities will be
rolled back)
2. if implicit transactions are in effect and the text in QA is as follows :
In this case if you click the cancel , data will be inside the table till
inserted / updated / deleted.
If you issue a Rollback data will be rolled back or if you issue a commit
the data will be committed.
(If it is single Insert / Update / Delete chich handle lots of records , in
that case if you press cancel button then all the activities will be
rolled back if your commit is not fired)
Thanks
Hari
MCDBA
"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
news:eiein2pGEHA.3540@.TK2MSFTNGP12.phx.gbl...
> If a query is successfully cancelled in QA, does any part of it commit ?
> 1. if autocommit is in effect ?
> 2. if implicit transactions are in effect and the text in QA is as follows
:
> sql statement
> go
> commit
> go
>
Friday, March 9, 2012
QA cancel
Labels:
autocommit,
cancel,
cancelled,
commit,
database,
effect,
implicit,
microsoft,
mysql,
oracle,
query,
server,
sql,
successfully,
transactions
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment