
October 21st, 2004, 01:53 AM
|
 |
Contributing User
|
|
Join Date: Oct 2004
Location: Honolulu
Posts: 184
  
Time spent in forums: 20 h 29 m 2 sec
Reputation Power: 8
|
|
|
when you start replication it is running a script of SQL Commands to drop and create tables. If the commands appear out of order from the referrential integrity of the database you will get that error. IT means that you are trying to drop a table when there is a related table that has data in it. Such as a CUSTOMER table might have a relationship with an INVOICES table in the form of a "foreign key" where the customerId in the INVOICES table is keyed to the "foreign" field CUSTOMER.CustomerID. In this case you CANNOT drop CUSTOMER table if ANY related records exist in INVOICES. If you can look at the SQL Script you can move around your commands to FIRST drop INVOICES and then drop CUSTOMERS.
SQL Server scripting never has been good at producing them in a working order. You have to manually review the order of the statements with regard to your specific database.
|