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 |
|
ramhardikar
Starting Member
1 Post |
Posted - 2001-12-11 : 06:32:11
|
| Hi, We are trying to replicate a database from one server to another server. The situation is as follows : Our publication database is DB1. We restored this database on another server with all the data and relationships and constraints as database DB2. Now when I tried to replicated the data from DB1 onto DB2 (Snapshot as well as Transactional Replication), I'm getting an error during replication. I think for transactional replication, any new inserts, updates or deletes on tables on DB1 should be reflected on DB2 when DB1 is replicated on to DB2 but we are getting an error "Unable to drop table due to foreign key constraints".When we tried to replicate DB1 without restoring the database on the subscriber server, the data from DB1 was replicated on the subscriber server minus the constraints and relationships among the tables.Is it possible to replicate data from one database to another identical database which has all the constraints and relationships that are there on the publication database? Thanks in advance |
|
|
KnooKie
Aged Yak Warrior
623 Posts |
Posted - 2001-12-11 : 08:35:53
|
| Part of the replication process is removing the keys from the tables which ensures the subscriber end cannot 'mess' with any data. It is meant to be this way. I'm assuming you're replication is unidirectional. I don't think you can do what you are trying although you could try removing the keys once you have restored the database to db2 and see what happens. You could also try replicating as normal and then applying scripts to db2 to add constraints etc. never tried it but you never know ? |
 |
|
|
|
|
|