Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Error while fetching data thru Linked servers

Posted on 2008-10-05
10
2,276 Views
Last Modified: 2012-06-27
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.
0
Comment
Question by:COANetwork
  • 4
  • 3
  • 2
10 Comments
 
LVL 39

Expert Comment

by:BrandonGalderisi
ID: 22653372
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
 
LVL 9

Author Comment

by:COANetwork
ID: 22656530
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
 
LVL 26

Assisted Solution

by:Zberteoc
Zberteoc earned 116 total points
ID: 22659083
Check the user permissions set for the linked server.
0
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
LVL 9

Author Comment

by:COANetwork
ID: 22700888
The user has readonly permissions on the remote server and admin in the local server where the linked server is created.
0
 
LVL 39

Assisted Solution

by:BrandonGalderisi
BrandonGalderisi earned 234 total points
ID: 22702781
Can you post the definition of the vwHealthIndex view?  I believe that is where you have some options that are causing this error.
0
 
LVL 9

Author Comment

by:COANetwork
ID: 22730858
I don't have permissions to see the definition of the view. I have only select permissions. :(
0
 
LVL 39

Accepted Solution

by:
BrandonGalderisi earned 234 total points
ID: 22730887
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
 
LVL 26

Expert Comment

by:Zberteoc
ID: 22731013
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
 
LVL 39

Expert Comment

by:BrandonGalderisi
ID: 22840794
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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question