Monday, March 19, 2012

explicit transaction in sql server 2000

How does sql server 2000 distinguish between explicit transactions for a use
r
who is logged into the server with the same userid more than once? What I'm
trying to find out is if a user is logged into the server twice and begins 2
distinct non-nested transactions, how does sql server distinguish between th
e
items in each distinct transaction? Is there some unique identifier that
determines what update is related to what transaction?Yes. Everything runs under a process ID.
In Enterprise Manager, expand the tree to the Management folder. Click on
Current Activity. Then, go through the current activity folder--process
info, locks/process id, and locks/object. You'll notice that everything is
tied to a process id, including system level activities such as building an
index, etc.
As an example, find yourself in the process id list based on your user name.
Using that process id, you can find what objects you have locks on by
looking at the locks/process id list. Of course, if you have multiple
connections under the same user name, in the same database, it can be very
difficult to determine which is which but SQL Server knows ;) Open Query
Analyzer and execute some select statements in pubs (or whatever). You'll
have to right-click Refresh in order to update the "current activity" as it
shows you a frozen snap-shot.
Hope that helps,
Joe
"ccmsimike" wrote:

> How does sql server 2000 distinguish between explicit transactions for a u
ser
> who is logged into the server with the same userid more than once? What I
'm
> trying to find out is if a user is logged into the server twice and begins
2
> distinct non-nested transactions, how does sql server distinguish between
the
> items in each distinct transaction? Is there some unique identifier that
> determines what update is related to what transaction?

No comments:

Post a Comment