CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDB READ WRITE NO
SQL> show con_name
CON_NAME
------------------------------
CDB$ROOT
SQL> CREATE PLUGGABLE DATABASE app1
2 AS APPLICATION CONTAINER
3 ADMIN USER admin1 IDENTIFIED BY app_123 ROLES=(CONNECT);
ADMIN USER admin1 IDENTIFIED BY app_123 ROLES=(CONNECT)
*
ERROR at line 3:
ORA-65016: FILE_NAME_CONVERT must be specified
由于未指定db_create_file_dest参数导致的,
SQL> show parameter db_create_file_dest
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_create_file_dest string
SQL> alter system set db_create_file_dest='/u01/app/oracle/oradata/';
System altered.
SQL> CREATE PLUGGABLE DATABASE app1
2 AS APPLICATION CONTAINER
3 ADMIN USER admin1 IDENTIFIED BY app_123 ROLES=(CONNECT);
Pluggable database created.
验证:
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDB READ WRITE NO
4 APP1 MOUNTED
SQL> select name from v$datafile;
NAME
-------------------------------------------------------
/u01/app/oracle/oradata/SZTECH/BA573656E52A29C2E0539100
A8C0DD5E/datafile/o1_mf_system_j1l33oo5_.dbf