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 |
istock1
Starting Member
4 Posts |
Posted - 2008-01-07 : 15:24:56
|
All,I am trying to create a stored procedure that will compare the number of rows in each table (using the sysindexes table) in one database with the number of rows in each table in another database on a different server. Does anyone know if this is possible? I have tried using three-level names (server.db.sysindexes) with no luck...Thanks! |
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2008-01-07 : 15:34:08
|
you have to set up linked servers and use 4 part naming convention:server.database.owner.table_______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenpSSMS Add-in that does a few things: www.ssmstoolspack.com <- new version out |
 |
|
istock1
Starting Member
4 Posts |
Posted - 2008-01-07 : 16:39:30
|
Spirit,Thank you for the quick response. Could you explain how to set up linked servers, or at least point me in the right direction?Thanks again! |
 |
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2008-01-07 : 16:49:06
|
[url="http://msdn2.microsoft.com/en-us/library/aa213778(SQL.80).aspx"]Configuring Linked Servers[/url]_______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenpSSMS Add-in that does a few things: www.ssmstoolspack.com <- new version out |
 |
|
|
|
|