Specifying the Database Time Zone File (81)

tsinglee發表於2007-12-25

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部落格 ” ,連結:http://blog.itpub.net/10599713/viewspace-995745/,如需轉載,請註明出處,否則將追究法律責任。

相關文章