TNS-12535、TNS-00505、ns main err code: 12535、ns secondary err code: 12560

前几天,在群里看到有朋友说在做数据泵导入的时候,alert log中出现了tns错误。今天刚好在做数据泵,出现了这个错误。

alert log中错误如下

Fatal NI connect error 12170.

  VERSION INFORMATION:
	TNS for Linux: Version 11.2.0.4.0 - Production
	TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.4.0 - Production
  Time: 28-FEB-2019 23:48:47
  Tracing not turned on.
  Tns error struct:
    ns main err code: 12535
    
TNS-12535: TNS:operation timed out
    ns secondary err code: 12560
    nt main err code: 505
    
TNS-00505: Operation timed out
    nt secondary err code: 0
    nt OS err code: 0
  Client address: 
Thu Feb 28 23:49:47 2019


***********************************************************************

Fatal NI connect error 12170.

  VERSION INFORMATION:
	TNS for Linux: Version 11.2.0.4.0 - Production
	TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.4.0 - Production
  Time: 28-FEB-2019 23:49:47
  Tracing not turned on.
  Tns error struct:
    ns main err code: 12535
    
TNS-12535: TNS:operation timed out
    ns secondary err code: 12560
    nt main err code: 505
    
TNS-00505: Operation timed out
    nt secondary err code: 0
    nt OS err code: 0
  Client address: 
[oracle@host01 trace]$ date
Thu Feb 28 23:55:25 EST 2019
[oracle@host01 trace]$ tail -f alert_rac1.log 
    ns main err code: 12535
    
TNS-12535: TNS:operation timed out
    ns secondary err code: 12560
    nt main err code: 505
    
TNS-00505: Operation timed out
    nt secondary err code: 0
    nt OS err code: 0
  Client address: 
Thu Feb 28 23:55:49 2019

然后查看数据泵的界面,发现卡在了alert procedure ,和alert trigger这里。比较耗时。如下

ALTER PROCEDURE "XXX"."MOVE_HIS_DATA_XXX_2"   COMPILE     PLSQL_OPTIMIZE_LEVEL=  2    PLSQL_CODE_TYPE=  INTERPRETED    PLSQL_DEBUG=  FALSE    PLSCOPE_SETTINGS=  '' REUSE SETTINGS TIMESTAMP '2015-07-02 10:33:41'
 
ORA-39083: Object type ALTER_PROCEDURE failed to create with error:
ORA-04052: error occurred when looking up remote object XXX.XXX@XXX
ORA-00604: error occurred at recursive SQL level 3
ORA-12170: TNS:Connect timeout occurred
Failing sql is:

原因基本上搞清楚了。

至于卡这里的原因,是因为要执行alert 语句,会条用dblink到远程库,而dblink刚好是不通的(其实有dblink,只是网络不通),所以导致很耗时。后来exclude掉procedure和trigger后,再次Impdp导入,速度很快。2分钟完事,之前40分钟。

end。

你可能感兴趣的:(EXPDPIMPDP)