解决奇怪的 ORA-12547 TNS lost contact

联系:QQ(5163721)

标题:解决奇怪的 ORA-12547 TNS lost contact

作者:Lunar©版权所有[文章允许转载,但必须以链接方式注明源地址,否则追究法律责任.]

很久以前的一个老vm,忽然sqlplus不能使用,直接报错:

[oracle@gg admin]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Sun Sep 15 21:10:35 2013

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

ERROR:
ORA-12547: TNS:lost contact


Enter user-name: 
ERROR:
ORA-12547: TNS:lost contact


Enter user-name: 
[oracle@gg admin]$ 

sqlplus1
sqlplus2

[oracle@gg ~]$ oerr ora 12560
12560, 00000, "TNS:protocol adapter error"
// *Cause: A generic protocol adapter error occurred.
// *Action: Check addresses used for proper protocol specification. Before
// reporting this error, look at the error stack and check for lower level
// transport errors. For further details, turn on tracing and reexecute the
// operation. Turn off tracing when the operation is complete.
[oracle@gg ~]$


[oracle@gg admin]$ cat sqlnet.log


***********************************************************************
Fatal NI connect error 12547, connecting to:
 (DESCRIPTION=(ADDRESS=(PROTOCOL=beq)(PROGRAM=/home/oracle/oracle/product/10.2.0/db_1/bin/oracle)(ARGV0=oracleorcl)(ARGS='(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))')(DETACH=NO))(CONNECT_DATA=(CID=(PROGRAM=sqlplus)(HOST=gg.oracle.linux)(USER=oracle))))

  VERSION INFORMATION:
        TNS for Linux: Version 10.2.0.1.0 - Production
        Oracle Bequeath NT Protocol Adapter for Linux: Version 10.2.0.1.0 - Production
        TCP/IP NT Protocol Adapter for Linux: Version 10.2.0.1.0 - Production
  Time: 15-SEP-2013 21:10:35
  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
    nt OS err code: 0


***********************************************************************
Fatal NI connect error 12547, connecting to:
 (DESCRIPTION=(ADDRESS=(PROTOCOL=beq)(PROGRAM=/home/oracle/oracle/product/10.2.0/db_1/bin/oracle)(ARGV0=oracleorcl)(ARGS='(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))')(DETACH=NO))(CONNECT_DATA=(CID=(PROGRAM=sqlplus)(HOST=gg.oracle.linux)(USER=oracle))))

  VERSION INFORMATION:
        TNS for Linux: Version 10.2.0.1.0 - Production
        Oracle Bequeath NT Protocol Adapter for Linux: Version 10.2.0.1.0 - Production
        TCP/IP NT Protocol Adapter for Linux: Version 10.2.0.1.0 - Production
  Time: 15-SEP-2013 21:10:36
  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
    nt OS err code: 0


***********************************************************************
Fatal NI connect error 12547, connecting to:
 (DESCRIPTION=(ADDRESS=(PROTOCOL=beq)(PROGRAM=/home/oracle/oracle/product/10.2.0/db_1/bin/oracle)(ARGV0=oracleorcl)(ARGS='(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))')(DETACH=NO))(CONNECT_DATA=(CID=(PROGRAM=sqlplus)(HOST=gg.oracle.linux)(USER=oracle))))

  VERSION INFORMATION:
        TNS for Linux: Version 10.2.0.1.0 - Production
        Oracle Bequeath NT Protocol Adapter for Linux: Version 10.2.0.1.0 - Production
        TCP/IP NT Protocol Adapter for Linux: Version 10.2.0.1.0 - Production
  Time: 15-SEP-2013 21:11:08
  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
    nt OS err code: 0
[oracle@gg admin]$ 
[oracle@gg admin]$ cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.

127.0.0.1       localhost.localdomain   localhost

192.168.30.16   com.oracle.linux        com
192.168.30.19   gg.oracle.linux         gg

192.168.30.2    lunar-cn


[oracle@gg admin]$ 

[oracle@gg ~]$ oerr ora 12560
12560, 00000, "TNS:protocol adapter error"
// *Cause: A generic protocol adapter error occurred.
// *Action: Check addresses used for proper protocol specification. Before
// reporting this error, look at the error stack and check for lower level
// transport errors. For further details, turn on tracing and reexecute the
// operation. Turn off tracing when the operation is complete.
[oracle@gg ~]$ 


[root@gg network-scripts]# rpm -qa libaio*
libaio-0.3.105-2
[root@gg network-scripts]# 


[oracle@gg ~]$ tnsping ggt

TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 15-SEP-2013 22:09:23

Copyright (c) 1997, 2005, Oracle.  All rights reserved.

Used parameter files:
/home/oracle/oracle/product/10.2.0/db_1/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = gg.oracle.linux)(PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl.oracle.com)))
OK (0 msec)
[oracle@gg ~]$

[root@gg network-scripts]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:29:B7:9E:F4  
          inet addr:192.168.30.19  Bcast:192.168.30.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:feb7:9ef4/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:917 errors:0 dropped:0 overruns:0 frame:0
          TX packets:834 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:84967 (82.9 KiB)  TX bytes:107279 (104.7 KiB)
          Interrupt:185 Base address:0x1400 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:1249 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1249 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1570048 (1.4 MiB)  TX bytes:1570048 (1.4 MiB)

[root@gg network-scripts]# ping 192.168.30.19
PING 192.168.30.19 (192.168.30.19) 56(84) bytes of data.
64 bytes from 192.168.30.19: icmp_seq=0 ttl=64 time=0.027 ms
64 bytes from 192.168.30.19: icmp_seq=1 ttl=64 time=0.027 ms

--- 192.168.30.19 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.027/0.027/0.027/0.000 ms, pipe 2
[root@gg network-scripts]#

Strace sqlplus / as sysdba
有如下信息:

open("/home/oracle/sqlnet.log", O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE, 0666) = 8
fstat64(8, {st_mode=S_IFREG|0644, st_size=22137, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f09000
fstat64(8, {st_mode=S_IFREG|0644, st_size=22137, ...}) = 0
_llseek(8, 22137, [22137], SEEK_SET)    = 0
fcntl64(8, F_SETFD, FD_CLOEXEC)         = 0
write(8, "\n\n******************************"..., 73) = 73
_llseek(8, 0, [22210], SEEK_CUR)        = 0
write(8, "\nFatal NI connect error 12547, c"..., 306) = 306
_llseek(8, 0, [22516], SEEK_CUR)        = 0
gettimeofday({1379252277, 703250}, NULL) = 0
write(8, "\n  VERSION INFORMATION:\n\tTNS for"..., 223) = 223
_llseek(8, 0, [22739], SEEK_CUR)        = 0
write(8, "  Time: 15-SEP-2013 21:37:57\n", 29) = 29
_llseek(8, 0, [22768], SEEK_CUR)        = 0
write(8, "  Tracing not turned on.\n", 25) = 25
_llseek(8, 0, [22793], SEEK_CUR)        = 0
write(8, "  Tns error struct:\n", 20)   = 20
_llseek(8, 0, [22813], SEEK_CUR)        = 0
write(8, "    ns main err code: 12547\n", 28) = 28
_llseek(8, 0, [22841], SEEK_CUR)        = 0
open("/home/oracle/oracle/product/10.2.0/db_1/network/mesg/tnsus.msb", O_RDONLY) = 9
fcntl64(9, F_SETFD, FD_CLOEXEC)         = 0
lseek(9, 0, SEEK_SET)                   = 0
read(9, "\25\23\"\1\23\3\t\t\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 256) = 256
lseek(9, 512, SEEK_SET)                 = 512
read(9, "\2331\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
lseek(9, 1024, SEEK_SET)                = 1024
read(9, "\t\0\22\0\32\0&\0-\0F\0N\0U\0\\\0k\0w\0\201\0\212\0\223"..., 170) = 170
lseek(9, 39936, SEEK_SET)               = 39936
read(9, "\16\0\0001\0\0\\\0\0011\0\0\213\0\0021\0\0\306\0\0031\0"..., 512) = 512
write(8, "    ", 4)                     = 4
_llseek(8, 0, [22845], SEEK_CUR)        = 0
write(8, "TNS-12547: TNS:lost contact\n", 28) = 28
_llseek(8, 0, [22873], SEEK_CUR)        = 0
write(8, "    ns secondary err code: 12560"..., 33) = 33
_llseek(8, 0, [22906], SEEK_CUR)        = 0
write(8, "    nt main err code: 517\n", 26) = 26
_llseek(8, 0, [22932], SEEK_CUR)        = 0
lseek(9, 14848, SEEK_SET)               = 14848
read(9, "\16\0\1\2\0\0\\\0\2\2\0\0x\0\3\2\0\0\243\0\4\2\0\0\336"..., 512) = 512
write(8, "    ", 4)                     = 4
_llseek(8, 0, [22936], SEEK_CUR)        = 0
write(8, "TNS-00517: Lost contact\n", 24) = 24
_llseek(8, 0, [22960], SEEK_CUR)        = 0
write(8, "    nt secondary err code: 32\n", 30) = 30
_llseek(8, 0, [22990], SEEK_CUR)        = 0
close(7)                                = 0
open("/home/oracle/oracle/product/10.2.0/db_1/rdbms/mesg/oraus.msb", O_RDONLY) = 7

发现在读写 /home/oracle/sqlnet.log 是报错,怀疑是oracle本身有问题,查询metalink证实了这个想法:
Troubleshooting ORA-12547 TNS: Lost Contact [ID 555565.1]
于是重新编译:

cd $ORACLE_HOME/bin
relink all 1>relink.out 2>relink.err 

[oracle@gg bin]$ relink all
/home/oracle/oracle/product/10.2.0/db_1/bin/genclntsh
/home/oracle/oracle/product/10.2.0/db_1/bin/genagtsh /home/oracle/oracle/product/10.2.0/db_1/lib/libagtsh.so 1.0
Linking /home/oracle/oracle/product/10.2.0/db_1/precomp/lib/proc
rm -f /home/oracle/oracle/product/10.2.0/db_1/bin/proc
mv /home/oracle/oracle/product/10.2.0/db_1/precomp/lib/proc /home/oracle/oracle/product/10.2.0/db_1/bin/
rm -f ldapadd ldapbind ldapcompare ldapdelete ldapmodify ldapsearch ldapmoddn ldapaddmt ldapmodifymt dsml2ldif
gcc -o ldapadd -L/home/oracle/oracle/product/10.2.0/db_1/ldap/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/stubs/ -L/usr/lib -lirc    -o ldapadd -L/home/oracle/oracle/product/10.2.0/db_1/ldap/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/stubs/ -L/usr/lib -lirc  /home/oracle/oracle/product/10.2.0/db_1/ldap/lib/s0gslmod.o  /home/oracle/oracle/product/10.2.0/db_1/ldap/lib/gslmcu.o -lncrypt10 /home/oracle/oracle/product/10.2.0/db_1/lib/libldapclnt10.a  -lldapclnt10 -lncrypt10 -lclntsh  `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10 -lmm -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10   -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10 -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10   `cat /home/oracle/oracle/product/10.2.0/db_1/lib/sysliblist` -ldl -lm  -Wl,-rpath,/home/oracle/oracle/product/10.2.0/db_1/lib 
gcc -o ldapbind -L/home/oracle/oracle/product/10.2.0/db_1/ldap/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/stubs/ -L/usr/lib -lirc    -o ldapbind -L/home/oracle/oracle/product/10.2.0/db_1/ldap/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/stubs/ -L/usr/lib -lirc  /home/oracle/oracle/product/10.2.0/db_1/ldap/lib/s0gslbind.o  /home/oracle/oracle/product/10.2.0/db_1/ldap/lib/gslmcu.o -lncrypt10 /home/oracle/oracle/product/10.2.0/db_1/lib/libldapclnt10.a  -lldapclnt10 -lncrypt10 -lclntsh  `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10 -lmm -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10   -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10 -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10   `cat /home/oracle/oracle/product/10.2.0/db_1/lib/sysliblist` -ldl -lm  -Wl,-rpath,/home/oracle/oracle/product/10.2.0/db_1/lib
gcc -o ldapcompare -L/home/oracle/oracle/product/10.2.0/db_1/ldap/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/stubs/ -L/usr/lib -lirc    -o ldapcompare -L/home/oracle/oracle/product/10.2.0/db_1/ldap/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/stubs/ -L/usr/lib -lirc  /home/oracle/oracle/product/10.2.0/db_1/ldap/lib/s0gslcompare.o  /home/oracle/oracle/product/10.2.0/db_1/ldap/lib/gslmcu.o -lncrypt10 /home/oracle/oracle/product/10.2.0/db_1/lib/libldapclnt10.a  -lldapclnt10 -lncrypt10 -lclntsh  `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10 -lmm -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10   -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10 -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10   `cat /home/oracle/oracle/product/10.2.0/db_1/lib/sysliblist` -ldl -lm  -Wl,-rpath,/home/oracle/oracle/product/10.2.0/db_1/lib
gcc -o ldapdelete -L/home/oracle/oracle/product/10.2.0/db_1/ldap/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/stubs/ -L/usr/lib -lirc    -o ldapdelete -L/home/oracle/oracle/product/10.2.0/db_1/ldap/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/stubs/ -L/usr/lib -lirc  /home/oracle/oracle/product/10.2.0/db_1/ldap/lib/s0gsldel.o  /home/oracle/oracle/product/10.2.0/db_1/ldap/lib/gslmcu.o -lpthread -lncrypt10 /home/oracle/oracle/product/10.2.0/db_1/lib/libldapclnt10.a  -lldapclnt10 -lncrypt10 -lclntsh  `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10 -lmm -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10   -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10 -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10   `cat /home/oracle/oracle/product/10.2.0/db_1/lib/sysliblist` -ldl -lm  -Wl,-rpath,/home/oracle/oracle/product/10.2.0/db_1/lib 
gcc -o ldapmodify -L/home/oracle/oracle/product/10.2.0/db_1/ldap/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/stubs/ -L/usr/lib -lirc    -o ldapmodify -L/home/oracle/oracle/product/10.2.0/db_1/ldap/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/stubs/ -L/usr/lib -lirc  /home/oracle/oracle/product/10.2.0/db_1/ldap/lib/s0gslmod.o  /home/oracle/oracle/product/10.2.0/db_1/ldap/lib/gslmcu.o -lncrypt10 /home/oracle/oracle/product/10.2.0/db_1/lib/libldapclnt10.a  -lldapclnt10 -lncrypt10 -lclntsh  `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10 -lmm -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10   -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10 -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10   `cat /home/oracle/oracle/product/10.2.0/db_1/lib/sysliblist` -ldl -lm  -Wl,-rpath,/home/oracle/oracle/product/10.2.0/db_1/lib 
gcc -o ldapsearch -L/home/oracle/oracle/product/10.2.0/db_1/ldap/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/stubs/ -L/usr/lib -lirc    -o ldapsearch -L/home/oracle/oracle/product/10.2.0/db_1/ldap/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/stubs/ -L/usr/lib -lirc  /home/oracle/oracle/product/10.2.0/db_1/ldap/lib/s0gsldsearch.o  /home/oracle/oracle/product/10.2.0/db_1/ldap/lib/gslmcu.o -lncrypt10 /home/oracle/oracle/product/10.2.0/db_1/lib/libldapclnt10.a  -lldapclnt10 -lncrypt10 -lclntsh  `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10 -lmm -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10   -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10 -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10   `cat /home/oracle/oracle/product/10.2.0/db_1/lib/sysliblist` -ldl -lm  -Wl,-rpath,/home/oracle/oracle/product/10.2.0/db_1/lib
gcc -o ldapmoddn -L/home/oracle/oracle/product/10.2.0/db_1/ldap/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/stubs/ -L/usr/lib -lirc    -o ldapmoddn -L/home/oracle/oracle/product/10.2.0/db_1/ldap/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/stubs/ -L/usr/lib -lirc  /home/oracle/oracle/product/10.2.0/db_1/ldap/lib/s0gslmoddn.o  /home/oracle/oracle/product/10.2.0/db_1/ldap/lib/gslmcu.o -lncrypt10 /home/oracle/oracle/product/10.2.0/db_1/lib/libldapclnt10.a  -lldapclnt10 -lncrypt10 -lclntsh  `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10 -lmm -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10   -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10 -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10   `cat /home/oracle/oracle/product/10.2.0/db_1/lib/sysliblist` -ldl -lm  -Wl,-rpath,/home/oracle/oracle/product/10.2.0/db_1/lib
gcc -o ldapaddmt -L/home/oracle/oracle/product/10.2.0/db_1/ldap/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/stubs/ -L/usr/lib -lirc    -o ldapaddmt -L/home/oracle/oracle/product/10.2.0/db_1/ldap/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/stubs/ -L/usr/lib -lirc  /home/oracle/oracle/product/10.2.0/db_1/ldap/lib/s0gsltmod.o  /home/oracle/oracle/product/10.2.0/db_1/ldap/lib/gslmcu.o -lpthread -lncrypt10 /home/oracle/oracle/product/10.2.0/db_1/lib/libldapclnt10.a  -lldapclnt10 -lncrypt10 -lclntsh  `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10 -lmm -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10   -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10 -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10   `cat /home/oracle/oracle/product/10.2.0/db_1/lib/sysliblist` -ldl -lm  -Wl,-rpath,/home/oracle/oracle/product/10.2.0/db_1/lib 
gcc -o ldapmodifymt -L/home/oracle/oracle/product/10.2.0/db_1/ldap/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/stubs/ -L/usr/lib -lirc    -o ldapmodifymt -L/home/oracle/oracle/product/10.2.0/db_1/ldap/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/stubs/ -L/usr/lib -lirc  /home/oracle/oracle/product/10.2.0/db_1/ldap/lib/s0gsltmod.o  /home/oracle/oracle/product/10.2.0/db_1/ldap/lib/gslmcu.o -lpthread -lncrypt10 /home/oracle/oracle/product/10.2.0/db_1/lib/libldapclnt10.a  -lldapclnt10 -lncrypt10 -lclntsh  `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10 -lmm -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10   -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10 -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10   `cat /home/oracle/oracle/product/10.2.0/db_1/lib/sysliblist` -ldl -lm  -Wl,-rpath,/home/oracle/oracle/product/10.2.0/db_1/lib 
gcc -o dsml2ldif -L/home/oracle/oracle/product/10.2.0/db_1/ldap/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/stubs/ -L/usr/lib -lirc    -o dsml2ldif -L/home/oracle/oracle/product/10.2.0/db_1/ldap/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/stubs/ -L/usr/lib -lirc  /home/oracle/oracle/product/10.2.0/db_1/ldap/lib/s0gsldsml2ldif.o  -lncrypt10 /home/oracle/oracle/product/10.2.0/db_1/lib/libldapclnt10.a  -lldapclnt10 -lncrypt10 -lclntsh  `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10 -lmm -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10   -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10 -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10   `cat /home/oracle/oracle/product/10.2.0/db_1/lib/sysliblist` -ldl -lm  -Wl,-rpath,/home/oracle/oracle/product/10.2.0/db_1/lib
mv -f ldapdelete /home/oracle/oracle/product/10.2.0/db_1/bin/ldapdelete
mv: `ldapdelete' and `/home/oracle/oracle/product/10.2.0/db_1/bin/ldapdelete' are the same file
make: [inst_clientonly] Error 1 (ignored)
mv -f ldapmodify /home/oracle/oracle/product/10.2.0/db_1/bin/ldapmodify
mv: `ldapmodify' and `/home/oracle/oracle/product/10.2.0/db_1/bin/ldapmodify' are the same file
make: [inst_clientonly] Error 1 (ignored)
mv -f ldapmodifymt /home/oracle/oracle/product/10.2.0/db_1/bin/ldapmodifymt
mv: `ldapmodifymt' and `/home/oracle/oracle/product/10.2.0/db_1/bin/ldapmodifymt' are the same file
make: [inst_clientonly] Error 1 (ignored)
mv -f ldapadd /home/oracle/oracle/product/10.2.0/db_1/bin/ldapadd
mv: `ldapadd' and `/home/oracle/oracle/product/10.2.0/db_1/bin/ldapadd' are the same file
.

......................



Linking sqlplus
rm -f sqlplus
gcc -o sqlplus -L/home/oracle/oracle/product/10.2.0/db_1/sqlplus/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/ -L/home/oracle/oracle/product/10.2.0/db_1/lib/stubs/ -L/usr/lib -lirc  /home/oracle/oracle/product/10.2.0/db_1/sqlplus/lib/s0afimai.o -lsqlplus -lclntsh  `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10 -lmm -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /home/oracle/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10   -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10 -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10   `cat /home/oracle/oracle/product/10.2.0/db_1/lib/sysliblist` -Wl,-rpath,/home/oracle/oracle/product/10.2.0/db_1/lib -lm -lpthread   `cat /home/oracle/oracle/product/10.2.0/db_1/lib/sysliblist` -ldl -lm -lpthread  -L/home/oracle/oracle/product/10.2.0/db_1/lib
/bin/chmod 755 sqlplus
mv -f /home/oracle/oracle/product/10.2.0/db_1/bin/sqlplus /home/oracle/oracle/product/10.2.0/db_1/bin/sqlplusO
mv -f /home/oracle/oracle/product/10.2.0/db_1/sqlplus/lib/sqlplus /home/oracle/oracle/product/10.2.0/db_1/bin/sqlplus
/bin/chmod 751 /home/oracle/oracle/product/10.2.0/db_1/bin/sqlplus
[oracle@gg bin]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Sun Sep 15 22:19:07 2013

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> 

好了搞定了

此条目发表在 network, ORA-XXXXX 分类目录。将固定链接加入收藏夹。

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注