ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 9I访问V$LOGMNR_CALLBACK报错

9I访问V$LOGMNR_CALLBACK报错

原创 Linux操作系统 作者:yangtingkun 时间:2009-04-30 23:43:44 0 删除 编辑

这个bug也是很早以前碰到的,是第一次看管理员手册的时候,测试LOGMINTER使用的时候遇到的问题。最近在看工具手册中LOGMINTER部分,突然想起了这个bug,简单记录一下。

 

 

9i访问V$LOGMNR_CALLBACK视图会出现ORA-3113错误:

SQL> CONN YANGTK/YANGTK@YTK92
已连接。
SQL> SELECT * FROM V$LOGMNR_CALLBACK;
SELECT * FROM V$LOGMNR_CALLBACK
              *
1 行出现错误:
ORA-01307:
当前无活动的 LogMiner 会话


SQL> DESC V$LOGMNR_CALLBACK
 
名称                                                              是否为空? 类型
 ----------------------------------------------------------------- -------- ------------------------
 STATE                                                                      VARCHAR2(8)
 TYPE                                                                       VARCHAR2(19)
 CAPABILITY                                                                 VARCHAR2(8)

SQL> CONN /@YTK92 AS SYSDBA
已连接。
SQL> EXEC DBMS_LOGMNR.ADD_LOGFILE('E:\ORACLE\ORADATA\YTK92\ARCHIVE\1_54.DBF', DBMS_LOGMNR.NEW)

PL/SQL 过程已成功完成。

SQL> EXEC DBMS_LOGMNR.START_LOGMNR(OPTIONS => DBMS_LOGMNR.DICT_FROM_ONLINE_CATALOG)

PL/SQL 过程已成功完成。

SQL> SELECT SQL_REDO FROM V$LOGMNR_CONTENTS
  2  WHERE ROWNUM < 5;

SQL_REDO
------------------------------------------------------------------------------------------
commit;
set transaction read write;
delete from "UNKNOWN"."OBJ# 32184" where "COL 1" = HEXTORAW('c102') and ROWID = 'AAAH24AAJAAAAA4AAA'
commit;

SQL> SELECT * FROM V$LOGMNR_CALLBACK;
SELECT * FROM V$LOGMNR_CALLBACK
*
1 行出现错误:
ORA-03113:
通信通道的文件结束


SQL> DISC
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
断开

在后台alert文件中,没有出现任何的错误信息。

而在10g中,这个bug已经被解决:

SQL> CONN / AS SYSDBA
已连接。
SQL> DESC V$LOGMNR_CALLBACK
 
名称                                                              是否为空? 类型
 ----------------------------------------------------------------- -------- -----------
 SESSION_ID                                                                 NUMBER
 FUNCTION_ID                                                                NUMBER
 DESCRIPTION                                                                VARCHAR2(64)
 TYPE                                                                       VARCHAR2(15)

SQL> EXEC DBMS_LOGMNR.ADD_LOGFILE('E:\ORACLE\ORADATA\YTK102\ARCHIVE\ARC00418_0630194893.001', DBMS_LOGMNR.NEW)

PL/SQL 过程已成功完成。

SQL> EXEC DBMS_LOGMNR.START_LOGMNR(OPTIONS => DBMS_LOGMNR.DICT_FROM_ONLINE_CATALOG)

PL/SQL 过程已成功完成。

SQL> SELECT SQL_REDO FROM V$LOGMNR_CONTENTS
  2  WHERE ROWNUM < 5;

SQL_REDO
-----------------------------------------------------------------------------------------
set transaction read write;
update "SYS"."UNDO$" set "NAME" = '_SYSSMU1$', "USER#" = '1', "FILE#" = '2', "BLOCK#" = '9', "SCNBASCNWRP" = '1', "XACTSQN" = '5336', "UNDOSQN" = '1891', "INST#" = '0', "STATUS$" = '2', "TS#" = '1', ""NAME" = '_SYSSMU1$' and "USER#" = '1' and "FILE#" = '2' and "BLOCK#" = '9' and "SCNBAS" = '195994831' and "XACTSQN" = '5265' and "UNDOSQN" = '1881' and "INST#" = '0' and "STATUS$" = '3' and "TS#" = '' and ROWID = 'AAAAAPAABAAAABqAAB';

commit;
set transaction read write;

SQL> SELECT * FROM V$LOGMNR_CALLBACK;

未选定行

SQL> EXEC DBMS_LOGMNR.END_LOGMNR

PL/SQL 过程已成功完成。

SQL> SELECT * FROM V$VERSION;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE    10.2.0.1.0      Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production

Oracle文档上并没有介绍V$LOGMNR_CALLBACK视图的定义,而metalink中也找不到这个错误说明,甚至V$LOGMNR_CALLBACK视图的描述。应该说这个视图基本上用不到,不过既然在数据库中存在的对象,就不应该出现访问报错的现象。

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/4227/viewspace-592413/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
暂无介绍

注册时间:2007-12-29

  • 博文量
    1955
  • 访问量
    10455284