Chinaunix首页 | 论坛 | 博客
  • 博客访问: 143174
  • 博文数量: 4
  • 博客积分: 4030
  • 博客等级: 上校
  • 技术积分: 520
  • 用 户 组: 普通用户
  • 注册时间: 2006-04-11 08:44
文章分类

全部博文(4)

文章存档

2008年(4)

我的朋友
最近访客

分类: Oracle

2008-04-03 17:55:24

这次出现这个问题有点奇怪,没有人动,stop再start就报这个错,真搞不懂
       出错如下:
 
[oracle@jk-backup ~]$ emctl start dbconsole
TZ set to US/Eastern
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
Timezone mismatch: The agentTZRegion value (US/Eastern) in
 /opt/oracle/product/10.2.0/db_1/jk-backup_jyb/sysman/config/emd.properties
does not match the current environment TZ setting(US/Eastern).
The dbconsole cannot run with this mismatch.
If US/Eastern is the correct timezone, set your timezone environment variable to US/Eastern and repeat the 'emctl start dbconsole' operation.
If US/Eastern 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.
 
下面是我在网上找到的一个解决方法,找了好长时间哦,谢谢这位老兄.呵呵
 
 

How to Troubleshoot Timezone Issues in Enterprise Manager 10g

记得上次在linux下安装OEM的很顺利,没什么问题,就可以直接启用了,这次出现了些问题
[h11h99@svr68 102]$ emctl start dbconsole
TZ set to US/Eastern
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
Timezone mismatch: The agentTZRegion value (US/Eastern) in
 /dgalai/resen/product/102/svr68.srs2.com_h11h99/sysman/config/emd.properties
does not match the current environment TZ setting(US/Eastern).
The dbconsole cannot run with this mismatch.
If US/Eastern is the correct timezone, set your timezone environment variable to US/Eastern and repeat the 'emctl start dbconsole' operation.
If US/Eastern 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.
很奇怪的事,TZ是一样的但就是启不起来.尝试按照metalink上说的但还是不行。
以下是操作方法方案
一)how to get TZ
echo $TZ or emd.properties
[h11h99@svr68 admin]$ grep agentTZ /dgalai/resen/product/102/svr68.srs2.com_h11h99/sysman/config/emd.properties
agentTZRegion=US/Eastern
二)validate the TZ
1.设置EMDROOT,EMSTAT
2.emdctl validateTZ agent US/Eastern
[h11h99@svr68 admin]$ EMDROOT=$ORACLE_HOME
[h11h99@svr68 admin]$ EMSTATE=$ORACLE_HOME
[h11h99@svr68 admin]$ export EMDROOT EMSTATE
[h11h99@svr68 admin]$ emdctl validateTZ agent US/Eastern
tzOffset for US/Eastern is -300(min), but agent is runnning with tzOffset -240(min)
trying again after waiting for 1 sec to account for daylight transition
tzOffset for US/Eastern is -300(min), but agent is runnning with tzOffset -240(min)
三)execute the script
for i in `/bin/cat $ORACLE_HOME/sysman/admin/supportedtzs.lst` ; do
    if [ -f /usr/share/zoneinfo/${i} ] ; then
       if [ "`/usr/bin/diff /etc/localtime /usr/share/zoneinfo/${i}`" = "" ] ; then
          echo "${i}"
       fi
fi
done
[h11h99@svr68 admin]$
[h11h99@svr68 admin]$ for i in `/bin/cat $ORACLE_HOME/sysman/admin/supportedtzs.lst` ; do
>     if [ -f /usr/share/zoneinfo/${i} ] ; then
>        if [ "`/usr/bin/diff /etc/localtime /usr/share/zoneinfo/${i}`" = "" ] ; then
>           echo "${i}"
>        fi
>     fi
>   done
America/New_York
US/Eastern
 
进入操作系统更改系统时区为PRC,再次启动就好了,崩溃.但还是不知道什么原因.
emctl resetTZ agent 会更新emd.properties文件中的东西,不需要手工添加,等于下面的操作
export TZ=PRC 
emctl config agent getTZ
emctl config agent updateTZ
emctl start agent
emctl start dbconsole
以下是详细信息
[h11h99@svr68 ~]$ cd $ORACLE_HOME
[h11h99@svr68 102]$ emctl resetTZ agent
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
Updating /dgalai/resen/product/102/svr68.srs2.com_h11h99/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('svr68.srs2.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('svr68.srs2.com:3938','PRC')
[h11h99@svr68 102]$ echo $TZ
[h11h99@svr68 102]$ emctl start dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.

Starting Oracle Enterprise Manager 10g Database Control ............ started.
------------------------------------------------------------------
Logs are generated in directory /dgalai/resen/product/102/svr68.srs2.com_h11h99/sysman/log
 
metalink Note:330737.1
Applies to:
Enterprise Manager Grid Control - Version: 10.1.0.2 to 10.2.0.0
Information in this document applies to any platform.
Purpose
This note provides an overview on how to debug issues that result from Timezone settings being incorrectly configured.
Starting from 10.1.0.4, there are 3 files which control the TZ information: supportedtzs.lst and nsupportedtzs.lst.
 
Scope and Application
This note can be used by Oracle Support and Oracle Customers to debug and troubleshoot timezone inconsistencies in EM 10g.
How to Troubleshoot Timezone Issues in Enterprise Manager 10g
Debugging steps for 10.1.0.4 and above -------------------------------------- 1) Make sure the following files exist in the $ORACLE_HOME/sysman/admin directory: nsupportedtzs.lst supportedtzs.lst tzmappings.lst 2) Check the TZ in the env and the agent properties file. This is just to 'proof' that it's OK. $ echo $TZ $ grep agentTZ emd.properties These two values should match 3) Start the agent, get the error from the commandline. This will show that the agent is complaining about the same TZ value 4) Run this command, and get the output: $ emctl config agent getTZ Will most likely fail with a similar error message 5) Manually run the validation routine (Which is the 'root-cause' thing that is broken here, and causing the startup problem) $ EMDROOT=$ORACLE_HOME $ EMSTATE=$ORACLE_HOME $ export EMDROOT EMSTATE $ emdctl validateTZ agent This will fail, but the error message is what we need. -> For a correct execution, there should be no output -> For a 'bad' validation, the output is going to look something like this: $ emdctl validateTZ agent US/Samoa tzOffset for US/Samoa is -660(min), but agent is runnning with tzOffset -360(min) trying again after waiting for 1 sec to account for daylight transition tzOffset for US/Samoa is -660(min), but agent is runnning with tzOffset -360(min) Note: - For iAS 9.0.4 and 10.1.2 Console agents, this routine does not exist 6) Quick and dirty thing to try: - Comment out the agentTZregion variable from the emd.properties file - Then start the agent - If the agent starts, it will have put a new agentTZregion var in the file, and then it would be interesting to know what the agent put in there.To get the system timezone via shell script: --------------------------------------------- Fom Linux: for i in `/bin/cat $ORACLE_HOME/sysman/admin/supportedtzs.lst` ; do if [ -f /usr/share/zoneinfo/${i} ] ; then if [ "`/usr/bin/diff /etc/localtime /usr/share/zoneinfo/${i}`" = "" ] ; then echo "${i}" fi fi done- Fom Solaris: grep -v "^#" /etc/TIMEZONE | grep TZ- For HP-UX: grep -v "^#" /etc/TIMEZONE | grep TZ- For AIX: grep -v "^#" /etc/environment | grep TZTo get the system timezone via JAVA: ------------------------------------ - Create a file called TestTZ.java, which contains this: -- -- import java.util.TimeZone; public class TestTZ { public TestTZ() { } public void printTimeZone() { System.out.println((TimeZone.getDefault()).getID()); } /** * @param args **/ public static void main(String[] args) { TestTZ testTZ = new TestTZ(); testTZ.printTimeZone(); } } - Compile the java program $ javac TestTZ- Run the java program $ java TestTZ
Purpose Of The File
 
File:
supportedtzs.lst
Directory: 
$ORACLE_HOME/sysman/admin
Type:
Ascii Text

This file contains the names of all supported time zones. Each of these strings can be used as the value for the TZ environment variable, and as the value for the agentTZregion property in
To get the list of all supported TimeZones from the database, issue this SQL statements: SELECT  TZname, TzAbbrev FROM V$TIMEZONE_NAMESORDER BY TzAbbrev
 
Structure of the file
## The following is the list of Timezone supported by the EM agent. # This is same as the list of timezones supported by 10g Oracle database.# # The timezones region are listed in groups, grouped by their standard offsets from GMT. # Within each group, the timezone region names are listed alphabetically. # Timezone regions with +00:00 standard offset from GMTAfrica/Casablanca Africa/FreetownAfrica/NouakchottAtlantic/CanaryAtlantic/FaeroeAtlantic/Madeira Atlantic/ReykjavikAtlantic/St_HelenaEireEtc/GMTEtc/GMT+0Etc/GMT-0Etc/GMT0 Etc/GreenwichEurope/BelfastEurope/DublinEurope/LisbonEurope/LondonGBGB-EireGMT GMT+0GMT-0GMT0GreenwichIcelandPortugalUTCWET Timezone regions with +01:00 standard offset from GMTAfrica/AlgiersAfrica/Ceuta Africa/TunisArctic/LongyearbyenCETEtc/GMT-1Europe/AmsterdamEurope/Belgrade Europe/BerlinEurope/BratislavaEurope/BrusselsEurope/BudapestEurope/Copenhagen Europe/GibraltarEurope/LjubljanaEurope/LuxembourgEurope/MadridEurope/Monaco Europe/OsloEurope/ParisEurope/PragueEurope/RomeEurope/San_MarinoEurope/Sarajevo Europe/SkopjeEurope/StockholmEurope/TiraneEurope/VaticanEurope/Vienna Europe/WarsawEurope/ZagrebEurope/ZurichMETPoland # Timezone regions with +02:00 standard offset from GMTAfrica/Cairo Africa/JohannesburgAfrica/KhartoumAfrica/TripoliAfrica/WindhoekAsia/Beirut Asia/DamascusAsia/GazaAsia/IstanbulAsia/JerusalemAsia/NicosiaAsia/Tel_AvivEET EgyptEtc/GMT-2Europe/AthensEurope/BucharestEurope/HelsinkiEurope/Istanbul Europe/KaliningradEurope/KievEurope/MinskEurope/RigaEurope/Simferopol Europe/SofiaEurope/TallinnEurope/VilniusIsraelLibyaTurkey # Timezone regions with +03:00 standard offset from GMTAfrica/Djibouti Africa/MogadishuAfrica/NairobiAsia/AdenAsia/AmmanAsia/BaghdadAsia/Bahrain Asia/KuwaitAsia/QatarAsia/RiyadhEtc/GMT-3Europe/MoscowIndian/MayotteW-SU # Timezone regions with +03:30 standard offset from GMTAsia/TehranIran # Timezone regions with +04:00 standard offset from GMTAsia/AqtauAsia/Baku Asia/DubaiAsia/MuscatAsia/TbilisiAsia/YerevanEtc/GMT-4Europe/Samara Indian/Reunion# Timezone regions with +04:30 standard offset from GMTAsia/Kabul # Timezone regions with +05:00 standard offset from GMTAsia/AqtobeAsia/Bishkek Asia/KarachiAsia/TashkentAsia/YekaterinburgEtc/GMT-5Indian/Chagos # Timezone regions with +05:30 standard offset from GMTAsia/Calcutta # Timezone regions with +06:00 standard offset from GMTAsia/AlmatyAsia/Dacca Asia/NovosibirskAsia/OmskEtc/GMT-6 # Timezone regions with +06:30 standard offset from GMTAsia/RangoonIndian/Cocos # Timezone regions with +07:00 standard offset from GMTAsia/BangkokAsia/Jakarta Asia/KrasnoyarskAsia/SaigonEtc/GMT-7Indian/Christmas # Timezone regions with +08:00 standard offset from GMTAsia/ChungkingAsia/Harbin Asia/Hong_KongAsia/IrkutskAsia/KashgarAsia/Kuala_LumpurAsia/KuchingAsia/Macao Asia/ManilaAsia/ShanghaiAsia/SingaporeAsia/TaipeiAsia/Ujung_PandangAsia/Urumqi Australia/PerthAustralia/WestEtc/GMT-8HongkongPRCROCSingapore # Timezone regions with +09:00 standard offset from GMTAsia/JayapuraAsia/Seoul Asia/TokyoAsia/YakutskEtc/GMT-9JapanROK # Timezone regions with +09:30 standard offset from GMTAustralia/Darwin Australia/North# Timezone regions with +10:00 standard offset from GMT Asia/VladivostokAustralia/BrisbaneAustralia/LindemanAustralia/Queensland Etc/GMT-10Pacific/GuamPacific/Saipan # Timezone regions with +10:30 standard offset from GMTAustralia/Adelaide Australia/Broken_HillAustralia/SouthAustralia/Yancowinna # Timezone regions with +11:00 standard offset from GMTAsia/MagadanAustralia/ACT Australia/CanberraAustralia/HobartAustralia/LHIAustralia/Lord_Howe Australia/MelbourneAustralia/NSWAustralia/SydneyAustralia/Tasmania Australia/VictoriaEtc/GMT-11Pacific/Noumea # Timezone regions with +11:30 standard offset from GMTPacific/Norfolk # Timezone regions with +12:00 standard offset from GMTAsia/KamchatkaEtc/GMT-12 KwajaleinPacific/KwajaleinPacific/WakePacific/Wallis # Timezone regions with +13:00 standard offset from GMTAsia/AnadyrEtc/GMT-13NZ Pacific/AucklandPacific/Fiji # Timezone regions with +13:45 standard offset from GMTNZ-CHATPacific/Chatham # Timezone regions with -01:00 standard offset from GMTAmerica/Scoresbysund Atlantic/AzoresEtc/GMT+1# Timezone regions with -02:00 standard offset from GMT America/AraguainaAmerica/FortalezaAmerica/MaceioAmerica/NoronhaAmerica/Sao_Paulo Brazil/DeNoronhaBrazil/EastEtc/GMT+2 # Timezone regions with -03:00 standard offset from GMTAmerica/Asuncion America/BelemAmerica/Boa_VistaAmerica/Buenos_AiresAmerica/CayenneAmerica/Cuiaba America/GodthabAmerica/MiquelonAmerica/MontevideoAmerica/Santiago Atlantic/StanleyChile/ContinentalEtc/GMT+3 # Timezone regions with -03:30 standard offset from GMTAmerica/St_Johns Canada/Newfoundland# Timezone regions with -04:00 standard offset from GMT America/AnguillaAmerica/CaracasAmerica/CuracaoAmerica/Goose_Bay America/GuadeloupeAmerica/HalifaxAmerica/La_PazAmerica/ManausAmerica/Martinique America/MontserratAmerica/Porto_VelhoAmerica/Puerto_RicoAmerica/St_Thomas America/ThuleAmerica/TortolaAmerica/VirginAtlantic/BermudaBrazil/West Canada/AtlanticEtc/GMT+4# Timezone regions with -05:00 standard offset from GMT America/BogotaAmerica/CaymanAmerica/DetroitAmerica/Fort_WayneAmerica/Grand_Turk America/GuayaquilAmerica/HavanaAmerica/IndianapolisAmerica/Indiana/Indianapolis America/Indiana/KnoxAmerica/Indiana/MarengoAmerica/Indiana/VevayAmerica/Jamaica America/Knox_INAmerica/LimaAmerica/LouisvilleAmerica/MontrealAmerica/New_York America/PanamaAmerica/Thunder_BayAmerica/Porto_AcreBrazil/AcreCanada/Eastern Chile/EasterIslandCubaESTEST5EDTEtc/GMT+5JamaicaPacific/EasterUS/East-Indiana US/EasternUS/Indiana-StarkeUS/Michigan # Timezone regions with -06:00 standard offset from GMTAmerica/Cambridge_Bay America/CancunAmerica/ChicagoAmerica/Costa_RicaAmerica/El_Salvador America/GuatemalaAmerica/IqaluitAmerica/ManaguaAmerica/Mexico_City America/Rankin_InletAmerica/ReginaAmerica/Swift_CurrentAmerica/Tegucigalpa America/WinnipegCSTCST6CDTCanada/CentralCanada/East-Saskatchewan Canada/SaskatchewanEtc/GMT+6Mexico/GeneralUS/Central # Timezone regions with -07:00 standard offset from GMTAmerica/Boise America/ChihuahuaAmerica/Dawson_CreekAmerica/DenverAmerica/Edmonton America/InuvikAmerica/MazatlanAmerica/PhoenixAmerica/ShiprockAmerica/Yellowknife Canada/MountainEtc/GMT+7MSTMST7MDTMexico/BajaSurNavajoUS/ArizonaUS/Mountain # Timezone regions with -08:00 standard offset from GMTAmerica/Dawson America/EnsenadaAmerica/Los_AngelesAmerica/TijuanaAmerica/Vancouver America/WhitehorseCanada/PacificCanada/YukonEtc/GMT+8Mexico/BajaNortePSTPST8PDT US/PacificUS/Pacific-New# Timezone regions with -08:30 standard offset from GMT Pacific/Pitcairn# Timezone regions with -09:00 standard offset from GMT America/AnchorageAmerica/JuneauAmerica/NomeEtc/GMT+9Pacific/GambierUS/Alaska # Timezone regions with -09:30 standard offset from GMTPacific/Marquesas # Timezone regions with -10:00 standard offset from GMTAmerica/AdakAmerica/Atka Etc/GMT+10HSTPacific/FakaofoPacific/HonoluluPacific/JohnstonPacific/Rarotonga Pacific/TahitiUS/AleutianUS/Hawaii # Timezone regions with -11:00 standard offset from GMTEtc/GMT+11Pacific/Midway Pacific/NiuePacific/Pago_PagoPacific/SamoaUS/Samoa # Timezone regions with -12:00 standard offset from GMT# -12:00 Offset from GMT Etc/GMT+12
阅读(2979) | 评论(0) | 转发(0) |
0

上一篇:Oracle-Schema理解

下一篇:Oracle-Schema理解

给主人留下些什么吧!~~