查看和修改CDB时区
show CON_NAME
SELECT dbtimezone FROM DUAL;
ALTER DATABASE SET TIME_ZONE=‘Europe/London’;
SHUTDOWN IMMEDIATE;
STARTUP;
SELECT dbtimezone FROM DUAL;
查看和修改PDB时区
ALTER SESSION SET CONTAINER = pdb1;
show pdbs
ALTER PLUGGABLE DATABASE pdb1 OPEN READ WRITE;
SELECT dbtimezone FROM DUAL;
ALTER DATABASE SET TIME_ZONE=‘US/Eastern’;
SHUTDOWN IMMEDIATE;
STARTUP;
ALTER SESSION SET CONTAINER = pdb1;
ALTER PLUGGABLE DATABASE pdb1 OPEN READ WRITE;
SELECT dbtimezone FROM DUAL;
检查当前时区版本
SELECT * FROM v$timezone_file;
SELECT tz_version FROM registry$database;
SELECT property_name, property_value
FROM database_properties
WHERE property_name LIKE ‘DST_%’;
显示时区文件的最新可用版本
SELECT DBMS_DST.get_latest_timezone_version
FROM dual;