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 |
|
KSS
Starting Member
1 Post |
Posted - 2007-01-10 : 10:50:36
|
| I have 2 databases that are identical but they are on 2 different servers. What I want to do is select from 2 tables (same tables, named the same ect..) and see if there are any missing rows from one table or the other.I know you can cross databases on the same server by DBName..Field but can you do this across servers?Thanks,KSS |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-01-10 : 10:56:17
|
You have to add second server as a linked server to the first one and then you can use it like: Select * from Server2.db2.dbo.Table2 Or you can make use of OPENDATASOURCE() rowset function to temporarily connect to remote machine. But do this only if you rarely access server2.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
|
|
|