168大数据

标题: ORA-01804 failure to initialize timezone information错误 [打印本页]

作者: dbdream    时间: 2014-10-16 11:20
标题: ORA-01804 failure to initialize timezone information错误

     登录数据库的时候遇到ORA-01804错误。
[AppleScript] 纯文本查看 复制代码
[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文件10g11g各一个,在登录10.2.0.5版本的数据库时,将10gprofile文件替换,这样PATH变量既包含了10gPATH变量也包含11gPATH变量,就导致了这个问题。
[AppleScript] 纯文本查看 复制代码
[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
[AppleScript] 纯文本查看 复制代码
[oracle@pressdb ~]$ unset PATH
[oracle@pressdb ~]$ export PATH=$ORACLE_HOME/binPATH

     这样,登录数据库就不会有问题。
[AppleScript] 纯文本查看 复制代码
[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.


[groupid=393]Oracle DBA交流[/groupid]




欢迎光临 168大数据 (http://www.bi168.cn/) Powered by Discuz! X3.2