Red Gate forums :: View topic - How to look up instance names and publisher databases
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Comparison SDK 10
SQL Comparison SDK 10 forum

How to look up instance names and publisher databases

Search in SQL Comparison SDK 10 forum
Post new topic   Reply to topic
Jump to:  
Author Message
SQLAdminCJ



Joined: 28 Dec 2011
Posts: 10

PostPosted: Fri Jun 22, 2012 9:36 pm    Post subject: How to look up instance names and publisher databases Reply with quote

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
View user's profile Send private message
SQLAdminCJ



Joined: 28 Dec 2011
Posts: 10

PostPosted: Fri Jun 22, 2012 10:52 pm    Post subject: Reply with quote

Someone helped me find the answer to this. The server names are listed in master.sys.servers.
Back to top
View user's profile Send private message
andy.campbell.smith



Joined: 20 Oct 2011
Posts: 173
Location: Red Gate Software

PostPosted: Mon Jun 25, 2012 12:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic 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