在进行复制组创建的过程中出现如下错误: 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 ; OWNER DB_LINK ---------- -------------------- PUBLIC DB001.Q-LINK MVADMIN DB001.Q-LINK DEV001 DB001.Q-LINK SQL> connect system/pass@db001 ; 已连接。 SQL> select owner,db_link from dba_db_links ; OWNER DB_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> 供参考。
|