Home » SQL & PL/SQL » SQL & PL/SQL » Regarding DROP TABLE....
Regarding DROP TABLE.... [message #7722] Thu, 03 July 2003 00:12 Go to next message
K N Venkateswarlu
Messages: 2
Registered: July 2003
Junior Member
Hi Right now Im using Oracle9i. 20days back I have created a table "TEST_LT" by using "Enterprise Management Console". Ofcourse this is only for test purpose i have created this table by using this GUI. So when I have created this table automatically by default It have created 12 VIEWS. The View Names are,

TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
TEST VIEW
TEST_BASE VIEW
TEST_BPKC VIEW
TEST_CONF VIEW
TEST_DIF1 VIEW
TEST_DIF2 VIEW
TEST_DIFF VIEW
TEST_LOCK VIEW
TEST_LT TABLE
TEST_MW VIEW
TEST_MWB VIEW

TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
TEST_PKC VIEW
TEST_PKD VIEW

Now Im trying to dropping this TABLE by using DROP Statement.
But Its giving the following Errors.

SQL> DROP USER test CASCADE;
DROP USER test CASCADE
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-20031: All version enabled tables owned by 'TEST' must be disabled first.
ORA-06512: at "SYS.WM_ERROR", line 218
ORA-06512: at "SYS.WM_ERROR", line 235
ORA-06512: at "SYS.NO_VM_DROP_PROC", line 40
ORA-06512: at line 3

So, pls help me out how to DROP this table. Is there any changes I have to make?

Thanx in Advance.

Regards
Venkat.
Re: Regarding DROP TABLE.... [message #7743 is a reply to message #7722] Thu, 03 July 2003 16:19 Go to previous message
Barbara Boehmer
Messages: 9090
Registered: November 2002
Location: California, USA
Senior Member
You can't drop a user with version-enabled tables, so you need to disable the versioning on the table. Assuming that the name of your version-enabled table is test_lt, then:

EXECUTE DBMS_WM.DisableVersioning ('TEST_LT', TRUE);

to disable the versioning. Then you should be able to drop the table or the user or whatever you want to do. For a list of version-enabled tables:

SELECT owner, table_name
FROM all_wm_versioned_tables
WHERE state = 'VERSIONED';
Previous Topic: table created but cannot use select
Next Topic: CONSTRAINT leaks?
Goto Forum:
  


Current Time: Fri Apr 26 02:51:48 CDT 2024