?
Solved

implementing Merge Replication issues --- cannot drop...foreign keys

Posted on 2006-11-15
8
Medium Priority
?
263 Views
Last Modified: 2008-03-06
Hi,
while trying to initialize merge replication (pull) I am getting errors due to the foreign keys--- is there any way to get this to work without errors? This is a semi-urgent matter
(sql2000)

Thanks
0
Comment
Question by:moruda
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 9

Expert Comment

by:dduser
ID: 17953596
Hi Moruda,

Can you give me exact errors, i believe you are not copying the relavent tables where the Primary Key are stored. If you don't do that at time of insertion of record it would not get the link.

Regards,

dduser
0
 

Author Comment

by:moruda
ID: 17953615
is there any way to setup the database on the pull subscriber without applying a script--rather doing it all at once---maybe like downloading a backup or something?
0
 

Author Comment

by:moruda
ID: 17953618
exact error is Could not drop object 'dbo.SystemCodes' because it is referenced by a FOREIGN KEY constraint.
0
Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

 
LVL 9

Expert Comment

by:dduser
ID: 17953627
I believe you use Transaction/Snaphshot Replication rather then Merge, only problem in this case is only one database would be taken as base to update information.

Regards,

dduser
0
 

Author Comment

by:moruda
ID: 17953664
let me explain what i did
we have a local database (which has many tables)
we took the local database and made a copy -- uploaded, backup/restore to the web server
not all tables are replicated as many are just for local and not necessary on web
web server is distributor and publisher for merge replication
we now want to merge (pull) from web server
0
 
LVL 9

Expert Comment

by:dduser
ID: 17953689
OK so that means your web server is the primary database where you will have all data. I suggest you create a Transaction Replication instead of Merge Replication.

Regards,

dduser
0
 

Author Comment

by:moruda
ID: 17953711
we need merge-- the data will be going both ways...only some tables are specific to the local system and were not included with the replication setup.
0
 
LVL 28

Accepted Solution

by:
imran_fast earned 2000 total points
ID: 17971404
Hi moruda,

When ever you are configuring replication change the defination for all foreign keys to Not for replication.
becasue may be the data for child table get replicated before the parent table. so the foreing keys will remain there but will not be considered when data is replicated.

Regards

Imran
0

Featured Post

Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question