Saturday, February 25, 2012

Multiple Server query

I'm trying to write a query that will be used in a stored
proc to grab data from a table on a different server.
So I have SVR1 trying to get data from SVR2, so I'm trying
to use this query:
SELECT * FROM SVR2..TESTDB.TESTTBL
but I get the following error:
OLE DB provider 'SVR2' does not contain
table '"dbo"."master"'. The table either does not exist
or the current user does not have permissions on that
table.
OLE DB error trace [Non-interface error: OLE DB provider
does not contain the table: ProviderName='SVR2',
TableName='"dbo"."master"'].
Can anyone help?
Thanks,
Chris
Chris,
It seems more likely that you would want
select * from SVR2.TESTDB..TESTTBL
though I'm not quite sure why you get this particular error. What did
you use to add the server SVR2?
Steve Kass
Drew University
Chris W wrote:

>I'm trying to write a query that will be used in a stored
>proc to grab data from a table on a different server.
>So I have SVR1 trying to get data from SVR2, so I'm trying
>to use this query:
>SELECT * FROM SVR2..TESTDB.TESTTBL
>but I get the following error:
>OLE DB provider 'SVR2' does not contain
>table '"dbo"."master"'. The table either does not exist
>or the current user does not have permissions on that
>table.
>OLE DB error trace [Non-interface error: OLE DB provider
>does not contain the table: ProviderName='SVR2',
>TableName='"dbo"."master"'].
>
>Can anyone help?
>Thanks,
>Chris
>
>

No comments:

Post a Comment