DBA Hub

📋Steps in this guide1/1

Change Timezone in Oracle Database for CDB and PDB

In this blog, We are going to see how to change DBTime zone in multitenent database. Oracle recommends setting the database time zone to UTC (0:00), as no

oracle configurationintermediate
by OracleDba
14 views
1

Overview

In this blog, We are going to see how to change DBTime zone in multitenent database. Oracle recommends setting the database time zone to UTC (0:00), as no conversion of time zones will be required.

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
CDB Level
SQL> SELECT DBTIMEZONE FROM dual;
DBTIME
------
+00:00
SQL> ALTER DATABASE SET TIME_ZONE='Europe/London';
Database altered.
SQL> SELECT dbtimezone FROM DUAL;
DBTIME
------
--- > No change. Bounce database to reflect change.
+00:00
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL>
SQL> startup
ORACLE instance started.
Total System Global Area 1325400064 bytes
Fixed Size                  8792488 bytes
Variable Size             822085208 bytes
Database Buffers          486539264 bytes
Redo Buffers                7983104 bytes
Database mounted.
Database opened.
SQL>
SQL>
SQL> SELECT dbtimezone FROM DUAL;
DBTIMEZONE
-------------
Europe/London

PDB Level
SQL> alter session set container=PDBPRIM;
Session altered.
SQL> SELECT dbtimezone FROM DUAL;
DBTIME
------
+00:00
SQL> ALTER DATABASE SET TIME_ZONE='Europe/London';
Database altered.
SQL> SELECT dbtimezone FROM DUAL;
DBTIME
------
+00:00
SQL> shutdown immediate;
Pluggable Database closed.
SQL>
SQL>
SQL> startup
Pluggable Database opened.
SQL> SELECT dbtimezone FROM DUAL;
DBTIMEZONE
-------------
Europe/London

Comments (0)

Please to add comments

No comments yet. Be the first to comment!