ITPub博客

首页 > Linux操作系统 > Linux操作系统 > ORACLE_HOME迁移后需要设置LD_LIBRARY_PATH环境变量

ORACLE_HOME迁移后需要设置LD_LIBRARY_PATH环境变量

原创 Linux操作系统 作者:yangtingkun 时间:2012-03-16 23:15:15 0 删除 编辑

10g以后,一般情况下环境变量中没有必要设置LD_LIBRARY_PATH,但是一旦将ORACLE_HOME迁移到其他目录,则环境变量中还需要添加这个变量。

 

 

LinuxUnix支持TAR方式迁移ORACLE_HOME,如果有需要将ORACLE_HOME放到其他路径下,那么一般都会使用tar的方式将整个路径拷贝到目标目录。

但是迁移后,如果直接尝试sqlplus启动,可能报错:

[orat3@hpserver2 ~]$ sqlplus / as sysdba
sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory

而设置LD_LIBRARY_PATH后,问题解决:

[orat3@hpserver2 ~]$ export LD_LIBRARY_PATH=$ORACLE_HOME/lib
[orat3@hpserver2 ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Sun Mar 18 16:10:57 2012

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

还有一种类似的错误:

[orat0@hpserver2 ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.5.0 - Production on Sun Mar 18 16:12:03 2012

Copyright (c) 1982, 2010, Oracle. All Rights Reserved.

oracleorcl10g: error while loading shared libraries: libskgxp10.so: cannot open shared object file: No such file or directory
ERROR:
ORA-12547: TNS:lost contact

Enter user-name:
oracleorcl10g: error while loading shared libraries: libskgxp10.so: cannot open shared object file: No such file or directory
ERROR:
ORA-12547: TNS:lost contact

Enter user-name:
oracleorcl10g: error while loading shared libraries: libskgxp10.so: cannot open shared object file: No such file or directory
ERROR:
ORA-12547: TNS:lost contact

SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
[orat0@hpserver2 ~]$ export LD_LIBRARY_PATH=$ORACLE_HOME/lib
[orat0@hpserver2 ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.5.0 - Production on Sun Mar 18 16:12:18 2012

Copyright (c) 1982, 2010, Oracle. All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

错误的表相虽然不同,但是解决方法是相同的。

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/4227/viewspace-718879/,如需转载,请注明出处,否则将追究法律责任。

上一篇: ORA-600(19004)错误
请登录后发表评论 登录
全部评论
暂无介绍

注册时间:2007-12-29

  • 博文量
    1955
  • 访问量
    10488213