在安装好oracle数据库后,sqlplus登录数据库发现报错:
ERROR:
ORA-12547: TNS:lost contact
Enter user-name:
参照官方文档(ID:552979.1)给出的建议进行处理:查看文件:
$ ls -ld bin/ora*
-rwsr-s--x 1 oracle dba 0 Aug 15 2005 bin/oracle
-rwxr-xr-x 1 oracle dba 0 Jun 22 2005 bin/oracleO
... and the <$ORACLE_HOME>/rdbms/lib/config.o object file is zero filesize as well ...
$ cd $ORACLE_HOME/rdbms/lib
$ ls -l config*
-rw-r----- 1 oracle dba 255 Jan 18 11:43 config.c
-rw-r----- 1 oracle dba 0 Jan 18 11:53 config.o
发现文件大小均为0
config.o was not generated during the installation, and it will not be re-compiled if it already exists. Remove the zero-length config.o and then re-compile oracle as mentioned below
$ cd $ORACLE_HOME/rdbms/lib
$ rm config.o
$ make -f ins_rdbms.mk config.o ioracle
$ ls -l config*
-rw-r----- 1 oracle dba 255 Jan 18 11:43 config.c
-rw-r--r-- 1 oracle dba 1448 Feb 6 14:56 config.o
$ cd $ORACLE HOME/bin
$ ls -l oracle*
-rwsr-s--x 1 oracle dba 112842648 Feb 6 14:57 oracle
-rwsr-s--x 1 oracle dba 0 Aug 15 2005 oracleO
这下使用sqlplus登录就正常了