Databases
cancel
Showing results for 
Search instead for 
Did you mean: 

Several problems with "DROP" statement

Enrico Venturi
Super Advisor

Several problems with "DROP" statement

Hello colleagues,
when I try to drop some tablespace I get the following error:
who can help me?

DROP TABLESPACE data INCLUDING CONTENTS CASCADE CONSTRAINTS
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-01555: snapshot too old: rollback segment number 2 with name "R01" too
small



Tablespace altered.


Tablespace altered.

DROP TABLESPACE index_t INCLUDING CONTENTS CASCADE CONSTRAINTS
*
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



Tablespace altered.

ALTER TABLESPACE rbs OFFLINE
*
ERROR at line 1:
ORA-01546: tablespace contains active rollback segment 'R01'


DROP TABLESPACE rbs INCLUDING CONTENTS CASCADE CONSTRAINTS
*
ERROR at line 1:
ORA-01546: tablespace contains active rollback segment 'R01'
3 REPLIES
Graham Cameron_1
Honored Contributor

Re: Several problems with "DROP" statement

You have a number of different problems.

First of all are you sure you want to drop these tablespaces, they seem to contain things your database needs.

Better to check the contents of each tablespace first and confirm you can live without them.

Next I would suggest you identify and truncate each table in the 'data' tablespace before attempting to drop it.

You will need to identify and drop any constraints supported by indexes within 'index_t' before you can drop it.

You will need to take offline and drop all rollback segments inside tablespace 'rbs' before you can drop it. You will also need to take them out of your init.ora before you can take down your database and bring it back.

Good luck

-- Graham
Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.
Christian Gebhardt
Honored Contributor

Re: Several problems with "DROP" statement

Hi
This are 3 different problems:
1) use bigger rollback segments
If you have a big rollback segement:
alter system set transaction use rollback segment ;
drop tablespace ...
If not create one: create rollback segement ...

2) You cannot drop an index used by a primary key, you have to disable the primary key first.

3)You cannot drop an active rollback segement, set all rollback segments in the tablespace offline and drop the tablespace.
remember: You always need at least one rollbacksegement !!!

Chris

Yogeeraj_1
Honored Contributor

Re: Several problems with "DROP" statement

hi,

to add to the above replies...

A few notes about Rollback segments.

1. never use optimal.

2. Put a rollback segment in a tablespace all by itself.
have 1 datafile in this tablespace.
let it autoextend to some maxsize.

When you notice they have grown, offline them, drop them, resize the datafile back down, and recreate them.
Then try to figure out WHY they had to grow.

You never want them to grow.
You should beforehand sized them to be the right size.

3. Use lots of same sized RBS's

Regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)