Oracle dblink監聽問題

ywxj_001發表於2019-10-15

Oracle dblink監聽不能簡單重啟監聽。(MySQL的dblink)

透過lsnrctl stop、lsnrctl start無法啟動Oracle dblink的監聽。

dblink查詢報錯:

SQL> select count(*) from CUX_IMP_INTERFACE_HEADERS@MYODBC.BENLAILIFE.COM;
select count(*) from CUX_IMP_INTERFACE_HEADERS@MYODBC.BENLAILIFE.COM
*
ERROR at line 1:
ORA-28545: error diagnosed by Net8 when connecting to an agent
Unable to retrieve text of NETWORK/NCR message 65535
ORA-02063: preceding 2 lines from MYODBC



正確重啟Oracle dblink監聽方式:

[oraprod@erpdbp PROD_erpdbp]$ pwd
/u01/prod/db/12.1.0/appsutil/scripts/PROD_erpdbp
[oraprod@erpdbp PROD_erpdbp]$ /u01/prod/db/12.1.0/appsutil/scripts/PROD_erpdbp/addlnctl.sh stop PROD
[oraprod@erpdbp PROD_erpdbp]$ /u01/prod/db/12.1.0/appsutil/scripts/PROD_erpdbp/addlnctl.sh start PROD
[oraprod@erpdbp PROD_erpdbp]$ /u01/prod/db/12.1.0/appsutil/scripts/PROD_erpdbp/addlnctl.sh status PROD
Service "PROD" has 2 instance(s).
Instance "PROD", status UNKNOWN, has 1 handler(s) for this service...
Instance "PROD", status READY, has 1 handler(s) for this service...
Service "ebs_patch" has 1 instance(s).
Instance "PROD", status READY, has 1 handler(s) for this service...
Service "myodbc3" has 1 instance(s).
Instance "myodbc3", status UNKNOWN, has 1 handler(s) for this service...
Service "myodbc4" has 1 instance(s).
Instance "myodbc4", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
SQL> set linesize 600
SQL> set pagesize 600
SQL> select owner,object_name from dba_objects where object_type='DATABASE LINK';
OWNER OBJECT_NAME
-------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------
PUBLIC DEV_LINK.BENLAILIFE.COM
PUBLIC GUOFANG.BENLAILIFE.COM
PUBLIC MYODBC.BENLAILIFE.COM
PUBLIC PROD_BAK_DBLINK.BENLAILIFE.COM
APPS TEST_TO_PROD.TEST.BENLAILIFE.COM



報錯:

SQL> select count(*) from CUX_IMP_INTERFACE_HEADERS@MYODBC.BENLAILIFE.COM;
select count(*) from CUX_IMP_INTERFACE_HEADERS@MYODBC.BENLAILIFE.COM
*
ERROR at line 1:
ORA-28545: error diagnosed by Net8 when connecting to an agent
Unable to retrieve text of NETWORK/NCR message 65535

ORA-02063: preceding 2 lines from MYODBC


PS:

CUX_IMP_INTERFACE_HEADERS是MySQL的表。


監聽正常後:

SQL> select count(*) from CUX_IMP_INTERFACE_HEADERS@MYODBC.BENLAILIFE.COM;
COUNT(*)
----------
2570886



來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22996654/viewspace-2660098/,如需轉載,請註明出處,否則將追究法律責任。

相關文章