Cannot drop table 
Author Message
 Cannot drop table

Using SQL Server 10.0.2 in AIX 3.2.5.

Changes on a table "a_tbl" required the table to be dropped and recreated
in "a_db".  The table was being referenced by "b_tbl"  
from "b_db" through a declarative referential integrity foreign
key constraint "fk_1".  

The batch script created to do the table change by the "sa" had:

step 1      use a_db
               go

step 2      alter table b_db..b_tbl drop constraint fk_1
               go

step 3      drop table a_tbl
               go

<other steps>

Step 3 above would not succeed even though "a_tbl" did not have any foreign
reference on the primary key after step 2.  By the
way, step 1 should have been "use b_db" and there should have been "use
a_db" before step 3.  But step 2 will still work ok as shown above.

Even if the steps above are performed again with step 1 corrected to point
to "b_db" the corruption on sysrefererences due to the initial operation
would not let the "a_tbl" to be dropped anymore.

Has anyone encountered this before ?

There are several ways to fix the problem after this corruption.



Fri, 10 Jul 1998 03:00:00 GMT
 
 [ 1 post ] 

 Relevant Pages 

1. Cannot drop table (table created by MS-Access)

2. Cannot drop table

3. Cannot drop table

4. cannot drop table for replication

5. Cannot drop table

6. Cannot Drop Table

7. cannot drop table for replication

8. Cannot drop table "CURRENT"

9. Help: cannot drop table

10. help: cannot drop table

11. snapshot distribution returns "cannot drop table"

12. central subscriber, cannot drop table ...


 
Powered by phpBB® Forum Software