Note that there is no need to run the script to create Logminer in 9i, Logminer has been created.
The following is a description of the commonly-described paragraph meaning of view v$logmnr_contents:
Name meaning
----------------------- -------- --------------------------------------------
System change number for SCN specific data changes
TIMESTAMP the time when data changes occur
Commit_timestamp data to change the time of submission
Seg_owner the name of the segment where the data has changed
Owner name of Seg_name segment
Seg_type the type of segment in which data has changed
Seg_type_name the segment type name that the data has changed
Table spaces for Table_space change segments
ROW_ID the ID of a specific data-changing row
Session_info user process information when data is changed
OPERATION the action recorded in the redo record (for example, insert)
Sql_redo can redo an SQL statement that specifies row changes for the record.
Sql_undo can redo or redo SQL statements that specify row changes
First, add an initialization parameter Utl_file_dir to the init file to indicate where the data dictionary files are generated
Utl_file_dir = (E:/oracle/logminer)
Since my Oracle startup is using SPFile, first start the database with
Startup pfile= ' E:/oracle/admin/nbxtdb/pfile/init.ora '
After startup, use
Create SPFile from pfile= ' E:/oracle/admin/nbxtdb/pfile/init.ora ';
Generating SPFile files
Restart after shutting down the database
Startup
And then run
Show parameter utl see if the settings are correct
Sql> Show parameter utl;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
Utl_file_dir string E:/oracle/logminer
Correct, insert data into table Jqg_test
INSERT INTO Jqg_test valus (' Logminer ');
Commit
Sql>alter system switch logfile; Switch Log Generation Archive
2. Create a dictionary
sql> EXECUTE dbms_logmnr_d.build (' Dictionary.ora ',-
' E:/oracle/logminer ',-
OPTIONS => dbms_logmnr_d.store_in_flat_file);
3. Add archived files that need to be monitored
EXEC dbms_logmnr.add_logfile (logfilename=> ' e:/oracle/oradata/nbxtdb/archive/1_114.dbf ', Options=>dbms_ Logmnr.new);
4. Initialize views through time
EXECUTE DBMS_LOGMNR. START_LOGMNR (dictfilename => ' E:/oracle/logminer/dictionary.ora ', StartTime => TO_DATE (' 2004-06-25 23:12:00 ', ' Yyyy-mm-dd HH24:MI:SS '), Endtime => to_date (' 2004-06-25 23:20:00 ', ' yyyy-mm-dd HH24:MI:SS '));
5. Query View V$logmnr_contents
Sql> Select Sql_redo,sql_undo from v$logmnr_contents where seg_name= ' jqg_test '
2 and seg_owner= ' TEST ' and seg_type_name= ' TABLE ';
Sql_redo
--------------------------------------------------------------------------------
Sql_undo
--------------------------------------------------------------------------------
INSERT INTO "TEST". Jqg_test "(" NAME ") VALUES (' Logminer ');
Delete from "TEST". " Jqg_test "where" NAME = ' logminer ' and ROWID = ' aaahgpaahaaaaagaae ';