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.
| 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.TKIDI receive the following error;Msg 7314, Level 16, State 1, Line 1The 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 |
|
|
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> |
 |
|
|
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! |
 |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2009-03-30 : 11:49:54
|
No problem, it is Monday after all. |
 |
|
|
|
|
|
|
|