ITPub博客

首页 > 数据库 > 数据库开发技术 > Specifying the Database Time Zone File (81)

Specifying the Database Time Zone File (81)

原创 数据库开发技术 作者:tsinglee 时间:2007-12-25 15:25:08 0 删除 编辑

Two time zone files are included in the Oracle home directory. The default time zone
file is $ORACLE_HOME/oracore/zoneinfo/timezonelrg.dat. A smaller time
zone file can be found in $ORACLE_HOME/oracore/zoneinfo/timezone.dat.

If you are already using the smaller time zone file and you want to continue to use it in
an Oracle Database 10g environment or if you want to use the smaller time zone file
instead of the default time zone file, then complete the following tasks:
1. Shut down the database.
2. Set the ORA_TZFILE environment variable to the full path name of the
timezone.dat file.
3. Restart the database.

If you are already using the default time zone file, then it is not practical to change to
the smaller time zone file because the database may contain data with time zones that
are not part of the smaller time file.

All databases that share information must use the same time zone datafile.

The time zone files contain the valid time zone names. The following information is
also included for each time zone:
■ Offset from Coordinated Universal Time (UTC)
■ Transition times for Daylight Saving Time
■ Abbreviations for standard time and Daylight Saving Time
To view the time zone names in the file being used by your database, use the following
query:

SELECT * FROM V$TIMEZONE_NAMES;

指定数据库时区文件
1. 在$ORACLE_HOME/oracore/zoneinfo目录下 , 包含了timezonelrg.dat和timezone.dat两个时区
文件 , 前者为默认的 , 后者比较小
2. 使用较小的时区文件需要遵循以下步骤 :
a. 关闭数据库
b. 指定ORA_TZFILE环境变量 , 该变量的值需要为timezone.dat文件的全路径
c. 重新启动数据库
3. 共享信息的数据库需要使用相同的时区文件
4. 时区文件包含以下信息 :UTC , 事务操作的夏令时 , 标准时间与夏令时的缩写
5. SELECT * FROM V$TIMEZONE_NAMES; 使用该语句可查询数据库使用的时区文件

[@more@]

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/10599713/viewspace-995745/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
  • 博文量
    740
  • 访问量
    2002849