February 25, 2014 at 5:06 am
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?
February 25, 2014 at 7:18 am
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
February 25, 2014 at 7:23 am
yes Grant Select on both view and the table
February 25, 2014 at 7:41 am
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
February 25, 2014 at 7:52 am
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.
February 25, 2014 at 8:39 am
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