The DBMS_LOGMNR_D package contains two procedures:
|
See Also:
Oracle Database Utilities for information about using LogMiner and DBMS_LOGMNR for information on the package subprograms used in running a LogMiner session. |
This chapter contains the following topic:
|
Note: The LogMiner data dictionary consists of the memory data structures and the database tables that are used to store and retrieve information about objects and their versions. It is referred to as the LogMiner dictionary throughout the LogMiner documentation. |
You must have the role, EXECUTE_CATALOG_ROLE to use the DBMS_LOGMNR_D package.
| Procedure | Description |
|---|---|
|
Extracts the LogMiner dictionary to either a flat file or one or more redo log files |
|
|
Re-creates all LogMiner tables in an alternate tablespace |
This procedure extracts the LogMiner data dictionary to either the redo log files or to a flat file.
DBMS_LOGMNR_D.BUILD ( dictionary_filename IN VARCHAR2,
dictionary_location IN VARCHAR2,
options IN NUMBER);
Table 48-2 describes the parameters for the BUILD procedure.
Table 48-2 BUILD Procedure Parameters| Parameter | Description |
|---|---|
|
dictionary_filename |
Specifies the name of the LogMiner dictionary file. |
|
dictionary_location |
Specifies the path to the LogMiner dictionary file directory. |
|
options |
Specifies that the LogMiner dictionary is written to either a flat file (STORE_IN_FLAT_FILE) or the redo log files (STORE_IN_REDO_LOGS). |
To extract the LogMiner dictionary to a flat file, you must supply a filename and location.
To extract the LogMiner dictionary to the redo log files, specify only the STORE_IN_REDO_LOGS option. The size of the LogMiner dictionary may cause it to be contained in multiple redo log files.
The combinations of parameters used result in the following behavior:
This error is returned under the following conditions:
This error is returned under the following conditions:
UTL_FILE_DIR = /oracle/dictionary
After setting the parameter, you must shut down and restart the database for this parameter to take effect. If you do not set this parameter, the procedure will fail.
Be aware that the DDL_DICT_TRACKING option to the DBMS_LOGMNR.START_LOGMNR procedure is not supported for flat file dictionaries created prior to Oracle9i. If you attempt to use the DDL_DICT_TRACKING option with a LogMiner database extracted to a flat file prior to Oracle9i, the ORA-01330 error (problem loading a required build table) is returned.
In addition, supplemental logging (at least the minimum level) should be enabled to ensure that you can take advantage of all the features that LogMiner offers. See Oracle Database Utilities for information about using supplemental logging with LogMiner.
The following example extracts the LogMiner dictionary file to a flat file named dictionary.ora in a specified path (/oracle/database).
SQL> EXECUTE dbms_logmnr_d.build('dictionary.ora', - '/oracle/database/', - options => dbms_logmnr_d.store_in_flat_file);
Example 2: Extracting the LogMiner Dictionary to the Redo Log Files
The following example extracts the LogMiner dictionary to the redo log files.
SQL> EXECUTE dbms_logmnr_d.build( - options => dbms_logmnr_d.store_in_redo_logs);
By default, all LogMiner tables are created to use the SYSAUX tablespace. However, it may be desirable to have LogMiner tables use an alternate tablespace. Use this procedure to move LogMiner tables to an alternate tablespace.
DBMS_LOGMNR_D.SET_TABLESPACE( new_tablespace IN VARCHAR2);
| Parameter | Description |
|---|---|
|
new_tablespace |
A string naming a preexisting tablespace. To move all LogMiner tables to employ this tablespace, supply this parameter. |
|
See Also:
Oracle Database Concepts and Oracle Database SQL Reference for information about tablespaces and how to create them |
The following example shows the creation of an alternate tablespace and execution of the DBMS_LOGMNR_D.SET_TABLESPACE procedure.
SQL> CREATE TABLESPACE logmnrts$ datafile '/usr/oracle/dbs/logmnrts.f' SIZE 25 M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED; SQL> EXECUTE dbms_logmnr_d.set_tablespace('logmnrts$');
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26613085/viewspace-1064207/ ,如需转载,请注明出处,否则将追究法律责任。