Linked server 'select' access to view

  • Hi all,

    I am trying to give just select access on a view but not an actual table. I have used SQL login for linked server and linked server connection works without any issues.

    View has got only 200 rows and when i try accessing below query it doesn't return any values

    select top(1) * from linkedservername.dbname.dbo.Viewname

    But same query when run on table (with select access)returns value just under a second

    select top(1) * from linkedservername.dbname.dbo.tablename

    Any idea why view is not returning any value?

  • Did you GRANT SELECT access to the table directly or did you add a datareader role globally to the user on the linked server?

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • yes Grant Select on both view and the table

  • This is perhaps a silly question: When you run the "select top(1) * from linkedservername.dbname.dbo.Viewname" on the physical server itself, does it return a record?

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • Yes I ran the query on physical server where linked server is configured but it keeps running without giving any result once I cancelled it after two hours run. But same query with GRANT SELECT on table from the same server returns results within a second.

  • Please post the view DDL

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply