DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: drop tablespace problem

  1. #1
    Join Date
    Sep 2006
    Posts
    114

    drop tablespace problem

    I have a test schema (NCL) with two tablespaces WIZDATA containing tables of test schema and WIZINDX for indexes
    Now these tablespaces are no longer required

    SQL> drop tablespace wizdata including contents and datafiles;
    drop tablespace wizdata including contents and datafiles
    *
    ERROR at line 1:
    ORA-02449: unique/primary keys in table referenced by foreign keys

    SQL> drop tablespace wizdata including contents;
    drop tablespace wizdata including contents
    *
    ERROR at line 1:
    ORA-02449: unique/primary keys in table referenced by foreign keys


    SQL> drop tablespace wizindx including contents and datafiles;
    drop tablespace wizindx including contents and datafiles
    *
    ERROR at line 1:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-02429: cannot drop index used for enforcement of unique/primary key

    SQL> drop user ncl cascade;

    User dropped.

    SQL> drop tablespace wizdata including contents and datafiles;

    Tablespace dropped.

    SQL> drop tablespace wizindx including contents and datafiles;

    Tablespace dropped.

    Now both of tablespaces have been droped after droping the schema NCL

    This is quite confusing for me
    Can anybody had encountered this problem?

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    becuase you had data spanning tablespaces and droppping one of them would have broken your foreign key constraints.

    Did you not read the error, the part where it told you EXACTLY what the problem was

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width