分析資料庫日誌(LogMiner)
Logminer可以對歸檔日誌進行分析
1、查詢資料庫歸檔日誌序號
SQL>alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss';
SQL>select sequence#,first_time from v$log_history order by first_time desc;
2、確定要分析的日誌
SQL>select first_time,name from v$archived_log order by first_time desc;
3、使用logminer分析資料
SQL> execute dbms_logmnr.add_logfile(logfilename=>'D:\ORACLE\PRODUCT\10.2.0\ARCHIVELOG\XYHORCL\1_9_842540062.ARC',options=>dbms_logmnr.new);
4、啟動Logminer
SQL> execute dbms_logmnr.start_logmnr(options=>dbms_logmnr.dict_from_online_catalog);
5、把分析資料放入表並授權給普通使用者
SQL> create table logminer_20140320 as select * from v$logmnr_contents;
grant select on logminer_20140320 to scott;
6、結束LogMiner分析
SQL> execute dbms_logmnr.end_logmnr;
7、檢視分析日誌結果
SQL> select timestamp,sql_redo,sql_undo from sys.logminer_20140320 where seg_own
er='SCOTT' and sql_undo is not null;
1、查詢資料庫歸檔日誌序號
SQL>alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss';
SQL>select sequence#,first_time from v$log_history order by first_time desc;
2、確定要分析的日誌
SQL>select first_time,name from v$archived_log order by first_time desc;
3、使用logminer分析資料
SQL> execute dbms_logmnr.add_logfile(logfilename=>'D:\ORACLE\PRODUCT\10.2.0\ARCHIVELOG\XYHORCL\1_9_842540062.ARC',options=>dbms_logmnr.new);
4、啟動Logminer
SQL> execute dbms_logmnr.start_logmnr(options=>dbms_logmnr.dict_from_online_catalog);
5、把分析資料放入表並授權給普通使用者
SQL> create table logminer_20140320 as select * from v$logmnr_contents;
grant select on logminer_20140320 to scott;
6、結束LogMiner分析
SQL> execute dbms_logmnr.end_logmnr;
7、檢視分析日誌結果
SQL> select timestamp,sql_redo,sql_undo from sys.logminer_20140320 where seg_own
er='SCOTT' and sql_undo is not null;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29489498/viewspace-1125756/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- LOGMINER日誌分析
- logminer 日誌分析案例
- logminer是否可以分析從其他資料庫拷貝過來的日誌資料庫
- LogMiner日誌分析工具說明
- 使用logminer分析歸檔日誌案例
- Logminer日誌挖掘
- Logminer簡單分析日誌的實驗
- oracle 9i logminer日誌分析01Oracle
- 日誌分析logmnr (Logminer) 使用方法
- oracle logminer分析線上 離線日誌方法Oracle
- 分析Oracle資料庫日誌檔案(1)Oracle資料庫
- 分析Oracle資料庫日誌檔案(2)Oracle資料庫
- 分析Oracle資料庫日誌檔案(3)Oracle資料庫
- logminer抽取日誌案例
- ORACLE logminer 日誌挖掘Oracle
- oracle資料庫歸檔日誌量陡增分析Oracle資料庫
- 如何使用MySQL資料庫來分析Apache日誌?MySql資料庫Apache
- 分析Oracle資料庫日誌檔案(三)EPOracle資料庫
- 分析Oracle資料庫日誌檔案(二)DOOracle資料庫
- 分析Oracle資料庫日誌檔案(一)HBOracle資料庫
- 分析Oracle資料庫日誌檔案(1)(轉)Oracle資料庫
- 分析Oracle資料庫日誌檔案(1) [轉]Oracle資料庫
- 使用Logminer來分析具體的DML操作日誌
- logminer日誌挖掘技術
- ORACLE的日誌挖掘 logminerOracle
- logminer日誌挖掘操作步驟
- oracle資料庫mmnl日誌很大Oracle資料庫
- 清除SQL Server資料庫日誌SQLServer資料庫
- logminer異機挖掘歸檔日誌
- 日誌分析-apache日誌分析Apache
- 瀚高資料庫日誌挖掘方法資料庫
- 資料庫映象和日誌傳送資料庫
- SQL Server 檢視資料庫日誌SQLServer資料庫
- MySQL資料庫中的日誌檔案---(1)錯誤日誌MySql資料庫
- SQLServer資料庫日誌清理 清除sqlserver2005日誌SQLServer資料庫
- MySQL資料庫中的日誌檔案---(3)慢查詢日誌MySql資料庫
- MySQL資料庫中的日誌檔案---(2)普通查詢日誌MySql資料庫
- SQL SERVER 資料庫日誌收縮整理 三種方法軼事分離資料庫而是清空日誌三是截斷日誌SQLServer資料庫