Solved

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

Posted on 2006-11-15
8
259 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
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
getting error Subquery returned more  than 1 value 6 23
Find unused columns in a table 12 72
SQL Add Parameter in Variable 4 21
SQL query 7 16
Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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.

749 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