Today morning I received the following alert:
DESCRIPTION:Replication-Replication Distribution Subsystem: agent (null) failed. The publication 'XYZ_XYZ_XYZ' does not exist.
I've expanded the publication node where that publication should be, and yes it is not there.
how can I know when and who deleted that publication? is this information stored in Default Trace? if yes then I tried the following but with no luck... how can I found who?!
DECLARE @FileName NVARCHAR(260) SELECT @FileName = SUBSTRING(path, 0, LEN(path) - CHARINDEX('\', REVERSE(path)) + 1)+ '\Log.trc' FROM sys.traces WHERE is_default = 1 ; SELECT loginname , hostname , applicationname , databasename , objectName , starttime , e.name AS EventName , databaseid FROM sys.fn_trace_gettable(@FileName, DEFAULT) AS gt INNER JOIN sys.trace_events e ON gt.EventClass = e.trace_event_id where starttime >'2016-10-18'