April 3, 2014 at 10:29 am
Hi Experts,
Will the below statement cause any issue on database??
DECLARE @TableName sysname
SET @TableName = 'dbo.ARA'
SELECT
u.[name] AS UserName
, l.[Begin Time] AS TransactionStartTime
FROM
fn_dblog(NULL, NULL) l
INNER JOIN
(
SELECT
[Transaction ID]
FROM
fn_dblog(NULL, NULL)
WHERE
AllocUnitName LIKE @TableName + '%'
AND
Operation = 'LOP_DELETE_ROWS'
) deletes
ON deletes.[Transaction ID] = l.[Transaction ID]
INNER JOIN
sysusers u
ON u.[sid] = l.[Transaction SID]
Please help as we are experiencing slowness in our DB.
April 3, 2014 at 12:20 pm
Could slow down data modifications. It's not something I would run on production except in exceptional circumstances.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 3, 2014 at 12:26 pm
I agree with Gail. Also, you really should use sys.users not sysusers as sysusers is for backward compatibility and may be removed from future versions of SQL Server.
April 4, 2014 at 5:25 am
Thanks Gail & Lynn..
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply