启动 EM 报错:does not match the current environment TZ setting(PRC)

来源:互联网 发布:淘宝金钱柳茶 编辑:程序博客网 时间:2024/05/22 15:18
 

启动 EM 报错:

[oracle@myhost bin]$ ./emctl start dbconsoleTZ set to PRCOracle Enterprise Manager 10g Database Control Release 10.2.0.1.0  Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.http://myhost.com:1158/em/console/aboutApplicationTimezone mismatch: The agentTZRegion value (US/Pacific) in /u01/app/oracle/oracle/product/10.2.0/db_1/myhost.com_orcl/sysman/config/emd.propertiesdoes not match the current environment TZ setting(PRC).The dbconsole cannot run with this mismatch.If US/Pacific is the correct timezone, set your timezone environment variable to US/Pacific and repeat the 'emctl start dbconsole' operation.If US/Pacific is not the correct timezone, make sure that the timezone in your environment is correct, and then run the following command in your local Oracle Home: 'emctl resetTZ agent'The output of this command will include detailed instructions to follow, to correct the mismatch.

安装数据库修改redhat的时区,按照提示做以下操作:

[oracle@myhost bin]$ ./emctl resetTZ agentTZ set to PRCOracle Enterprise Manager 10g Database Control Release 10.2.0.1.0  Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.Updating /u01/app/oracle/oracle/product/10.2.0/db_1/myhost.com_orcl/sysman/config/emd.properties...Time zone set to PRC.To complete this process, you must either:connect to the database served by this DBConsole as user 'sysman', and execute:SQL> exec mgmt_target.set_agent_tzrgn('myhost.com:3938','PRC')   -- or --connect to the database served by this DBConsole as user 'sys', and execute:SQL> alter session set current_schema = SYSMAN;SQL> exec mgmt_target.set_agent_tzrgn('myhost.com:3938','PRC')



执行上述SQL

[oracle@myhost bin]$ sqlplus /nologSQL*Plus: Release 10.2.0.1.0 - Production on Fri Mar 2 11:49:51 2012Copyright (c) 1982, 2005, Oracle.  All rights reserved.SQL> conn / as sysdbaConnected.SQL> alter session set current_schema = SYSMAN;Session altered.SQL> exec mgmt_target.set_agent_tzrgn('myhost.com:3938','PRC');PL/SQL procedure successfully completed.SQL> exitDisconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - ProductionWith the Partitioning, OLAP and Data Mining options

 

再启动服务

 

[oracle@myhost bin]$ ./emctl start dbconsoleTZ set to PRCOracle Enterprise Manager 10g Database Control Release 10.2.0.1.0  Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.http://myhost.com:1158/em/console/aboutApplicationStarting Oracle Enterprise Manager 10g Database Control ....... started. ------------------------------------------------------------------Logs are generated in directory /u01/app/oracle/oracle/product/10.2.0/db_1/myhost.com_orcl/sysman/log [oracle@myhost bin]$