ORA-01336: specified dictionary file cannot be opened

简介: 这篇介绍使用Logminer时遇到ORA-01336: specified dictionary file cannot be opened错误的各种场景   1:dictionary_location参数的路径最后多了一个/符号。

这篇介绍使用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

相关文章
|
存储 算法 Python
Crystallographic Information File
Crystallographic Information File(CIF)是一种用于存储晶体结构信息的标准文件格式,通常用于存储X射线衍射、中子衍射、电子衍射等晶体结构分析的数据。CIF文件包含了晶胞参数、原子坐标、晶体对称性等结构信息,是进行晶体结构分析和制备的基础数据。
516 1
|
数据库
ORA-01113: file 1 needs media recovery ORA-01110: data file 1:
把下面两个隐含参数加入到pfile中
243 0
|
SQL 关系型数据库 Oracle
ORA-01466: unable to read data - table definition has changed
1. Oracle建议我们等待大约5分钟之后再进行flashback query新创建的表,否则可能会碰到这个错误ORA-01466: unable to read data - table definition has changed.
1791 0
ORA-09925: Unable to create audit trail file
ORA-09925: Unable to create audit trail file
150 0
|
关系型数据库 数据库管理 Oracle
|
机器学习/深度学习 Oracle 关系型数据库