BUG: Drop Table on Referencing Table After Restarting Server Fails

ID: Q236308


The information in this article applies to:
  • Microsoft SQL Server version 6.5 Service Pack 2 and later

BUG #: 18654 (SQLBUG_65)

SYMPTOMS

After unpublishing a database that contains tables previously published, subsequent Drop Table commands fail with the following error:

Error: Msg 3724, Level 16, State 1
Cannot drop the table 'dbo.table_name' because it is published for replication.
This problem occurs only if SQL Server has been restarted prior to unpublishing and dropping the tables.


WORKAROUND

Run sp_MSunpublish_db against the database.


STATUS

Microsoft has confirmed this to be a problem in SQL Server version 6.5.


MORE INFORMATION

If a set of tables have Foreign Key Constraints and were previously published, dropping the referencing tables using the Drop Table command incorrectly sets the published bit in sysobjects.category for the referenced table. This causes the Drop Table command on the referenced tables to fail with the above error.

Sp_MSunpublish_db can be obtained from ftp://ftp.microsoft.com/Softlib/MSLFiles/Sqlunpub.exe.

Additional query words:

Keywords :
Version : winnt:6.5 Service Pack 2 and later
Platform : winnt
Issue type : kbbug


Last Reviewed: August 30, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.