oracle数据库-时区设置

2014-02-12
今天在用EM进行数据库备份时时发现oracle 10g R2下EM得一个报错,错误如下 :“java.lang.Exception:IOException in sending Request :: Connection refused: connect”,遂通过查阅资料得到如下解决方案。

困惑了许久原以为是操作系统用户oracle没有权限造成的,经过多次检查oracle用户权限和密码都没错误。

查了许多资料发现是时区设置的问题。

oracle修改时区的方法:
停止emagent:
[oracle@localhost ~]$ emctl stop agent
[oracle@localhost ~]$ emctl stop dbconsole


[oracle@localhost ~]$ export TZ=PRC
[oracle@localhost ~]$ emctl config agent getTZ
[oracle@localhost ~]$ emctl config agent updateTZ
[oracle@localhost ~]$ emctl start agent
[oracle@localhost ~]$ emctl start dbconsole

如果数据库dbconsole不能停止,提示Failed to shutdown DBConsole Gracefully

就要杀死 oc4j 进程

[oracle@localhost ~]$ ps -ef|grep oc4j
oracle    8844  8819  1 18:41 pts/2    00:00:15 /u01/app/oracle/product/10.2.0/db_1/jdk/bin/java -server -Xmx256M -XX:MaxPermSize=96m -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40 -DORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1 -Doracle.home=/u01/app/oracle/product/10.2.0/db_1/oc4j -Doracle.oc4j.localhome=/u01/app/oracle/product/10.2.0/db_1/localhost_orcl/sysman -DEMSTATE=/u01/app/oracle/product/10.2.0/db_1/localhost_orcl -Doracle.j2ee.dont.use.memory.archive=true -Djava.protocol.handler.pkgs=HTTPClient -Doracle.security.jazn.config=/u01/app/oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_localhost_orcl/config/jazn.xml -Djava.security.policy=/u01/app/oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_localhost_orcl/config/java2.policy -Djava.security.properties=/u01/app/oracle/product/10.2.0/db_1/oc4j/j2ee/home/config/jazn.security.props -DEMDROOT=/u01/app/oracle/product/10.2.0/db_1/localhost_orcl -Dsysman.md5password=true -Drepapi.oracle.home=/u01/app/oracle/product/10.2.0/db_1 -Ddisable.checkForUpdate=true -Djava.awt.headless=true -jar /u01/app/oracle/product/10.2.0/db_1/oc4j/j2ee/home/oc4j.jar -config /u01/app/oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_localhost_orcl/config/server.xml
oracle   11946 11915  0 18:57 pts/3    00:00:00 grep oc4j
[oracle@localhost ~]$ kill 8844

进程杀死后执行停止dbconsole命令
[oracle@localhost ~]$emctl stop dbconsole


 

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。