blossompark
asked on
linked server error in sql server 2005
Hi,
I have created a linked server from serverA to serverB using
EXEC sp_addlinkedserver @server='serverB'
When I fire the following query from serverA
select * from openquery (serverB, 'SELECT * from serverB.northwind.dbo.empl oyees')
I get the following error
OLE DB provider "SQLNCLI" for linked server "serverB" returned message "Deferred prepare could not be completed.".
Msg 14, Level 16, State 1, Line 1
[DBNETLIB][ConnectionOpen (Invalid Instance()).]Invalid connection.
any help appreciated...thanks
I have created a linked server from serverA to serverB using
EXEC sp_addlinkedserver @server='serverB'
When I fire the following query from serverA
select * from openquery (serverB, 'SELECT * from serverB.northwind.dbo.empl
I get the following error
OLE DB provider "SQLNCLI" for linked server "serverB" returned message "Deferred prepare could not be completed.".
Msg 14, Level 16, State 1, Line 1
[DBNETLIB][ConnectionOpen (Invalid Instance()).]Invalid connection.
any help appreciated...thanks
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
both these work
select * from openquery (serverB, 'SELECT * from northwind.dbo.employees')
SELECT * from serverB.northwind.dbo.empl
I thought i had to use OPENQUERY for a linked server but maybe not...
thanks for your help...all ok now :-)