Топ-100
 
CerebroSQL

Logminer - user interface

Logminer is a mechanism for extracting data from Oracle database archived logs.

Main window -> DB -> Logminer UI

Oracle LogminerUI

Sequencing:

  • Enter the path to the folder with the archived logs in the "Archivelog directory" field.

If you expand the list, information is selected from v$parameter , not empty parameter values log_archive_dest_%

  • Press the "Get list file" button to get a list of files in the directory

  • In the list "The list of files in the directory" select the required logs to view the data

  • Press the "View data" button to load data from the log

Button "Stop logmnr" - close the dataset

"Reopen query" button - to reopen the data set

Query Tab - Query to view log data

Tab "Script" - the full text of the script for viewing the jarnal

Oracle logminerUI view data

Getting a list of files in a directory

-> Request to retrieve data <-

DECLARE
  pattern VARCHAR2 (1024): = $$FOLDER_PATH;
  ns VARCHAR2 (1024);
BEGIN
  DBMS_OUTPUT.ENABLE (1000000);
  SYS.DBMS_BACKUP_RESTORE.searchFiles (pattern, ns);
  FOR each_file IN (SELECT FNAME_KRBMSFT AS name FROM X$KRBMSFT) LOOP
      DBMS_OUTPUT.PUT_LINE (each_file.name);
  END LOOP;
END;

-----

Extracting data from logs

-> Request to retrieve data <-

begin DBMS_LOGMNR.ADD_LOGFILE (LOGFILENAME => '$$FILE_PATH', OPTIONS => DBMS_LOGMNR.ADDFILE); end;

/

begin DBMS_LOGMNR.START_LOGMNR (OPTIONS => DBMS_LOGMNR.DICT_FROM_ONLINE_CATALOG); end;

/

select * FROM v$logmnr_contents l;

-----