?
Solved

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

Posted on 2006-11-15
8
Medium Priority
?
266 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
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

650 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