Delete from DBA_TABLESPACES where tablespace_name = ...

    I saw somebody execute the delete statement on DBA_TABLESPACES directly without using drop tablespace statement by mistake. Non of us hit this issue before, so it's very hard to give him an answer. Today I test it on my personal database (10g version).

SQL> delete from dba_tablespaces where tablespace_name='USERS';

1 row deleted.

SQL> commit;

Commit complete.

SQL> alter system checkpoint;

System altered.

    I decide to restart the database because I am worrying about whether I can open the database. But lucky I open the database without any error, but get ORA-600 error when I try to query the table in that tablespace.

SQL> select * from anysql.emp;
select * from anysql.emp
                     *
ERROR at line 1:
ORA-00600: internal error code, arguments: [5119], [], [], [], [], [], [], []

    I find out the deleted row with AUL software, and then load it into sys.ts$ table, and restart the database successfully. Everything is fine now, no errors when I query that table again. But of cause, you should not make this kind of mistake.

Comments (1)

Dandy!

Post a comment

SCode:
Mail(*, but will not be displayed):
Home: