Hi,
Can anyone tell me where I can get information [in SQL2000] about
transactionId started in particular session?
In MSSQL 2005 there is nice system view sys.dm_tran_session_transactions,
which I can use.
I can get this information from locks table, if session put some locks, but
this method is not nice nor clean.
Please advise.
Thank you very much in advance.
Michal
The SQL 2005 dynamic management views are much more robust than the SQL 2000
system tables and procs. I don't know the underlying requirement that
drives the need for the transaction id but perhaps you can use
sp_getbindtoken instead.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"mku" <michal@@kupczyki..eclipse..co..uk> wrote in message
news:uSIou5BqHHA.4152@TK2MSFTNGP04.phx.gbl...
> Hi,
> Can anyone tell me where I can get information [in SQL2000] about
> transactionId started in particular session?
> In MSSQL 2005 there is nice system view sys.dm_tran_session_transactions,
> which I can use.
> I can get this information from locks table, if session put some locks,
> but this method is not nice nor clean.
> Please advise.
> Thank you very much in advance.
> Michal
"Dan Guzman"
> I don't know the underlying requirement that drives the need for the
> transaction id but perhaps you can use sp_getbindtoken instead.
Thank you for a quick answer.
each process can get own bindToken -true, but I do not know the way of
getting other processe's bindToken
I need a function like
int GetSPIDsCurrentlyOpenTransactionId(int SPID)
in SQL2005 sys.dm_tran_session_transactions gives required info.
The need for TransactionId comes from the idea of identifying code causing
excessive database locks by matching application activity in each SQL
transaction.
Regards
Michal
-----------------------------------------------Reply-----------------------------------------------
Sorry, but I can't think of a method to get a transaction id from another
session in SQL 2000 other than the method you already mentioned. Maybe it's
time to upgrade ;-)
--
Hope this helps.
Dan Guzman
SQL Server MVP
"mku" <michal@@kupczyki..eclipse..co..uk> wrote in message
news:%23SEto8DqHHA.3736@TK2MSFTNGP03.phx.gbl...
> "Dan Guzman"
>> I don't know the underlying requirement that drives the need for the
>> transaction id but perhaps you can use sp_getbindtoken instead.
> Thank you for a quick answer.
> each process can get own bindToken -true, but I do not know the way of
> getting other processe's bindToken
> I need a function like
> int GetSPIDsCurrentlyOpenTransactionId(int SPID)
> in SQL2005 sys.dm_tran_session_transactions gives required info.
> The need for TransactionId comes from the idea of identifying code causing
> excessive database locks by matching application activity in each SQL
> transaction.
> Regards
> Michal