![]() | Oracle System Handbook - ISO 7.0 May 2018 Internal/Partner Edition | ||
|
|
![]() |
||||||||||||
Solution Type Problem Resolution Sure Solution 1519975.1 : How to Change the Timezone in Your ODA V1, X3-2, X4-2 X5-2 Using OAKCLI (Oracle Database Appliance)
Timezones are set when you deploy the ODA V1, X3-2, X4-2 and X5-2. To change the Timezone you need to alter the onecommand.params file to your new value. You can then redeploy the Timezone executing step 6 of the GridInst.pl command. This note shows you how. Applies to:Oracle Database Appliance Software - Version 2.1.0.1 to 12.1.2.9 [Release 2.1 to 12.1]Oracle Database Appliance - Version All Versions to All Versions [Release All Releases] Oracle Database Appliance X3-2 - Version All Versions to All Versions [Release All Releases] Oracle Database Appliance X4-2 - Version All Versions to All Versions [Release All Releases] Oracle Database Appliance X5-2 - Version All Versions to All Versions [Release All Releases] Information in this document applies to any platform. SymptomsYou have deployed the Oracle database Appliance ( ODA ) Hardware version V1, X3-2, X4-2 X5-2 and now you want to change the Timezone from the one set during deployment to a new value - or - You want to change or switch the Timezone value currently used to a new value. ChangesNeed to change timezone value which is now assessed as incorrect CauseThere are several potential reasons to change the Timezone to a new value:
SolutionODA Timezone1) Login to NODE1 (SC0) of ODA as root / <pwd> Confirm what the current timezone value is by issuing DATE from the OS command line [root@oda1] date
Example [root@odarm1 onecmd]# date Tue Feb 26 10:44:28 CST 2013 << CST is for the USA Central Standard Timezone (CST)
Comment:
OneCommand should always be issued from the First Node (for Legacy ODA versions X5-2 and lower) For newer ODA versions including ODA Lite X6-2* and X7-2* please review comments at the bottom of this article [root@oda1] cd /opt/oracle/oak/onecmd [root@oda1 onecmd] ls Example [root@odarm1 onecmd]# ls
Agent_actionScript.pl network orai18n-utility.jar asrIlom.pl oakdiag parsetime.sh cleanupDeploy.pl ohj.jar passwd.jar dbconsole onecommand-default-ocm.rsp runodaDg.pl dtime.sh onecommand.jar setupdiskCometPlusDisk.pl GridDefParams.pm onecommand.params share.jar GridInst.pl ... SUN-HW-TRAP-MIB.mib GridSteps.pm onecommand.params-sample T4DBTemplate.dbt help-share.jar onecommand.properties tmp jewt4.jar oracle_ice.jar upgrade_config.params Linux orai18n-mapping.jar
[root@oda1 onecmd] cp onecommand.params onecommand.params.old
If the onecommand.params file does not exist:
- If you do not know the valid timezone values you can look these up [root@oda1 onecmd]# date
Tue Feb 26 10:44:28 CST 2013 -- this confirms the current Time and Timezone (e.g. CST) vi onecommand.params ---- # CLUSTERINFO DBMPREFIX=odarm DOMAIN=us.oracle.com CLUSTERNAME=odarm-c REGION=America TIMEZONE=America/Chicago ... ... edit the timezone to the proper value
[root@oda1 onecmd]# vi onecommand.params ---- # CLUSTERINFO DBMPREFIX=odarm DOMAIN=us.oracle.com CLUSTERNAME=odarm-c REGION=America TIMEZONE=America/Denver << altered to your preferred timezone e.g. Denver ... ...
see ls command above
Issue ./GridInst.pl -l on Bare metal systems To confirm what each step is including SetTimezone issue ./GridInst.pl -l [root@odarm2 onecmd]# ./GridInst.pl -l
./ GridInst.pl -s 6 [root@odarm1 onecmd]# ./GridInst.pl -s 6
- or for virtualization you will use the -o flag issued from ODA_BASE ./GridInst.pl -s 6 -o Comment: Make sure that the dom0 and db domain use the same Timezone
Run the step to set the new Timezone value set in the new onecommand.params file which has your expected Timezone value ./GridInst.pl -s 6 or ./GridInst.pl -s 6 -o R
Example: [root@odarm2 onecmd]# ./GridInst.pl -s 6 -o
INFO : Logging all actions in /opt/oracle/oak/onecmd/tmp/STEP-6-20130226103534.log and traces in /opt/oracle/oak/onecmd/tmp/STEP-6-20130226103534.trc INFO : Loading configuration file /opt/oracle/oak/onecmd/onecommand.params... INFO : Creating nodelist files... ================================================================================== INFO : 2013-02-26 10:35:34 INFO : Step 6 SetTimezone INFO : Setting up Timezone /opt/oracle/oak/onecmd/tmp/setuptz.sh ... INFO : Running as root: /usr/bin/ssh -l root odarm1 /opt/oracle/oak/onecmd/tmp/setuptz.sh ... INFO : Running as root: /usr/bin/ssh -l root odarm2 /opt/oracle/oak/onecmd/tmp/setuptz.sh INFO : Time spent in step 6 SetTimezone is 5 seconds. ================================================================================== INFO : Log file is /opt/oracle/oak/onecmd/tmp/STEP-6-20130226103534.log... Exiting... Database ENV (OS) timezone
srvctl setenv database -d ORCL -t TZ=America/Denver
e.g. [root@oda1 onecmd] date [root@odarm1 onecmd]# date
The above does the necessary TIMEZONE changes for OS, however, the database or listener will not read these changed values until the binary is restarted "...If TZ is changed after the database is started starts PMON will not pick up the changed value..."
See: - Note 301420.1 Why does sysdate have the Wrong Time Stamp when Connecting via the Listener
Helpful commands srvctl getenv database -d <dbname>
srvctl setenv database -d <dbname> -t 'TZ=<the TZ you want>' srvctl setenv listener -l <listenername> -t 'TZ=<the TZ you want>'
GRID TIMEZONE
The change to s_crsconfig_<HOSTNAME>_env.txt is done manually As the grid user: cd /u01/app/11.2.0.3/grid/crs/install/ vi the view s_crsconfig_<MyODAname>_env.txt ### Do not modify this file except to change NLS_LANG or in this case the TZ, or under the direction of Oracle Support Services ...
TZ=America/Denver NLS_LANG=AMERICAN_AMERICA.AL32UTF8 TNS_ADMIN= ORACLE_BASE=
A restart of GI is required after the edit of s_crsconfig_env.txt : See: -- Note 1209444.1 How To Change Timezone for 11gR2 Grid Infrastructure
e.g.. srvctl setenv asm -t TZ=America/Denver << example for Denver
# date (this to check the date now)
Example:
[root@r001 zoneinfo]# cd /etc [root@r001 etc]# rm localtime [root@r001 etc]# ln -s /usr/share/zoneinfo/Poland localtime [root@r001 etc]# date mar 20 feb 2018, 10.02.14, CET
References<NOTE:301420.1> - Why does sysdate have the Wrong Time Stamp when Connecting via the Listener<NOTE:1209444.1> - How To Change Timezone for Grid Infrastructure Attachments This solution has no attachment |
||||||||||||
|