ORA-01804 failure to initialize timezone information
Oct162014
登录数据库的时候遇到ORA-01804错误。
[oracle@pressdb ~]$ sqlplus / as sysdba ERROR: ORA-01804: failure to initialize timezone information SP2-0152: ORACLE may not be functioning properly
这个问题是由于ORACLE用户的PATH环境变量设置不正确导致,这台服务器之前安装了10.2.0.5版本的数据库,之后安装了11.2.0.4版本的数据库软件,操作系统RHEL5U5,.bash_profile文件10g和11g各一个,在登录10.2.0.5版本的数据库时,将10g的profile文件替换,这样PATH变量既包含了10g的PATH变量也包含11g的PATH变量,就导致了这个问题。
[oracle@pressdb ~]$ env | grep PATH LD_LIBRARY_PATH=/u01/app/oracle/10.2.0/db_1/lib:/lib:/usr/lib PATH=/usr/lib64/qt-3.3/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/oracle/bin:/u01/app/oracle/product/11.2.0/dbhome_1/bin:/home/oracle/bin:/u01/app/oracle/10.2.0/db_1/bin
解决方法很简单,再重新打开个终端,重新加载profile文件即可,也可以先unset PATH变量,然后再export正确的PATH。
[oracle@pressdb ~]$ unset PATH [oracle@pressdb ~]$ export PATH=$ORACLE_HOME/bin:$PATH
这样,登录数据库就不会有问题。
[oracle@pressdb ~]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.5.0 - Production on Sun Oct 12 17:10:49 2014 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> show parameter name NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_file_name_convert string db_name string orcl db_unique_name string orcl global_names boolean FALSE instance_name string orcl lock_name_space string log_file_name_convert string service_names string orcl SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down.
【上一篇】tomcat验证连接的连通性导致数据库响应异常
【下一篇】instance_name、db_name、db_unique_name、global_names、service_names的含义及修改
【下一篇】instance_name、db_name、db_unique_name、global_names、service_names的含义及修改