V$LOGMNR_CONTENTS视图中的SESSION_INFO 是null的.
来源:互联网 发布:今日头条 微博 知乎 编辑:程序博客网 时间:2024/06/15 09:08
Column USERNAME And SESSION_INFO Are UNKNOWN Or NULL In V$LOGMNR_CONTENTS (Doc ID 110301.1)
APPLIES TO:
Oracle Database - Enterprise Edition - Version 8.1.7.0 and laterInformation in this document applies to any platform.
***Checked for relevance on 29-Jul-2013***
SYMPTOMS
You have just built the LogMiner dictionary and started the LogMiner session. You query V$LOGMNR_CONTENTS expecting to see the USERNAME and SESSION_INFO for some particular redo or undo operation.
However, the USERNAME field is NULL. This is NOT a recursive operation, and the USERNAME column is expected to contain a non-null value.
CAUSE
- If supplemental logging was not active at the time when the redo records were created, then LogMiner won't be able to obtain all the required information. TheOracle Database Utilities manual mentions:
By default, Oracle Database does not provide any supplemental logging, which means that by default LogMiner is not usable. Therefore, you must enable at least minimal supplemental logging prior to generating log files which will be analyzed by LogMiner.
So, we have to enable supplemental logging by using a SQL statement similar to the following:SQL> CONNECT / AS SYSDBA
SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
Then the information necessary to populate the USERNAME and SESSION_INFO columns will be stored in the redo stream. - The redo stream does not contain the USERNAME and SESSION_INFO data for every transaction. This information is only stored for the first transaction executed in the user's session. So in order to be able to see this information in V$LOGMNR_CONTENTS, all the redo generated during the entire session must be added to the mining session. Should this not be done, then the USERNAME and SESSION_INFO columns will remain empty.
- LogMiner was first available in Oracle8i. If the COMPATIBLE instance parameter is set to a value lower than 8.1.0 you will not have access to its full functionality.
- In Oracle9i and lower releases of Oracle, the TRANSACTION_AUDITING instance parameter is set to TRUE by default. This causes the generation of a redo record containing the user logon name, username, session ID, and some operating system and client information. For each successive transaction in the session, Oracle will store only the session ID. These session IDs are linked back to the first record to retrieve user and session information.
When TRANSACTION_AUDITING is set to FALSE, this redo record is not written and the user information is not available to LogMiner.
SOLUTION
This can result from your database parameter settings and also from the method you are using to mine redo logs using LogMiner.
- Ensure that database was in minimum supplemental logging at the time that the redo information was created:SQL> SELECT name, supplemental_log_data_min FROM v$database;
NAME SUPPLEME
------------------------------ --------
M10202WA YES - Ensure that all archive redo logs containing the necessary redo information have been added to the LogMiner session.
- Ensure that the COMPATIBLE initialization parameter is set to 8.1.0 or higher.SQL> show parameter compatible
NAME TYPE VALUE
------------------------------------ ----------- ----------
compatible string 10.2.0.2.0 - For Oracle8i and Oracle9i only: ensure that the TRANSACTION_AUDITING instance parameter is set to TRUE (default).SQL> show parameter transaction_auditing
NAME TYPE VALUE
------------------------------------ ----------- ----------
transaction_auditing boolean TRUE
阅读全文
0 0
- V$LOGMNR_CONTENTS视图中的SESSION_INFO 是null的.
- V$LOGMNR_CONTENTS 的字段解释
- v$开头的就一定是视图吗?
- v视图的授权
- 视图 v$sql,v$sqlarea,$sqltext,v$sqltext_with_newlines 的差异
- Oracle的v$动态视图
- V$License视图的内容。
- V$ACTIVE_SESSION_HISTORY视图的使用
- V$ACTIVE_SESSION_HISTORY视图的使用
- v$sql视图和v$sqlarea视图的构建
- v$session 视图中的 FAILOVER_TYPE 字段
- V$SQL视图中SQL_TEXT的SQL语句是绑定变量,常量在v$sql_bind_capture视图的VLUE_STRING字段中可以查到
- DBNull代表的是DB(也即SQL)中的“null”,而不是CLR中的“null”
- PHP中的0,‘’,null和false原来是一样的?!
- V$视图
- Oracle DataGuard中的v$database动态性能视图switchover_status列的含义
- v$sql | v$sqlarea | v$sqltext | v$sqltext_with_newlines 视图的区别
- ORACLE里两个重要的视图-v$SQL v$SQLAREA
- [P3518]strongbox
- zigbee路由转发,短地址是否不变?
- [POJ 2891]Strange Way to Express Integers:扩展中国剩余定理
- 图的基本概念(二)
- 修改通知
- V$LOGMNR_CONTENTS视图中的SESSION_INFO 是null的.
- java注解基础概念总结
- 欢迎使用CSDN-markdown编辑器
- Linux netstat命令详解
- 操作系统(1)
- L1和L2正则化
- 前端之DNS-Prefetch
- Android颜色透明度
- Activity的了解