最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Oracle的PDB數(shù)據(jù)庫(kù)創(chuàng)建DIRECTORY時(shí)遇到ORA-65254問(wèn)題及解決方法

 更新時(shí)間:2023年06月09日 08:31:33   作者:瀟湘隱者  
這篇文章主要介紹了Oracle的PDB數(shù)據(jù)庫(kù)創(chuàng)建DIRECTORY時(shí)遇到ORA-65254問(wèn)題,本文給大家分享完美解決方案,需要的朋友可以參考下

在Oracle 19c多租戶(hù)環(huán)境的PDB數(shù)據(jù)庫(kù)下面創(chuàng)建一個(gè)DIRECTORY時(shí),遇到了“ORA-65254: invalid path specified for the directory”,下面簡(jiǎn)單演示一下所遇到的這個(gè)案例

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
##注意,創(chuàng)建DIRECTORY時(shí),這個(gè)目錄/db19c/exp_dump已經(jīng)存在。
SQL>?
SQL>?!oerr?ora?65254
65254,?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>

如上所示,數(shù)據(jù)庫(kù)提示,出現(xiàn)這個(gè)錯(cuò)誤的原因在于創(chuàng)建PDB的語(yǔ)句中指定了PATH_PREFIX參數(shù),創(chuàng)建目錄DIRECTORY時(shí)只能使用相對(duì)路徑,而不能使用絕對(duì)路徑。其實(shí)創(chuàng)建PDB時(shí),如果設(shè)置了PATH_PREFIX參數(shù),那么這個(gè)PDB中的所有對(duì)象只能限定在PATH_PREFIX指定的路徑下,,只能指定基于PATH_PREFIX的相對(duì)路徑。官方文檔關(guān)于這個(gè)的解釋如下所示:

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.

也就是說(shuō),如果我要?jiǎng)?chuàng)建一個(gè)目錄,只能使用相對(duì)路徑的目錄,而且必須在PATH_PREFIX指定的/db19c/oracle_data/PDB6/下面,想指定到其他路徑,例如/db19c/exp_dump.此時(shí)就會(huì)拋出ORA-65254錯(cuò)誤。

解決方法

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???

關(guān)于這種問(wèn)題,如果在創(chuàng)建PDB數(shù)據(jù)庫(kù)時(shí),不設(shè)定參數(shù)PATH_PREFIX就不會(huì)遇到這個(gè)問(wèn)題。一般沒(méi)有特殊要求,也不用設(shè)定參數(shù)PATH_PREFIX。

到此這篇關(guān)于Oracle的PDB數(shù)據(jù)庫(kù)創(chuàng)建DIRECTORY時(shí)遇到ORA-65254的文章就介紹到這了,更多相關(guān)Oracle的PDB數(shù)據(jù)庫(kù)內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

最新評(píng)論

碌曲县| 吴桥县| 如东县| 邵东县| 肥东县| 台北市| 绍兴市| 霍邱县| 肥乡县| 瓮安县| 宣汉县| 宜宾市| 祁门县| 三穗县| 黎城县| 全椒县| 津南区| 温宿县| 江达县| 治多县| 广西| 大英县| 从化市| 台安县| 长宁县| 河曲县| 桐柏县| 新兴县| 宁安市| 巴林左旗| 隆化县| 平山县| 郧西县| 辛集市| 宁河县| 宿松县| 兖州市| 济宁市| 巴林右旗| 靖边县| 梅河口市|