Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Linked server query error Expand / Collapse
Author
Message
Posted Monday, February 3, 2014 8:54 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, November 26, 2014 9:20 AM
Points: 25, Visits: 333
I had setup linked server and when i query the it gives me below error.

QUERY:
SELECT top * from [Servername].[WH_SYSTEM].[dbo].T_ENCOUNTER_PHYSICIAN
WHERE PhysicianID LIKE '[0-9]%'

Output:

Msg 7357,Level 16, State 2, Line 1
Cannot process the object ""WH_SYSTEM."dbo"."T_ENCOUNTER_PHYSICIAN"".
The ole db provider "sqlncli10" for linked server '' servername" indicates that either the object has no columns or the current user does not have permissions on that object.
Post #1537370
Posted Monday, February 3, 2014 9:08 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Friday, December 12, 2014 8:35 AM
Points: 309, Visits: 1,309
Have you checked the permissions? Are you sure, the remote user defined in the linked Server has appropriate permissions to access the tables on your remote server? How is the security defined in your Linked Server? Are you able to test the linked Server successfully and do you see your remote table(which you are trying to query) after expanding your catalog(s) under your linked server from Object Explorer?
Post #1537376
Posted Monday, February 3, 2014 9:29 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, November 26, 2014 9:20 AM
Points: 25, Visits: 333
yes i can see the tables under catalog. Just now i gave read permissions and it worked.

Thanks.
Post #1537386
Posted Monday, February 3, 2014 10:10 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Yesterday @ 11:12 PM
Points: 1,037, Visits: 7,021
p.swathi4 (2/3/2014)
I had setup linked server and when i query the it gives me below error.

QUERY:
SELECT top * from [Servername].[WH_SYSTEM].[dbo].T_ENCOUNTER_PHYSICIAN
WHERE PhysicianID LIKE '[0-9]%'

Output:

Msg 7357,Level 16, State 2, Line 1
Cannot process the object ""WH_SYSTEM."dbo"."T_ENCOUNTER_PHYSICIAN"".
The ole db provider "sqlncli10" for linked server '' servername" indicates that either the object has no columns or the current user does not have permissions on that object.

Linked server error messages rarely tell you anything useful. There's an error in your query.
Try SELECT TOP(10) *



Low-hanging fruit picker and defender of the moggies





For better assistance in answering your questions, please read this.




Understanding and using APPLY, (I) and (II) Paul White

Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
Post #1537400
Posted Monday, February 3, 2014 10:49 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, November 26, 2014 9:20 AM
Points: 25, Visits: 333
sorry mistyped query in forum.

I checked the security and permissions and it works now.
Post #1537418
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse