I was getting the following error:
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
SQL> drop user ambrish cascade; drop user ambrish cascade * ERROR at line 1: ORA-00604: error occurred at recursive SQL level 1 ORA-00942: table or view does not exist
SQL> create user abc 2 identified by abc; identified by abc * ERROR at line 2: ORA-04045: errors during recompilation/revalidation of SYS.CDC_CREATE_CTABLE_BEFORE ORA-06508: PL/SQL: could not find program unit being called ORA-06512: at line 2 ORA-06508: PL/SQL: could not find program unit being called ORA-06512: at line 2
When you drop any object or user, the Oracle database does a ton of work behind the scenes, mainly to update the data dictionary. The data dictionary is really nothing more than database tables. And how else do you interact with database tables but the SQL language?!?! So when you issue a DROP USER command, the system issues SQL statements on your behalf. These SQL statements are called "recursive SQL". Unfortunately, you can't see these recursive SQL statements in SQL*Plus to find out which SQL statement is having the problem. But you can easily set up a trace, which will show you all of the recursive SQL statements. So try the following:
ALTER SESSION SET sql_trace=TRUE; DROP USER my_user CASCADE; ALTER SESSON SET sql_trace=FALSE;
For other advice, make sure that when your run CATALOG and CATPROC, that you are connected as SYS.
For More Information
- Dozens more answers to tough Oracle questions from Brian Peasland are available.
- The Best Oracle Web Links: tips, tutorials, scripts, and more.
- Have an Oracle or SQL tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize. Submit your tip today!
- Ask your technical Oracle and SQL questions -- or help out your peers by answering them -- in our live discussion forums.
- Ask the Experts yourself: Our SQL, database design, Oracle, SQL Server, DB2, metadata, object-oriented and data warehousing gurus are waiting to answer your toughest questions.
Dig Deeper on Oracle database design and architecture
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.