Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Get data from linked server

Author  Topic 

flodpanter
Starting Member

3 Posts

Posted - 2006-02-01 : 05:56:01
I have established a linked server connection through Enterprise Manager. Both my local and linked,remote server are of ver 8.0.

I can see that a valid connection has been made, as I can see all the tables of the linked server database under my local servers´ 'linked servers' node.

I want to do a query like this:

select * from LinkServer.test.Nortwind.Categories

but get a 7314 error stating that either the table doesnt exist or I dont have permissions to access it. However I do have access to it directly.

What is the problem?

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-02-01 : 06:42:12
It should be server.database.dbo.table
select * from LinkServer.Nortwind.dbo.Categories



----------------------------------
'KH'


Go to Top of Page

flodpanter
Starting Member

3 Posts

Posted - 2006-02-01 : 06:59:47
Success! I was just about to post that I solved it myself in exactly the way you describe. It is not the login(test) that I should use but the table owner instead, in this case it is in fact dbo as you say and I did not use the right format as you point out.....thanks very much for the quick reply khtan :-)
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-02-01 : 08:57:22
To get data from linked server, you need to use four part names Server.Database.Owner.Object. Look for SQL Server help file for more details

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -