In this Document
APPLIES TO:Enterprise Manager for Oracle Database - Version 13.2.2.0.0 and laterInformation in this document applies to any platform. GOALHow to update Oracle Home target property on multiple targets after manually upgrading database or using out of place patching?SOLUTIONThe only method that can be used to bulk update this property currently is emcli:
emcli modify_target -type='<target_type>' -name='<target_name>' -properties='OracleHome:<oracle_home_path>' -on_agent
In order to generate the emcli command for multiple targets you can use below sql code for example on OMS repository database (replace the regex expressions and replace parameters as per your requirements):
select
target_name , target_type , 'emcli modify_target -type=' ||chr(39) || target_type || chr(39) || ' -name=' || chr(39) || target_name || chr(39) || ' -properties=' || chr(39) || property_name||':'||replace(property_value,'12.2.0.1','18.0.0.0') || chr(39) as cmdA , 'emcli modify_target -type=' ||chr(39) || target_type || chr(39) || ' -name=' || chr(39) || target_name || chr(39) || ' -properties=' || chr(39) || property_name||':'||replace(property_value,'12.2.0.1','18.0.0.0') || chr(39)|| ' -on_agent' as cmdB from sysman.mgmt$target_properties where target_type in ( 'osm_cluster' , 'oracle_listener' , 'has' , 'oracle_home' , 'cluster' , 'osm_proxy' , 'osm_instance' ) and property_name='OracleHome' and property_value='/u01/app/oracle/product/11.2.0.4/dbhome_1' and ( regexp_like(target_name,'celem','i') or ( regexp_like(target_name,'LISTENER_SCAN[[:digit:]]{1}_','i') and regexp_like(target_name,'celem$','i') ) ) order by target_type , target_name ; |
oracledbaonly,oracle,dataguard,RAC,Performance tuning.ASM,Users,RMAN, Backup, Recovery, ORA-
Showing posts with label ORACLE SUPPORT DOC. Show all posts
Showing posts with label ORACLE SUPPORT DOC. Show all posts
Wednesday, April 22, 2020
Sunday, April 19, 2020
Incorrect SYSDATE shown when connected via Listener in RAC
ORACLE SUPPORT DOCUMENT:
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Cloud Schema Service - Version N/A and later
Information in this document applies to any platform.
Affected Database: Oracle
1) Check the environment variables set for database and listener in your CRS configuration
2) Check the current environment variables used for PMON and Listener
Refer: How to Check the Environment Variables for an Oracle Process Document 373303.1
3) Compare and if required set the TZ setting with the above
APPLIES TO:
Oracle Database Exadata Cloud Machine - Version N/A and laterOracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Cloud Schema Service - Version N/A and later
Information in this document applies to any platform.
Affected Database: Oracle
SYMPTOMS
- Incorrect SYSDATE shown when connected via listener
- Restart of database and listener did not help
- OS defined TZ timezone setting is correct, but still not picked up by listener
CAUSE
- Listener might have a different Envs variable setting for Timezone
- Listener is started by LSNRCTL instead of SRVCTL or vice versa
- PMON only reads the OS environment variables when the database is started. If TZ is changed after the database is started PMON will not pick up the changed value.
When dynamic database service registration is enabled to a listener, PMON both registers the service name and also the environment variables for the database associated with that service name. This means that connections via the dynamically registered service handler will continue to use the old TZ timezone setting.
If the listener is restarted and also has a static service registration, connection via the listener will use the TZ set in the listener until PMON first re-registers the service handler again. When the listener has two service registrations, one static and one dynamic, then the dynamic one will be used.
- Listener is started by LSNRCTL instead of SRVCTL or vice versa
- PMON only reads the OS environment variables when the database is started. If TZ is changed after the database is started PMON will not pick up the changed value.
When dynamic database service registration is enabled to a listener, PMON both registers the service name and also the environment variables for the database associated with that service name. This means that connections via the dynamically registered service handler will continue to use the old TZ timezone setting.
If the listener is restarted and also has a static service registration, connection via the listener will use the TZ set in the listener until PMON first re-registers the service handler again. When the listener has two service registrations, one static and one dynamic, then the dynamic one will be used.
SOLUTION
For 11.2.0.2 and above the TZ entry in $GRID_HOME/crs/install/s_crsconfig_<nodename>_env.txt sets to correct time zone! This enables resources started under the Grid Infrastructure home (listener, databases) using the timezone set in here and so has no requirement anymore to set TZ for DB and listener via setenv. For more details see: How To Change Timezone for 11gR2 Grid Infrastructure ( Document 1209444.1)
1) Check the environment variables set for database and listener in your CRS configuration
srvctl getenv database -d <dbname>
srvctl getenv nodeapps -n <nodename>
-- If you are 11.2, then use 'getenv listener' instead of 'getenv nodeapps':
srvctl getenv listener
srvctl getenv nodeapps -n <nodename>
-- If you are 11.2, then use 'getenv listener' instead of 'getenv nodeapps':
srvctl getenv listener
2) Check the current environment variables used for PMON and Listener
Refer: How to Check the Environment Variables for an Oracle Process Document 373303.1
3) Compare and if required set the TZ setting with the above
Subscribe to:
Posts (Atom)
student guide Dataguard: GLOBAL_DBNAME = <dbuniquename>_DGMGRL.example.com Example: listener.ora on Primary Hosts Static listener ent...
