Wrox Programmer Forums
|
SQL Server 2005 General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 17th, 2007, 05:54 AM
Authorized User
 
Join Date: Sep 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Merge Replication problem

Hi , i have a problem with merge replication

when i create and define publication and subscription
at first synchronization the snapshot agent fail and make the following error :

"can not drop table dbo.stock table referenced foreign key constraint"

what should i do?!

thanks

To be want to is to be able to.
Thanks , Best wishes

Shahab
__________________
To be want to is to be able to.
Thanks , Best wishes

Shahab
 
Old September 26th, 2007, 02:01 PM
SQLScott's Avatar
Wrox Author
 
Join Date: Dec 2004
Posts: 338
Thanks: 0
Thanked 2 Times in 2 Posts
Default

There are several reasons why this could be. On the properties for the stock table article, do you have it set to delete the table first? Also try re-initializing the subscription when you create the snapshot.

Also, is this a new pubication and does the database already exist on the subscriber?

Scott Klein
Author - Professional SQL Server 2005 XML
http://www.wrox.com/WileyCDA/WroxTit...764597922.html
 
Old September 30th, 2007, 03:01 AM
Authorized User
 
Join Date: Sep 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

yes i put the properties to delete and the database also exists on the subscriber

To be want to is to be able to.
Thanks , Best wishes

Shahab
 
Old October 2nd, 2007, 03:39 PM
SQLScott's Avatar
Wrox Author
 
Join Date: Dec 2004
Posts: 338
Thanks: 0
Thanked 2 Times in 2 Posts
Default

It seems to be trying to delete the stock table and can't because it is being referenced in a relationship to another table somewhere. SQL sometimes messes up dependencies and doesn't do things in quite the right order.

Check your dependencies and make sure they are correct. You can also try setting the table to NOT delete just as a temporary work-around.



Scott Klein
Author - Professional SQL Server 2005 XML
http://www.wrox.com/WileyCDA/WroxTit...764597922.html





Similar Threads
Thread Thread Starter Forum Replies Last Post
Merge Replication using Web Sync Error wangjt18 SQL Server 2005 1 May 6th, 2008 04:54 AM
Problem in merge replication ocaliptoos SQL Server 2000 1 July 27th, 2006 02:53 PM
Merge Replication Metadata cleanup MSDE? dhay1999 SQL Server 2000 0 February 14th, 2005 02:52 PM
Merge Replication Problem sowdens SQL Server 2000 0 December 8th, 2003 09:36 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.