Solved

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

Posted on 2006-11-15
8
257 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
  • 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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
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 500 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Syntax 5 33
Run SQL Server Proc from Access 11 27
How To Convert Date Stored as Varchar as an MSSQL DATE Type Field In a VIEW 3 20
Tsql query 6 18
I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

816 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now