Error while fetching data thru Linked servers

I want to access a table exit in the remote server through linked server i have read permissions on that view in the remote server. I have created linked server to the remote server but while fetching i am getting the following error
Error:
The SCHEMA LOCK permission was denied on the object 'vwHealthIndex', database 'dbCSMO_datamart', schema 'dbo'.

If i tried to restart the SQL Service of the local machine again i am able to retrieve the records later after 5 or 10 minutes again i am getting the above error.
LVL 9
COANetworkAsked:
Who is Participating?
 
BrandonGalderisiConnect With a Mentor Commented:
You are going to ask someone who does have permission then because it's the view that's causing the problems and we can't solve permission problems here :).
0
 
BrandonGalderisiCommented:
Can you post your query.  You are attempting to lock the table from being modified with some of your options and that is what is balking about.
0
 
COANetworkAuthor Commented:
select * from [tk5-cmdb-c001].dbCSMO_datamart.dbo.vwHealthIndex with(nolock)

[tk5-cmdb-c001] - Linked Server
and Sometimes i am getting the following error
Msg 7314, Level 16, State 1, Line 1
The OLE DB provider "SQLNCLI" for linked server "tk5-cmdb-c001" does not contain the table ""dbCSMO_datamart"."dbo"."vwHealthIndex"". The table either does not exist or the current user does not have permissions on that table.
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
ZberteocConnect With a Mentor Commented:
Check the user permissions set for the linked server.
0
 
COANetworkAuthor Commented:
The user has readonly permissions on the remote server and admin in the local server where the linked server is created.
0
 
BrandonGalderisiConnect With a Mentor Commented:
Can you post the definition of the vwHealthIndex view?  I believe that is where you have some options that are causing this error.
0
 
COANetworkAuthor Commented:
I don't have permissions to see the definition of the view. I have only select permissions. :(
0
 
ZberteocCommented:
It might be the case that the view's owner and table's owner form within the view to be different. This might cause problems. Whoever owns the view needs to grant the user for the linked server permissions on SELECT for that view. If the table is owned by someone else the linked server user needs permissions for the table too.

0
 
BrandonGalderisiCommented:
The reason why it was necessary to create the account was due to permissions.  So http:#22730887, http:#22702781 and http:#22659083 are all contributing solutions.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.