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
 General SQL Server Forums
 New to SQL Server Programming
 linked severs

Author  Topic 

kt
Yak Posting Veteran

88 Posts

Posted - 2013-02-14 : 15:15:03
Hi,

I have 2 servers A and B.
In A, I have database name App.
In B, I have two databases name COST, ODRS.

From A, I do the query to use the link to call the DB :COST in B
such as: select * from mylinkB.COST.dbo.mytbl - WORKED

However got error when call db ODRS
such as: select * from mylinkB.ODRS.dbo.mytbl

error:Msg 7314, Level 16, State 1, Line 1
The OLE DB provider "SQLNCLI" for linked server "mylinkB" does not contain the table ""ODRS"."dbo"."mytbl"". The table either does not exist or the current user does not have permissions on that table.

what's wrong with this, pls advice

thanks

kt

srimami
Posting Yak Master

160 Posts

Posted - 2013-02-14 : 18:02:13
While creating linked server, the product catalogue has added Database COST but not ORDS. Either create another linked server with ORDS database or add this database to the existing connection.
Go to Top of Page

Bustaz Kool
Master Smack Fu Yak Hacker

1834 Posts

Posted - 2013-02-14 : 18:45:49
How are you defining security for the linked server? It sounds like the security context used by the linked server does not have rights to the ORDS database.

=================================================
There are two kinds of light -- the glow that illuminates, and the glare that obscures. -James Thurber
Go to Top of Page

kt
Yak Posting Veteran

88 Posts

Posted - 2013-02-19 : 15:09:45
i didn't created the links, where i can look at to see if the DB is tied to this sever?
Go to Top of Page

Bustaz Kool
Master Smack Fu Yak Hacker

1834 Posts

Posted - 2013-02-19 : 16:26:53
From the Object Explorer pane in SSMS: Server Objects->Linked Servers. Right click the linked server in question, select Properties and click on Security. Do you have Login Mappings defined (top)? Which of the four radio buttons (bottom) is selected? If the last one, note which Login/Password is defined. You don't need to tell us what the Login/Password combination is, clearly, but see if you can use those credentials at the target server and gain access to the desired database. Let us know and we'll work through the details.

=================================================
There are two kinds of light -- the glow that illuminates, and the glare that obscures. -James Thurber
Go to Top of Page
   

- Advertisement -