How to Delete a Tablespace

From: Don Erickson <derickso_at_garden.csc.calpoly.edu>
Date: Wed, 05 Jan 94 00:03:19 GMT
Message-ID: <1994Jan05.000319.10708_at_rat.csc.calpoly.edu>


Sorry, I failed to mention I'm working with V6 on a SunOS platform. I'll be migrating to V7 shortly, which is one reason I was trying to clean up.

My thanks for the many replies which got me looking in the right direction.

The tablespaces were used to teach a class in database design. I used 35 students per tablespace and each student created from 10 to 60 tables. While they were all variations on a common theme, students are creative (devious?). So I had no knowledge of how the things were structured.

The brute force method of dropping tables until the tablespace was empty did not work since several of the students had circular keys.

It was necessary to query dba_constraints to find all foreign keys and then use the "ALTER USER.TABLE DROP CONSTRAINT SYS_Cxxxxxxxxxx;" command to delete the constraint. After the constraints were dropped, the drop tablespace command worked as advertised.

Again, my thanks for the help.

Don Erickson Received on Wed Jan 05 1994 - 01:03:19 CET

Original text of this message