December 2, 2003 at 1:24 pm
Is there a way to get the unique identifier of a transaction that SQL uses. I know you can name them, but SQL must have another way to identify it.
Thanks in advance.
December 2, 2003 at 4:04 pm
I don't know of any way to do this. Can I ask why you want it?
Gary Johnson
Microsoft Natural Language Group
DBA, Sr. DB Engineer
Gary Johnson
Microsoft Natural Language Group
DBA, Sr. DB Engineer
This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.
December 2, 2003 at 10:53 pm
I think @@spid will provide u the identifier
December 3, 2003 at 2:35 am
Hm...not sure if this is what you want, but a look at BOL for LSN might be helpful.
Frank
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
December 3, 2003 at 7:36 am
I want to do some audits of changes in the database. I would like to do this using triggers, but there will be updates to several tables in one transaction and I would like to be able to group all those updates in my audit tables.
quote:
I don't know of any way to do this. Can I ask why you want it?Gary Johnson
Microsoft Natural Language Group
DBA, Sr. DB Engineer
December 3, 2003 at 10:58 am
I believe this information is in the sysprocesses table in the master database under the fiels "SID". But its a binary datatype so you'll have to do some digging to get the information you want.
-Isaiah
December 3, 2003 at 11:52 am
Are you able to modify the code that is being used to update the tables? If so, you'd be a lot better of doing this explicitely, using some set based processing.
If not, then this is real tricky. If you're trying to group your audit updates by connection then @@spid will be all you need.
Signature is NULL
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply