What happens in the background when I execute xp_readerrorlog
Within SSMS "EXEC [LinkedServerName].master.sys.xp_readerrorlog 0" will return the contents of the first SQL Server log file for LinkedServerName. However if I try to capture this information within a table with the following sample code: CREATE TABLE ttt_Log (LogDate DATETIME, ProcessInfo VARCHAR(16), Info VARCHAR(MAX)) INSERT INTO ttt_Log EXEC [SQL03TEST].master.sys.xp_readerrorlog 0 I get the error: OLE DB provider "SQLNCLI11" for linked server "LinkedServerName" returned message "No transaction is active.". Msg 7391, Level 16, State 2, Line 2 The operation could not be performed because OLE DB provider "SQLNCLI11" for linked server "LinkedServerName" was unable to begin a distributed transaction. What is happening behind the scenes that allows the log information to be displayed? Basically I want to be able to capture the information myself in a table so I can automatically analyse it.