物化视图高级复制中ORA-23313错误解决

王朝other·作者佚名  2008-05-31
宽屏版  字体: |||超大  

在进行复制组创建的过程中出现如下错误:

SQL begin

2 dbms_repcat.create_mview_repgroup(

3 gname='reptest',

4 master='db001.d-link',

5 propagation_mode = 'ASYNCHRONOUS');

6 end;

7 /

begin

*

ERROR 位于第 1 行:

ORA-23313: 在 PUBLIC 没有控制对象组 "REPTEST"."db001.d-link"

ORA-06512: 在"SYS.DBMS_SYS_ERROR", line 105

ORA-06512: 在"SYS.DBMS_REPCAT_SNA_UTL", line 1690

ORA-06512: 在"SYS.DBMS_REPCAT_SNA", line 64

ORA-06512: 在"SYS.DBMS_REPCAT", line 1262

ORA-06512: 在line 2

反复检查后发现问题还是出现在db link上,在测试中发现:

SQL connect system/pass@db002;

已连接。

SQL select owner,db_link from dba_db_links ;

OWNERDB_LINK

---------- --------------------

PUBLIC DB001.Q-LINK

MVADMINDB001.Q-LINK

DEV001 DB001.Q-LINK

SQL connect system/pass@db001 ;

已连接。

SQL select owner,db_link from dba_db_links ;

OWNERDB_LINK

---------- --------------------

PUBLIC DB002.Q-LINK

REPADMIN DB002.Q-LINK

SQL connect mvadmin/pass@db002

已连接。

SQL select * from dev001.test001@db001 ;

A B

---------- --------------------

1 wanghui

2 zhangyun

SQL select * from dev001.test001@db001.q-link ;

select * from dev001.test001@db001.q-link

*

ERROR 位于第 1 行:

ORA-00933: SQL 命令未正确结束

SQL

当引用类似"db001.q-link"的db link时,Oracle出现错误,这时候我怀疑"-"这个非凡字符Oracle在db link 中无法正确识别。

告诉他加上双引号(""),也就是:

select * from dev001.test001@"db001.q-link" ;

此时结果正常。

Ok,现在我基本确认是域名的问题。

通过使用类似命令更改了域名以后,恢复正常:

alter database rename global_name to DB002.QLINK;

此后搜索Metalink,真还找到了类似问题描述,Note:274162.1

The above problem is known to arise due to the presence of the '-' character in the domain name. Upon renaming the domain to a name that doesn't contain this character, the above problem disappears. 搞笑的是,Oracle说:

The cause of this occurance is not clear. 报告中的影响范围为:

Oracle Net Services - Version: 8.1.7.4 to 8.1.7.4

Solaris Operating System (SPARC 32-bit)

但是看来9i中问题同样存在,本例的数据库版本为:

SQL select * from v$version ;

BANNER

----------------------------------------------------------------

Oracle9i Enterprise Edition Release 9.2.0.1.0 - ProdUCtion

PL/SQL Release 9.2.0.1.0 - Production

CORE 9.2.0.1.0 Production

TNS for 32-bit Windows: Version 9.2.0.1.0 - Production

NLSRTL Version 9.2.0.1.0 - Production

SQL

供参考。

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
© 2005- 王朝网络 版权所有