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 2005 Forums
 Replication (2005)
 shoud I use replication?

Author  Topic 

emmett
Starting Member

4 Posts

Posted - 2007-08-08 : 11:03:04
Hi,

Shoud I use "replication" for my problem's solution and which type? Or shoud I solve my problem by using triggers? Or any other suggestions.

The problem is this:

There are two databases in the same server, A and B. These databases have same tables and objects. In any time, when a record has been inserted to a table in database A, that record must be inserted to same table in database B.
However, the opposite of this scenario is possible, too.


Thanks for yours' help.

(sorry for my english)

dinakar
Master Smack Fu Yak Hacker

2507 Posts

Posted - 2007-08-08 : 11:35:58
It would be one heck of a job to write triggers on each table, not to mention schema changes, double this for both databases.

Why would you need 2 exact copies of the database on the same server?

Dinakar Nethi
************************
Life is short. Enjoy it.
************************
http://weblogs.sqlteam.com/dinakar/
Go to Top of Page

miRa
Starting Member

3 Posts

Posted - 2007-08-13 : 04:18:31
i have 2 database in different server,A and B.i want to replicate each other so that they can share the data together.
now i want to change the publicator,A without losing any data in the database B.so now,the publicator would be C.
what should i do?

miRa
Go to Top of Page

dinakar
Master Smack Fu Yak Hacker

2507 Posts

Posted - 2007-08-13 : 11:33:03
quote:
Originally posted by miRa

i have 2 database in different server,A and B.i want to replicate each other so that they can share the data together.
now i want to change the publicator,A without losing any data in the database B.so now,the publicator would be C.
what should i do?

miRa



You need to disable replication between A <--> B and set it up again between B <--> C. Whether you lose data or not depends on the copy of database at C. If you take a back up of A after you disable replication between A,B and restore it on C and set it up from B <--> C, you should be fine.

Dinakar Nethi
************************
Life is short. Enjoy it.
************************
http://weblogs.sqlteam.com/dinakar/
Go to Top of Page

ashley.sql
Constraint Violating Yak Guru

299 Posts

Posted - 2007-08-13 : 11:54:44
Emmett

you can use merge replication for this.

check this out

http://www.databasejournal.com/features/mssql/article.php/1438231

its all gui and you can test it first with sample databases

Ashley Rhodes
Go to Top of Page

miRa
Starting Member

3 Posts

Posted - 2007-08-13 : 23:47:19
but,how can i disable the replication?there's no such function.for your information,i'm using sql server 2000.thanx..

miRa
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-08-14 : 22:38:58
Go to tools -> replication -> disable distribution and ... in em.
Go to Top of Page
   

- Advertisement -