"DROP USER" fails with error: ORA-00942 and ORA-00604 (一)
今天同事遇到一個問題,他在drop table和drop user的時候都報了同一個錯誤:
SQL> drop user testb;
drop user testb
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-00942: table or view does not exist
ORA-06512: at line 7
我還頭一次遇到這個問題,本以為是應用程式導致的,但是後來想了想,那個是在drop user的時候才會報的錯誤。
metalink一查,找到了2篇文章,version不同,trace出來的內容也不同:
"DROP USER" fails with error: ORA-00942 and ORA-00604 [ID 269469.1]
--------------------------------------------------------------------------------
修改時間 04-MAY-2010 型別 PROBLEM 狀態 PUBLISHED
修改時間 04-MAY-2010 型別 PROBLEM 狀態 PUBLISHED
--------------------------------------------------------------------------------
Applies to:
Oracle Server - Enterprise Edition - Version: 8.1.5.0 to 9.2.0.1 - Release: 8.1.5 to 9.2
Information in this document applies to any platform.
Oracle Server - Enterprise Edition - Version: 8.1.5.0 to 9.2.0.1 - Release: 8.1.5 to 9.2
Information in this document applies to any platform.
Symptoms
The command "DROP USER" fails with error: ORA-00942 and ORA-00604
The command "DROP USER" fails with error: ORA-00942 and ORA-00604
1. For example:
SQL> drop user testb;
drop user testb
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-00942: table or view does not exist
ORA-06512: at line 7
drop user testb
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-00942: table or view does not exist
ORA-06512: at line 7
2. Cause
Table SDO_GEOM_METADATA_TABLE (part of Oracle Spatial) not present in the DB.
Table SDO_GEOM_METADATA_TABLE (part of Oracle Spatial) not present in the DB.
3. exec
This can be confirmed the doing the following:
alter session set sql_trace=true;
--OR--
alter session set events'10046 trace name context forever,level 4';
drop user cascade;
alter session set sql_trace=false;
4. check trace file
The error tracefile will contain the failing statement.
For example:
ORA-00942: table or view does not exist
Current SQL statement for this session:
DELETE FROM SDO_GEOM_METADATA_TABLE WHERE SDO_OWNER = 'TESTA' Solution
Current SQL statement for this session:
DELETE FROM SDO_GEOM_METADATA_TABLE WHERE SDO_OWNER = 'TESTA' Solution
5. Run the script. catmd.sql
(located in $ORACLE_HOME/md/admin dir).
The catmd.sql script. is the script. that loads all objects needed by Oracle Spatial in the database. Then drop the user.
(located in $ORACLE_HOME/md/admin dir).
The catmd.sql script. is the script. that loads all objects needed by Oracle Spatial in the database. Then drop the user.
參考文獻:
1. "DROP USER" fails with error: ORA-00942 and ORA-00604 [ID 269469.1]
2. Dropping a User Results in ORA-942 against SDO_GEOM_METADATA_TABLE [ID 303975.1]
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9252210/viewspace-696140/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- "DROP USER" fails with error: ORA-00942 and ORA-00604 (二)AIError
- maridb Error 'Operation DROP USER failed forErrorAI
- Oracle中drop user和drop user cascade的區別Oracle
- ora-00604 ora-00942 問題處理<轉>
- Drop Table Fails With ORA-600 [15264]AI
- 【故障處理】Bug : ASM FAILS WITH CHECKRESOURCE ERROR ERROR CODE = 139ASMAIError
- Drop Table Fails With ORA-600 [15264] [ID 338953.1]AI
- mysql中delete fro mysql.user where XX和drop user的不同MySqldelete
- Connection to x as user y failed: ERROR: Wrong password for userAIError
- drop物化檢視log表導致insert、delete、update報ORA-00942delete
- 資料庫審計(create/alter/drop table、user、tablespace)資料庫
- DROP USER過程中出現的奇怪的物件資訊物件
- ORACLE下使用者無法順利刪除問題處理一則-ORA-00604和ORA-00942錯誤Oracle
- Error accessing PRODUCT_USER_PROFILEError
- from v * ERROR at line 1: ORA-00942: table or view does not existErrorView
- drop user 報ORA-03113 問題處理
- DataPump Export (EXPDP) Fails With Error LPX-216 Invalid CharacterExportAIError
- Autoconfig On Db Tier Fails With Error - SP2-1503AIError
- 【問題處理】使用者無法順利刪除問題處理一則-ORA-00604和ORA-00942錯誤
- Unable To Mount Or Drop A Diskgroup, Fails With Ora-15032 And Ora-15063_353423.1AI
- ERROR 1045 (28000): Access denied for userError
- oracle多使用者使用同一個表空間_drop user cascade的影響Oracle
- Error: User gpmon is not allowed to login Command CenterError
- 案例學習Oracle錯誤: ORA-00604 error occurred at recursive SQL level stringOracleErrorSQL
- Oracle OCP 1Z0-053 Q85(DROP USER CASCADE)Oracle
- oracle10g中drop user造成ORA-07445 core dumpOracle
- GTID複製報錯處理:Last_Error: Error 'Can't drop database 'test';ASTErrorDatabase
- Error: User gpmon is not allowed to login Command Center.Error
- ERROR 1045 (28000): Access denied for user 'root'@'localhost'Errorlocalhost
- Error 1045(28000) Access Denied for user 'root'@'localhost'Errorlocalhost
- 手動建庫時一個錯誤:Error accessing PRODUCT_USER_PROFILEError
- 【問題處理】Error accessing PRODUCT_USER_PROFILE錯誤一例Error
- Fails to Start: PMON (ospid: nnnn): terminating the instance due to error 481AIError
- EM GC11.1.0.1 Agent Startup on AIX Fails with Error: nmectl_validate_1386861.1GCAIError
- adcfgclone.pl appsTier fails with error AC-50207GCAPPAIError
- tidb Error: Operation aborted by user answer '' (cliutil.operation_aborted)TiDBError
- Mysql:ERROR 1045 (28000): Access denied for user 'root'@'localhost'MySqlErrorlocalhost
- DBLOGIN ERROR: Failed to open data source for user OGG.ErrorAI