![](https://iknow-base.cdn.bcebos.com/lxb/notice.png)
oracle 如何查看日志?
2022-12-11 · 百度认证:北京惠企网络技术有限公司官方账号
![](https://wyw-base.cdn.bcebos.com/pc-content/follow.gif)
1、Oracle日志的路径的查看:
登录:sqlplus "/as sysdba"
查看路径:SQL> select * from v$logfile;
SQL> select * from v$logfile;(#日志文件路径)
2、Oracle日志文件包含哪些内容:(日志的数量可能略有不同)
control01.ctl example01.dbf redo02.log sysaux01.dbf undotbs01.dbf
control02.ctl redo03.log system01.dbf users01.dbf
control03.ctl redo01.log SHTTEST.dbf temp01.dbf
3、Oracle日志的查看方法语句代码:
SQL>select * from v$sql (#查看最近所作的操作)
SQL>select * fromv $sqlarea(#查看最近所作的操作)
4、LogMiner的使用:
5、查看LogMiner工具分析结果
SQL> select * from dict t where t.table_name like '%LOGMNR%';看所有与logmnr相关的视图
6、分析结果在GV$LOGMNR_CONTENTS 视图中,可按以下语句查询:
selec tscn , timestamp , log_id , seg_owner , seg_type , table_space , data_blk# , data_obj# , data_objd#, session#,serial#,username,session_info,sql_redo,sql_undo from logmnr3 t where t.sql_redo like 'create%';