Microsoft KB Archive/236308

= BUG: Drop Table on Referencing Table After Restarting Server Fails =

Article ID: 236308

Article Last Modified on 10/3/2003

-

APPLIES TO


 * Microsoft SQL Server 6.5 Service Pack 2

-



This article was previously published under Q236308



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 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.

Keywords: kbbug kbpending KB236308

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.