久久r热视频,国产午夜精品一区二区三区视频,亚洲精品自拍偷拍,欧美日韩精品二区

您的位置:首頁技術文章
文章詳情頁

Oracle的PDB數據庫創建DIRECTORY時遇到ORA-65254問題及解決方法

瀏覽:144日期:2023-09-18 20:52:31

在Oracle 19c多租戶環境的PDB數據庫下面創建一個DIRECTORY時,遇到了“ORA-65254: invalid path specified for the directory”,下面簡單演示一下所遇到的這個案例

SQL>?CREATE?PLUGGABLE?DATABASE?PDB6?ADMIN?USER?pdbadmin?IDENTIFIED?BY?hqLDJ7236#4U8JHD??2??STORAGE?(MAXSIZE?1G?MAX_SHARED_TEMP_SIZE?2G)??3??DEFAULT?TABLESPACE?TEST?DATAFILE?'/db19c/oracle_data/PDB6/test_data_01.dbf'?SIZE?100M??4??PATH_PREFIX?='/db19c/oracle_data/PDB6/'??5??FILE_NAME_CONVERT=('/db19c/CTEST/pdbseed/','/db19c/oracle_data/PDB6/');Pluggable?database?created.SQL>?SQL>?alter?pluggable?database?pdb6?open;Pluggable?database?altered.SQL>?alter?session?set?container=PDB6;Session?altered.SQL>?CREATE?OR?REPLACE?DIRECTORY?EXP_DUMP?AS?'/db19c/exp_dump';CREATE?OR?REPLACE?DIRECTORY?EXP_DUMP?AS?'/db19c/exp_dump'*ERROR?at?line?1:ORA-65254:?invalid?path?specified?for?the?directory##注意,創建DIRECTORY時,這個目錄/db19c/exp_dump已經存在。SQL>?SQL>?!oerr?ora?6525465254,?00000,?'invalid?path?specified?for?the?directory'//?*Cause:???An?absolute?path?was?used?in?the?CREATE?DIRECTORY?statement.?//???????????Since?the?PDB?has?set?the?PATH_PREFIX?property,?only?relative//???????????path?is?allowed?for?directories.//?*Action:??Specify?a?relative?path?and?reissue?the?statement.//SQL>

如上所示,數據庫提示,出現這個錯誤的原因在于創建PDB的語句中指定了PATH_PREFIX參數,創建目錄DIRECTORY時只能使用相對路徑,而不能使用絕對路徑。其實創建PDB時,如果設置了PATH_PREFIX參數,那么這個PDB中的所有對象只能限定在PATH_PREFIX指定的路徑下,,只能指定基于PATH_PREFIX的相對路徑。官方文檔關于這個的解釋如下所示:

Restrictions on PDB File Locations

The PATH_PREFIX clause of the CREATE PLUGGABLE DATABASE statement ensures that all directory object paths associated with the PDB are restricted to the specified directory or its subdirectories. This clause also ensures that the following files associated with the PDB are restricted to the specified directory: the Oracle XML repository for the PDB, files created with a CREATE PFILE statement, and the export directory for Oracle wallets. Use this clause when you want to ensure that a PDB's files reside in a specific directory and its subdirectories. You can use this clause to specify one of the following options:

An absolute path that is used as a prefix for all file paths associated with the PDB.

The name of a directory object that exists in the CDB root (CDB$ROOT). The directory object points to the absolute path to be used for PATH_PREFIX.

NONE to indicate that there are no restrictions for the file paths. Omitting the PATH_PREFIX clause is the same as specifying NONE.

After a PDB is created, its PATH_PREFIX setting cannot be modified.

也就是說,如果我要創建一個目錄,只能使用相對路徑的目錄,而且必須在PATH_PREFIX指定的/db19c/oracle_data/PDB6/下面,想指定到其他路徑,例如/db19c/exp_dump.此時就會拋出ORA-65254錯誤。

解決方法SQL>?CREATE?OR?REPLACE?DIRECTORY?EXP_DUMP?AS?'exp_dump';Directory?created.SQL>?SET?LINESIZE?1080;SQL>?COL?OWNER?FOR?A16;SQL>?COL?DIRECTORY_NAME?FOR?A30;SQL>?COL?DIRECTORY_PATH?FOR?A64;SQL>?SELECT?*?FROM?DBA_DIRECTORIES;OWNER??????DIRECTORY_NAME???????DIRECTORY_PATH?????????????????ORIGIN_CON_ID-------?------------------?-----------------------------------?-------------SYS??????????????EXP_DUMP???/db19c/oracle_data/PDB6/exp_dump???

關于這種問題,如果在創建PDB數據庫時,不設定參數PATH_PREFIX就不會遇到這個問題。一般沒有特殊要求,也不用設定參數PATH_PREFIX。

到此這篇關于Oracle的PDB數據庫創建DIRECTORY時遇到ORA-65254的文章就介紹到這了,更多相關Oracle的PDB數據庫內容請搜索好吧啦網以前的文章或繼續瀏覽下面的相關文章希望大家以后多多支持好吧啦網!

標簽: Oracle 數據庫
主站蜘蛛池模板: 洞口县| 洛隆县| 磐安县| 咸丰县| 京山县| 宝鸡市| 大姚县| 乌鲁木齐县| 云龙县| 来宾市| 辽阳市| 工布江达县| 松原市| 上林县| 安达市| 宜良县| 本溪市| 丰顺县| 石柱| 鲁山县| 麻江县| 彰化县| 洪雅县| 林芝县| 周至县| 咸阳市| 区。| 河东区| 宣化县| 尚义县| 塘沽区| 台北市| 游戏| 津南区| 盐边县| 扶沟县| 乌兰察布市| 尚志市| 类乌齐县| 全州县| 本溪|