DBA Data[Home] [Help]

PACKAGE: SYS.DBMS_LOGMNR_D

Source


1 PACKAGE dbms_logmnr_d AS
2 --
3 --    PACKAGE NAME
4 --      dbms_logmnr_d
5 --
6 --    DESCRIPTION
7 --      This package contains Logminer Dictionary related procedures.
8 --      "build" is used to gather the logminer dictionary.
9 --
10 --      "set_tablespace" is used to alter the default tablespace of
11 --      Logminer tables.
12 --
13 --      BUILD
14 --      The logminer dictionary can be gathered
15 --      into a flat file (Logminer V1 behavior) or it can be gathered
16 --      into the redo log stream.
17 --
18 --      When creating a Flat File dictionary the procedure queries the
19 --      dictionary tables of the current database and creates a text based
20 --      file containing their contents. Each table is represented by
21 --      "pseudo" SQL statements. A description of the columns in a
22 --      table is created by a "CREATE_TABLE" line (one statement for
23 --      table). It contains the name, datatype and length for each
24 --      column. A "INSERT_INTO" statement is created for each row in a
25 --      selected table. It contains the values for each row. The file
26 --      is created in preparation of future analysis of databases
27 --      log files using the logminer tool.
28 --
29 --      When gathering the system dictionary into the logstream the procedure
30 --      queries the dictionary tables inserting the results into a special
31 --      set of Logminer Gather tables (SYS.LOGMNRG_*).  A side effect of
32 --      each query is that the resultant inserts cause redo to be generated.
33 --      Down stream processing can mine this redo to determine the contents
34 --      of this system's system dictionary at the time this procedure was
35 --      executed.
36 --
37 --      NOTE:  Database must be in "Archivelog Mode" and supplemental logging
38 --             must be enabled for this procedure to run
39 --
40 --      BUILD INPUTS
41 --      dictionary_filename - name of the dictionary file
42 --      dictionary_location - path to file directory
43 --      options - To explicitly indicate flat file or log stream destination.
44 --
45 --      BUILD EXAMPLE1
46 --      Creating a dictionary file as:
47 --                   /usr/ora/dict.ora
48 --      Complete syntax, typed all on one line:
49 --
50 --      SQL> execute dbms_logmnr_d.build('dict.ora',
51 --                                       '/usr/ora',
52 --                                       DBMS_LOGMNR_D.STORE_IN_FLAT_FILE);
53 --
54 --      BUILD EXAMPLE2
55 --      Creating a dictionary file as:
56 --                   /usr/ora/dict.ora
57 --      Logminer V1 syntax.
58 --
59 --      SQL> execute dbms_logmnr_d.build('dict.ora', '/usr/ora');
60 --
61 --      BUILD EXAMPLE3
62 --      Gathering a dictionary into the log stream
63 --      Complete syntax, typed all on one line:
64 --
65 --      SQL> execute dbms_logmnr_d.build('', '',
66 --                                          DBMS_LOGMNR_D.STORE_IN_REDO_LOGS);
67 --
68 --      BUILD NOTES
69 --      The dictionary gather should be done after all dictionary
70 --      changes to a database and prior to the creation of any log
71 --      files that are to be analyzed.
72 --
73 --
74 --      SET_TABLESPACE
75 --      By default all Logminer tables are created to use the SYSAUX
76 --      tablespace.  All users will find it desirable to alter Logminer
77 --      tables to employ an alternate tablespace.  Use this routine to
78 --      recreate all Logminer tables in an alternate tablespace.
79 --
80 --      SET_TABLESPACE INPUTS
81 --      new_tablespace         - a string naming a preexistant tablespace.
82 --
83 
84 STORE_IN_FLAT_FILE CONSTANT INTEGER := 1;
85 STORE_IN_REDO_LOGS CONSTANT INTEGER := 2;
86 MARK_SAFE_MINE_POINT  CONSTANT INTEGER := 8;
87 
88 PROCEDURE  build
89 		(dictionary_filename IN VARCHAR2 DEFAULT '',
90 		 dictionary_location IN VARCHAR2 DEFAULT '',
91                  options IN NUMBER DEFAULT 0);
92 
93 --
94 --
95 PROCEDURE set_tablespace( new_tablespace IN VARCHAR2 );
96 --
97 --
98 END dbms_logmnr_d; -- End Definition of package