本步使oracle具有logminer分析能力
加载utl_file_dir参数和生成dbms_logmnr_d.build 数据字典
SQL*Plus: Release 9.2.0.4.0 - Production on Fri Nov 26 10:08:10 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> connect / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 236000356 bytes
Fixed Size 451684 bytes
Variable Size 201326592 bytes
Database Buffers 33554432 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
SQL> alter system set utl_file_dir='/oraclebackup'; #没有加scope=spfile参数导致error
alter system set utl_file_dir='/oraclebackup'
*
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified
SQL> alter system set utl_file_dir = '/oraclebackup' scope=spfile;
System altered.
SQL> shutdown
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
[oracle@test7 dbs]$ sqlplus /nolog
SQL*Plus: Release 9.2.0.4.0 - Production on Fri Nov 26 10:52:49 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> connect / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 236000356 bytes
Fixed Size 451684 bytes
Variable Size 201326592 bytes
Database Buffers 33554432 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
SQL> execute dbms_logmnr_d.build('szdb7.ora',/oraclebackup'); #少打了一个’号的原因
ERROR:
ORA-01756: quoted string not properly terminated
SQL> execute dbms_logmnr_d.build ('szdb7.ora','/oraclebackup');
PL/SQL procedure successfully completed.
#其中'/oraclebackup'指的是字典信息文件的存放位置,它必须完全匹配UTL_FILE_DIR的值,例如:假设utl_file_dir = '/oraclebackup/',则上面这条语句会出错,只因为UTL_FILE_DIR后面多了一个“/”,而在很多其它地方对这一“/”是不敏感的。
查看本文来源