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.

 All Forums
 SQL Server 2008 Forums
 Replication (2008)
 Identify Master and Slave

Author  Topic 

abhijittikekar
Starting Member

2 Posts

Posted - 2010-07-16 : 17:02:24
Hi,

I have a rather simple question. In Mysql, I can do show variables like '%server%' and confirm a database as a master if it's id is 1.

How can I achieve this in Sql Server? Is there any query which can tell me if the database is a Master or a Slave.

Thanks

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-07-16 : 17:29:14
What is meant by "master" or "slave" in MySql? We have system databases in SQL Server, but they have names that don't change so it's easy to know which ones are which (master, model, msdb, tempdb, distribution).

Are these terms perhaps used for replication? Or maybe mirroring?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

abhijittikekar
Starting Member

2 Posts

Posted - 2010-07-17 : 14:30:08
Hi,

My apologies for the confusion.

In MySql, a Master would be the database which would hold the original data being entered, like a Production database. Now, a slave would be the one to which the data is replicated from the master. Anything entered manually directly into the slave would break the replication. Is it similar in Sql Server too?

I guess in SQL Server, we have the concept of subscriber.

Thanks,
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-07-17 : 15:42:56
You can do that with replication, and yes it would be a publisher and a subscriber. There's also a distributor, which is the one responsible for moving the data between them.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

dmaxj
Posting Yak Master

174 Posts

Posted - 2010-07-25 : 22:40:38
Hmmm - I figure that in using Merge Replication, if anything is manually entered into the slave (subscriber) that the master (publisher) would be updated too.

Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-07-26 : 13:54:37
it is, but you didn't specify what kind of replication you wanted to achieve.

it could be that you want peer to peer.

See here: http://msdn.microsoft.com/en-us/library/ms151198.aspx to get you started
Go to Top of Page
   

- Advertisement -