June 30, 2015 at 4:44 pm
I'm getting a replication error that an object (Table) was not found.
Does anyone know of a script that can capture this information?
Regards.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
July 1, 2015 at 1:00 am
Hi,
This was the closest article I could find when I needed that information, straight from Mr. Paul Randal:
http://www.sqlskills.com/blogs/paul/finding-out-who-dropped-a-table-using-the-transaction-log/
________________________________________________________________
"Accept conditions as they exist, or accept the responsibility for changing them."
July 1, 2015 at 1:15 am
JimmyJones (7/1/2015)
Hi,This was the closest article I could find when I needed that information, straight from Mr. Paul Randal:
http://www.sqlskills.com/blogs/paul/finding-out-who-dropped-a-table-using-the-transaction-log/
On a second thought:
- You could check the Standard Report 'Schema Changes History' on the server
- If your default trace enabled:
SELECT TE.name AS [EventName] ,
T.DatabaseName ,
T.ObjectName,
t.DatabaseID ,
t.NTDomainName ,
t.ApplicationName ,
t.LoginName ,
t.SPID ,
t.StartTime ,
t.RoleName ,
t.TargetUserName ,
t.TargetLoginName ,
t.SessionLoginName
FROM sys.fn_trace_gettable(CONVERT(VARCHAR(150), ( SELECT TOP 1
f.[value]
FROM sys.fn_trace_getinfo(NULL) f
WHERE f.property = 2
)), DEFAULT) T
JOIN sys.trace_events TE ON T.EventClass = TE.trace_event_id
WHERE TE.name = 'Object:Deleted'
________________________________________________________________
"Accept conditions as they exist, or accept the responsibility for changing them."
July 2, 2015 at 5:46 am
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply