ORA-12547: TNS:lost contact
根據 sqlnet.log
Fatal NI connect error 12547, connecting to:
(DESCRIPTION=(ADDRESS=(PROTOCOL=beq)(PROGRAM=/oracle/10g/product/10.2.0/db/bin/oracle)(ARGV0=oraclehisspu)(ARGS='(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))')(DETACH=NO))(CONNECT_DATA=(CID=(PROGRAM=sqlplus@f7n4)(HOST=f7n4)(USER=oracle10))))
VERSION INFORMATION:
TNS for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production
TCP/IP NT Protocol Adapter for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production
Oracle Bequeath NT Protocol Adapter for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production
Time: 07-FEB-2017 12:01:33
Tracing not turned on.
Tns error struct:
ns main err code: 12547
TNS-12547: TNS:lost contact
ns secondary err code: 12560
nt main err code: 517
TNS-00517: Lost contact
nt secondary err code: 32
然後使用 sqlplus 時出現
exec(): 0509-036 Cannot load program oraclenam because of the following errors:
0509-130 Symbol resolution failed for /usr/lib/libc.a[aio_64.o] because:
0509-136 Symbol kaio_rdwr64 (number 1) is not exported from
dependent module /unix.
0509-136 Symbol listio64 (number 2) is not exported from
dependent module /unix.
0509-136 Symbol acancel64 (number 3) is not exported from
dependent module /unix.
0509-136 Symbol iosuspend64 (number 4) is not exported from
dependent module /unix.
0509-136 Symbol aio_nwait (number 5) is not exported from
dependent module /unix.
0509-136 Symbol aio_nwait64 (number 6) is not exported from
dependent module /unix.
0509-136 Symbol aio_nwait_timeout (number 7) is not exported from
dependent module /unix.
0509-136 Symbol aio_nwait_timeout64 (number 8) is not exported from
dependent module /unix.
0509-026 System error: Error 0
0509-192 Examine .loader section symbols with the
'dump -Tv' command.
根據
Symbol resolution failed for /usr/lib/libc.a[aio_64.o]
問題是出在AIX 的 AIO 沒有啟用 (在跑 LDAP時沒有用到所以沒有問題 ORACLE需要)
根據
0509-130 Symbol resolution failed for /usr/lib/libc.a[aio_64.o]
This error occurs because the Asynchronous I/O are not available.
# lsattr -El aio0
autoconfig defined STATE to be configured at system restart True
fastpath enable State of fast path True
kprocprio 39 Server PRIORITY True
maxreqs 4096 Maximum number of REQUESTS True
maxservers 10 MAXIMUM number of servers per cpu True
minservers 1 MINIMUM number of servers True
You must make the Asynchronous I/O available using smitty
# smitty chgaio
Change this item
STATE to be configured at system restart available
IMPORTANT: Changes will become effective at next system restart
For configure Asynchronous I/O now use:
# smitty aio
Configure Defined Asynchronous I/O
Checking aio0 again
# lsattr -El aio0
autoconfig available STATE to be configured at system restart True
fastpath enable State of fast path True
kprocprio 39 Server PRIORITY True
maxreqs 4096 Maximum number of REQUESTS True
maxservers 10 MAXIMUM number of servers per cpu True
minservers 1 MINIMUM number of servers True
另外 依據
使用操作系统命令开启异步I/O(1)确认所需的bos.rte.aio是否安装妥当
# lslpp -l bos.rte.aio
Fileset Level State Description
----------------------------------------------------------------------------
Path: /usr/lib/objrepos
bos.rte.aio 5.3.0.62 COMMITTED Asynchronous I/O Extension
(2)使用如下命令开启AIX操作系统的异步I/O
# mkdev -l aio0
aio0 Available
# chdev -P -l aio0 -a autoconfig='available'
aio0 changed
依據
The ‘minservers’ setting (10) is the total number of aioserver kernel threads that start at boot – this is not a per CPU or per logical CPU value.
The ‘maxservers’ setting (20) is the maximum number of aioserver per CPU or per logical CPU value.
The ‘maxreqs’ setting (4096) is the maximum number of outstanding or pending requests that the kernel will allow at any one time.
The default value for the minimum number of servers is 1. The default value for the maximum number of servers is 10. These values are usually too low to run Oracle Database on large systems with 4 CPUs or more, if you are not using kernelized AIO( for raw devices).