萬盛學電腦網

 萬盛學電腦網 >> 數據庫 >> oracle教程 >> oracle數據庫提示ORA-01129錯誤

oracle數據庫提示ORA-01129錯誤

   數據庫版本

 代碼如下  


SQL> select * from v$version;
 
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE    11.2.0.4.0      Production
TNS for HPUX: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production

  報ORA-01129錯誤

 代碼如下  

SQL> create index SERIVCE.ind_xifenfei on SERVICE.t_user(create_date);
create index SERIVCE.ind_xifenfei on SERVICE.t_user(create_date)
                                         *
ERROR at line 1:
ORA-01129: user's default or temporary tablespace does not exist

  查詢表空間信息

 代碼如下  

SQL> select TABLESPACE_NAME,CONTENTS,STATUS from dba_tablespaces where TABLESPACE_NAME in ('SERVICE','TEMP');
 
TABLESPACE_NAME                CONTENTS  STATUS
------------------------------ --------- ---------
SERVICE                        PERMANENT ONLINE
TEMP                           TEMPORARY ONLINE

  通過分析,證明相關的表空間都存在,進一步檢查sql語句,發現SERVICE被錯誤的書寫為了SERIVCE,檢查SERIVCE用戶.

 代碼如下   SQL> select count(*) from dba_users where username='SERIVCE';
 
  COUNT(*)
----------
         0

  通過分析,可以知道是因為index對應的用戶不存在,從而出現了ORA-01129的錯誤,按道理應該報ORA-01918,而不是ORA-01129.查詢MOS發現Bug 17058847 Creating index in non existing schema results in ORA-1129 and not ORA-1918

oracle數據庫提示ORA-01129錯誤 三聯
copyright © 萬盛學電腦網 all rights reserved