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 Server Security issue, or misconfig?

Author  Topic 

youruseridistoxic
Yak Posting Veteran

65 Posts

Posted - 2009-03-30 : 10:28:16
Someone in our organization requires some data be replicated from 1 SQL server to another. I'd like to set this up as a regularly scheduled job.

Both servers are running SQL 2K5, 64bit.

I have configured the remote server using the following;

EXEC sp_addlinkedserver @server='SQLSRVR2'
, @srvproduct=''
, @provider='SQLOLEDB'
, @datasrc='SQLSRVR2'


However, if I execute this query;

select * from SQLSRVR2.dbo.Table1.TKID

I receive the following error;

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


Remote logins are enabled on SQLSRVR2.

The current login and the remote login are both the same (SQL authentication in use on both servers, userid & passwords match), so I'm stuck on what I've missed.

Is there something obvious I may have overlooked? Thanks to all who respond!

Thx

ashishashish
Constraint Violating Yak Guru

408 Posts

Posted - 2009-03-30 : 10:37:38
May Be this gonna help uu........
but not sure what u want but may be ,,,

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=117557&SearchTerms=linked,server

Thanks..
Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2009-03-30 : 10:38:42
select * from SQLSRVR2.<databasename>.dbo.TKID perhaps? The syntax for linked servers is:

<linkedserver>.<databasename>.<schema>.<tablename>
Go to Top of Page

youruseridistoxic
Yak Posting Veteran

65 Posts

Posted - 2009-03-30 : 10:46:41
quote:
Originally posted by RickD

select * from SQLSRVR2.<databasename>.dbo.TKID perhaps? The syntax for linked servers is:

<linkedserver>.<databasename>.<schema>.<tablename>



Bingo. I'm an idiot.

Thank you very much!
Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2009-03-30 : 11:49:54
No problem, it is Monday after all.
Go to Top of Page
   

- Advertisement -