【區別】“UTL_FILE_DIR引數” VS “DIRECTORY資料庫物件”
從Oracle 9iR2版本開始使用“UTL_FILE_DIR引數”和“DIRECTORY資料庫物件”都可以用於提供Oracle UTL_FILE包可訪問和操作的系統目錄資訊。但從文章《【引數】關於UTL_FILE_DIR引數“新奇詭異”的修改方法》(http://space.itpub.net/519536/viewspace-700147)中的描述,我們可以看到無論使用pfile還是spfile調整UTL_FILE_DIR引數都需要重新啟動資料庫,這便是使用這種方法的最大弊端。對於7*24小時執行的系統來說使用這種方法實現PL/SQL可操作的目錄是不現實的。取而代之的便是DIRECTORY資料庫物件。DIRECTORY資料庫物件可以隨需進行建立,同時許可權上的限制也可以透過DCL語句簡便調整。
MOS參考文章:Using CREATE DIRECTORY Instead of UTL_FILE_DIR init.ora Parameter [ID 196939.1]
Using CREATE DIRECTORY Instead of UTL_FILE_DIR init.ora Parameter
Pre 9iR2 (9.2) :
------------------
Each directory to be accessed by UTL_FILE must be listed (comma separated) in
the UTL_FILE_DIR init.ora parameter. This cannot be done with ALTER SYSTEM
(ORA-02095) - you have to bounce the database. The directory must be explicitly
specified again in UTL_FILE.FOPEN. And the number of characters for the utl_file_dir entry
is limited by the 255 character buffer size.
From 9iR2 :
---------------
Each directory to be accessed by UTL_FILE can be specified via the CREATE
DIRECTORY command. And specified via this level of indirection in
UTL_FILE.FOPEN.
It is the responsibility of the system and database administrators to implement
appropriate file and directory security on the database host. UTL_FILE won't
attempt to check for permission before executing an open/read/write/delete
request. We expect that the operating system will deny the request where
appropriate. UTL_FILE will blindly issue any action requested and look for
success or failure return status from the operating system.
By default UTL_FILE will have no file access because it will have no directory
access, until granted access by CREATE DIRECTORY by SYS or SYSTEM or a user
with DBA privileges. Since access privileges are granted on a per directory
basis, the DBA can control directory access by either (1) creating separate
directories for users with differing access requirements, or (2) use operating
system utilities and features for controling read and write access by users.
Good luck.
secooler
11.06.16
-- The End --
MOS參考文章:Using CREATE DIRECTORY Instead of UTL_FILE_DIR init.ora Parameter [ID 196939.1]
Using CREATE DIRECTORY Instead of UTL_FILE_DIR init.ora Parameter
Pre 9iR2 (9.2) :
------------------
Each directory to be accessed by UTL_FILE must be listed (comma separated) in
the UTL_FILE_DIR init.ora parameter. This cannot be done with ALTER SYSTEM
(ORA-02095) - you have to bounce the database. The directory must be explicitly
specified again in UTL_FILE.FOPEN. And the number of characters for the utl_file_dir entry
is limited by the 255 character buffer size.
From 9iR2 :
---------------
Each directory to be accessed by UTL_FILE can be specified via the CREATE
DIRECTORY command. And specified via this level of indirection in
UTL_FILE.FOPEN.
It is the responsibility of the system and database administrators to implement
appropriate file and directory security on the database host. UTL_FILE won't
attempt to check for permission before executing an open/read/write/delete
request. We expect that the operating system will deny the request where
appropriate. UTL_FILE will blindly issue any action requested and look for
success or failure return status from the operating system.
By default UTL_FILE will have no file access because it will have no directory
access, until granted access by CREATE DIRECTORY by SYS or SYSTEM or a user
with DBA privileges. Since access privileges are granted on a per directory
basis, the DBA can control directory access by either (1) creating separate
directories for users with differing access requirements, or (2) use operating
system utilities and features for controling read and write access by users.
Good luck.
secooler
11.06.16
-- The End --
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/519536/viewspace-700177/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle utl_file_dir引數詳解Oracle
- Oracle utl_file_dir引數解釋Oracle
- 【EXPDP】不使用DIRECTORY引數完成expdp資料備份
- oracle中設定UTL_FILE_DIR引數Oracle
- MySQL資料庫引數MySql資料庫
- 【DIRECTORY】普通使用者建立Oracle DIRECTORY資料庫物件的許可權需求及探索Oracle資料庫物件
- 調整資料庫引數資料庫
- oracle資料庫--Oracle雙引號和單引號的區別小結Oracle資料庫
- 資料湖 vs 倉庫 vs 資料庫資料庫
- DBI@引數資料型別資料型別
- 資料庫型別區分資料庫型別
- 調節Oracle資料緩衝區引數,緩衝整個資料庫(轉)Oracle資料庫
- 顯示資料庫所有引數資料庫
- Oracle 資料庫引數調整Oracle資料庫
- python之深入講解變數與名稱空間及資料引數與容器引數區別Python變數
- 天翼雲RDS資料庫如何修改資料庫引數資料庫
- 資料庫易混淆引數名以及引數檔案啟動資料庫到nomount狀態資料庫
- 資料湖 vs 資料倉儲 vs 資料庫資料庫
- DM7修改資料庫引數資料庫
- postgresql資料庫重要引數說明SQL資料庫
- Mysql 5.5 設定資料庫引數MySql資料庫
- MySQL 5.7資料庫引數優化MySql資料庫優化
- Nagios資料庫引數配置分析iOS資料庫
- 關於 oracle 設定引數時,scope型別為memory,重啟資料庫後引數失效Oracle型別資料庫
- 區塊鏈代表的資料庫和傳統資料庫有何區別區塊鏈資料庫
- 資料庫:drop、truncate、delete的區別資料庫delete
- C語言可變引數以及printf()、sprintf()、vsprintf() 的區別與聯絡C語言
- 達夢資料庫引數調整方法資料庫
- oracle 資料庫兩種引數檔案Oracle資料庫
- 使用SQL來分析資料庫引數(二)SQL資料庫
- RCU-資料庫初始化引數資料庫
- 配置資料庫非同步I/O引數資料庫非同步
- Oracle資料庫系統中的引數Oracle資料庫
- Oracle資料庫中的系統引數Oracle資料庫
- 關於資料庫標識類引數資料庫
- MySQL資料庫innodb_fast_shutdown引數MySql資料庫AST
- Java引數-Xms和-Xmx的區別Java
- 資料倉儲和傳統資料庫的區別資料庫