| Author |
Message |
SQLAdminCJ
Joined: 28 Dec 2011 Posts: 10
|
Posted: Fri Jun 22, 2012 9:36 pm Post subject: How to look up instance names and publisher databases |
|
|
Hey all,
I am writing a program using RedGate SQL Compare that syncs data between nodes in a transactional replication topology. In cases where there are more than 2 nodes, I need an automated way of creating pairings of SQL instance/database name so that I can sync all the links in the tree.
I believe this information is stored in the distribution database. I have found tables that contain the names of the publication database and subscription database (MSsubscriptions).
However, although publisher_id and subscriber_id are listed as fields, I don't see how I can use that to get the names of the SQL instances.
The MSsubscriber_info in the distribution database contains the SQL instance names of the publishers, but there is no ID column.
Does anyone know how I can obtain the publisher matched with the publication database? I would appreciate any advice anyone can give. Thanks. |
|
| Back to top |
|
 |
SQLAdminCJ
Joined: 28 Dec 2011 Posts: 10
|
Posted: Fri Jun 22, 2012 10:52 pm Post subject: |
|
|
| Someone helped me find the answer to this. The server names are listed in master.sys.servers. |
|
| Back to top |
|
 |
andy.campbell.smith
Joined: 20 Oct 2011 Posts: 124 Location: Red Gate Software
|
Posted: Mon Jun 25, 2012 12:53 pm Post subject: |
|
|
Glad to hear you found the answer to your question. Let us know if there's ever anything else you have a question about! _________________ Andy Campbell Smith
Red Gate Technical Support Engineer |
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group