前几天完成的grid control需要调整时区,原来的时区默认为美国中部时间,现在需要调整为北京时间。
在aix中调整时区很简单,smitty chtz,选择“beist - 8”即可,然后重启。系统启动完成后,启动数据库没问题,启动oms也没有问题,启动agent,报错了。因为时区不能被oracle程序识别,不能启动。
看了下手册,需要重置时区
$./emctl resetTZ agent
系统输出:
Oracle Enterprise Manager 10g Release 4 Grid Control 10.2.0.4.0.
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
Updating /oracleb/OracleHomes/agent10g/sysman/config/emd.properties...
Successfully updated /oracleb/OracleHomes/agent10g/sysman/config/emd.properties.
Login as the em repository user and run the script.:
exec mgmt_target.set_agent_tzrgn('gridi4:1830','+08:00')
and commit the changes
This can be done for example by logging into sqlplus and doing
SQL> exec mgmt_target.set_agent_tzrgn('gridi4:1830','+08:00')
SQL> commit
$./emctl start agent
错误依旧,仔细看了一下上面的输出,发现'+08:00'这个有很大的问题,通过查看agent10g/sysman/admin/supportedtzs.lst,里面对应 GMT +8的项里面对应的是Asia/Shanghai,Asia/Chongqing,就是没有北京,那就只好用上海吧。
首先修改agent10g/sysman/config/emd.properties最后一行,把 +08:00改为 Asia/Shanghai,然后登录到db10g的数据库中,执行:
exec mgmt_target.set_agent_tzrgn('gridi4:1830','Asia/Shanghai');
执行
$./emctl start agent
agent启动成功了。
出现这个问题的主要原因是:oracle没有能够把操作系统的关于时区的环境变量与自己的命名方法对应,造成其不能正确识别,以至于agent不能启动。
在aix中调整时区很简单,smitty chtz,选择“beist - 8”即可,然后重启。系统启动完成后,启动数据库没问题,启动oms也没有问题,启动agent,报错了。因为时区不能被oracle程序识别,不能启动。
看了下手册,需要重置时区
$./emctl resetTZ agent
系统输出:
Oracle Enterprise Manager 10g Release 4 Grid Control 10.2.0.4.0.
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
Updating /oracleb/OracleHomes/agent10g/sysman/config/emd.properties...
Successfully updated /oracleb/OracleHomes/agent10g/sysman/config/emd.properties.
Login as the em repository user and run the script.:
exec mgmt_target.set_agent_tzrgn('gridi4:1830','+08:00')
and commit the changes
This can be done for example by logging into sqlplus and doing
SQL> exec mgmt_target.set_agent_tzrgn('gridi4:1830','+08:00')
SQL> commit
$./emctl start agent
错误依旧,仔细看了一下上面的输出,发现'+08:00'这个有很大的问题,通过查看agent10g/sysman/admin/supportedtzs.lst,里面对应 GMT +8的项里面对应的是Asia/Shanghai,Asia/Chongqing,就是没有北京,那就只好用上海吧。
首先修改agent10g/sysman/config/emd.properties最后一行,把 +08:00改为 Asia/Shanghai,然后登录到db10g的数据库中,执行:
exec mgmt_target.set_agent_tzrgn('gridi4:1830','Asia/Shanghai');
执行
$./emctl start agent
agent启动成功了。
出现这个问题的主要原因是:oracle没有能够把操作系统的关于时区的环境变量与自己的命名方法对应,造成其不能正确识别,以至于agent不能启动。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/115963/viewspace-594808/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/115963/viewspace-594808/