Wednesday, August 27, 2014

Error with Linked Servers - "Deferred prepare could not be completed."

I need to select data that contains XML from a Linked Server so my plan is to use the OPENQUERY statement.



SELECT * from OPENQUERY
([xxxCENTRAL01.PIONEERxxx.NET\NEWxxx],
'SELECT top 100 [xTransactionID] FROM [xxxCENTRAL01.PIONEERxxx.NET\NEWxxx].[DataWarehouse].[Reporting].[xTransaction]')
GO

When I run this statement, I get the following error.



OLE DB provider "SQLNCLI11" for linked server "xxxxxxxCENTRAL01.PIONEERxxx.NET\NEWxxx" returned message "Deferred prepare could not be completed.".
Msg 8180, Level 16, State 1, Line 1
Statement(s) could not be prepared.
Msg 7202, Level 11, State 2, Line 1
Could not find server 'xxxCENTRAL01.PIONEERxxx.NET\NEWxxx' in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sys.servers.

I think it could be security related, but not 100% sure.


Thanks


No comments:

Post a Comment