How to update Oracle Database Time Zone:
First make a note of the existing timezone with the below query.
select SYSTIMESTAMP, current_TIMESTAMP from dual;
select to_char(sysdate,'DD-MON-YYYY HH24:MI:SS') from dual;
==================================================
To change timezone:(OS Level)
$tzselect
$timedatectl set-timezone <new_time_zone>
==================================================
Steps to be followed to change DBTIMEZONE:
=============================================================
SQL> SELECT SESSIONTIMEZONE, DBTIMEZONE FROM DUAL;
SESSIONTIMEZONE DBTIME
---------------- ------
-06:00 -07:00
SQL> ALTER DATABASE SET TIME_ZONE='Canada/Mountain';
Database altered.
SQL> ALTER DATABASE SET TIME_ZONE='-06:00';
Database altered.
SQL> shutdown immediate;
SQL> Startup;
SQL> SELECT SESSIONTIMEZONE, DBTIMEZONE FROM DUAL;
SESSIONTIMEZONE DBTIME
------------------ -----------
-06:00 -06:00
No comments:
Post a Comment
If you have any queries/ any suggestion please do comment and let me know.