程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> Oracle數據庫 >> Oracle教程 >> ORA-01336: specified dictionary file cannot be opened,ora-01336specified

ORA-01336: specified dictionary file cannot be opened,ora-01336specified

編輯:Oracle教程

ORA-01336: specified dictionary file cannot be opened,ora-01336specified


這篇介紹使用Logminer時遇到ORA-01336: specified dictionary file cannot be opened錯誤的各種場景

 

1:dictionary_location參數的路徑最後多了一個/符號。

 

SQL>  show parameter utl_file_dir;
 
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
utl_file_dir                         string      /u01/app/utl_file_dir
SQL> exec dbms_logmnr_d.build(dictionary_filename=>'logmin.ora', dictionary_location=>'/u01/app/utl_file_dir/',options=>dbms_logmnr_d.store_in_flat_file);
BEGIN dbms_logmnr_d.build(dictionary_filename=>'logmin.ora', dictionary_location=>'/u01/app/utl_file_dir/',options=>dbms_logmnr_d.store_in_flat_file); END;
 
*
ERROR at line 1:
ORA-01336: specified dictionary file cannot be opened
ORA-29280: invalid directory path
ORA-06512: at "SYS.DBMS_LOGMNR_INTERNAL", line 6003
ORA-06512: at "SYS.DBMS_LOGMNR_INTERNAL", line 6093
ORA-06512: at "SYS.DBMS_LOGMNR_D", line 12
ORA-06512: at line 1

 

如下所示,將dictionary_location的值從dictionary_location=>'/u01/app/utl_file_dir/' 改為=>'/u01/app/utl_file_dir'就會OK。

SQL> exec dbms_logmnr_d.build(dictionary_filename=>'logmin.ora', dictionary_location=>'/u01/app/utl_file_dir',options=>dbms_logmnr_d.store_in_flat_file);
 
PL/SQL procedure successfully completed.
 
SQL> 

 

2:隨意指定的dictionary_location,與參數utl_file_dir不一致。

 

這個純屬菜鳥犯的錯誤,沒有太多要說的。如下所示,你就知道這個是怎樣的一個場景:

SQL> exec dbms_logmnr_d.build(dictionary_filename=>'logmin.ora', dictionary_location=>'/u01/app/kkk',options=>dbms_logmnr_d.store_in_flat_file);
BEGIN dbms_logmnr_d.build(dictionary_filename=>'logmin.ora', dictionary_location=>'/u01/app/kkk',options=>dbms_logmnr_d.store_in_flat_file); END;
 
*
ERROR at line 1:
ORA-01336: specified dictionary file cannot be opened
ORA-29280: invalid directory path
ORA-06512: at "SYS.DBMS_LOGMNR_INTERNAL", line 6003
ORA-06512: at "SYS.DBMS_LOGMNR_INTERNAL", line 6093
ORA-06512: at "SYS.DBMS_LOGMNR_D", line 12
ORA-06512: at line 1
 
 
SQL> ! oerr ora 1336
01336, 00000, "specified dictionary file cannot be opened"
// *Cause: The dictionary file or directory does not exist or is inaccessible.
// *Action: Make sure that the dictionary file and directory exist and are
//          accessible.
 
 
SQL> show parameter utl_file_dir;
 
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
utl_file_dir                         string      /u01/app/utl_file_dir
SQL> 
 
SQL> exec dbms_logmnr_d.build(dictionary_filename=>'logmin.ora', dictionary_location=>'/u01/app/utl_file_dir',options=>dbms_logmnr_d.store_in_flat_file);
 
PL/SQL procedure successfully completed.
 
SQL> 

 

3:定義utl_file_dir 參數最好使用完整路徑,使用預定義環境變量會導致無法打開文件目錄

 

SQL> alter system set utl_file_dir='$ORACLE_BASE/log_mnr' scope=spfile;
 
System altered.
 
SQL> shutdown immediate;
SQL> startup;
 
SQL> exec dbms_logmnr_d.build(dictionary_filename=>'logmin.ora', dictionary_location=>'/u01/app/oracle/log_mnr',options=>dbms_logmnr_d.store_in_flat_file);
BEGIN dbms_logmnr_d.build(dictionary_filename=>'logmin.ora', dictionary_location=>'/u01/app/oracle/log_mnr',options=>dbms_logmnr_d.store_in_flat_file); END;
 
*
ERROR at line 1:
ORA-01336: specified dictionary file cannot be opened
ORA-29280: invalid directory path
ORA-06512: at "SYS.DBMS_LOGMNR_INTERNAL", line 6003
ORA-06512: at "SYS.DBMS_LOGMNR_INTERNAL", line 6093
ORA-06512: at "SYS.DBMS_LOGMNR_D", line 12
ORA-06512: at line 1

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved