oracle多租户(CDB和PDB的不同时区)
作者:互联网
查看和修改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;
标签:dbtimezone,SET,CDB,ALTER,DUAL,oracle,pdb1,PDB,SELECT 来源: https://blog.csdn.net/weixin_39568073/article/details/115042402