在oracle 12c上创建PDB的时候报了如下错误:
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
SQL> show con_name
CON_NAME
------------------------------
CDB$ROOT
SQL> create pluggable database salespdb admin user salesadm identified by oracle;
create pluggable database salespdb admin user salesadm identified by oracle
*
ERROR at line 1:
ORA-65016: FILE_NAME_CONVERT must be specified
[oracle@foidndb admin]$ oerr ora 65016
65016, 00000, "FILE_NAME_CONVERT must be specified"
// *Cause: Data files, and possibly other files, needed to be copied as a
// part of creating a pluggable database. However, Oracle Managed
// Files (OMF) was not enabled, PDB_FILE_NAME_CONVERT was not defined,
// and there was a failure to specify the FILE_NAME_CONVERT clause.
// *Action: Enable OMF or define PDB_FILE_NAME_CONVERT system parameter before
// issuing CREATE PLUGGABLE DATABASE statement, or specify
// FILE_NAME_CONVERT clause as a part of the statement.
//
[oracle@foidndb admin]$
如果未指定db_create_file_dest 参数则需要手动在CREATE PLUGGABLE DATABASE时指定FILE_NAME_CONVERT,例如:
SQL> create pluggable database salespdb admin user salesadm identified by oracle file_name_convert=('/u01/data/ora18c/pdbseed/','/u01/data/ora18c/salespdb/');
Pluggable database created.
也可以使用参数db_create_file_dest
SQL> alter system set db_create_file_dest='/u01/data/ora18c';
System altered.
SQL> create pluggable database salespdb2 admin user salesadm2 identified by oracle;
Pluggable database created.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 SALESPDB MOUNTED
4 SALESPDB2 MOUNTED
|