I need save replication delay data to table.I run this sentence
exec distribution.dbo.sp_replmonitorhelppublication @publisher = Myservername,
@publisher_db =NULL,
@publication_type = 0
I got some data. I have to save query results to table.but I try all ways got failure.
first one ,i try to used nest procedure ,I got it next error information
like this
insert into @tmp
exec distribution.dbo.sp_replmonitorhelppublication @publisher = Myservername,
@publisher_db =NULL,
@publication_type = 0
An INSERT EXEC statement cannot be nested.
second I used sp_addlinkedserver @server = 'LOCALSERVER', @srvproduct = '',
@provider = 'SQLOLEDB', @datasrc = @@servername
I got next error information
The OLE DB provider "SQLNCLI10" for linked server "LOCALSERVER" supplied inconsistent metadata for a column. The name was changed at execution time.
I just want to save query data to other table.
anyone can help me. thanks for you help.
my os is windows server 2008 64 bits .
sql server version is
Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64) Apr 2 2010 15:48:46 Copyright (c) Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)