Hello Tom
I am upgrading a non CDB DB to CDB on oracle 19c.
But, my DB uses oracle managed files (OMF).
And I got
Create a PDB using description of the non-CDB
nohup ./CreatePDB.sh &
ERROR at line 1:
ORA-01276: Cannot add file
/opt/mycom/data/oracle/cdbnims/CDBNIMS1/pdb1/u04/NIMS/datafile/o1_mf_undotbs1_h3
op3vp0_.dbf. File has an Oracle Managed Files file name.
Below the 2 scripts I used:
1. to describe the new pdb.
2. to move datafiles.
1. more CreatePDBXML.sh
#!/bin/sh
sqlplus / as sysdba <<EOF
SHUTDOWN IMMEDIATE;
STARTUP OPEN READ ONLY;
BEGIN
DBMS_PDB.DESCRIBE(
pdb_descr_file => '/opt/mycom/3rd_party/oracle/app/oracle/products/19.0.0/NIMS.xml');
END;
/
SHUTDOWN IMMEDIATE;
exit;
EOF2. more CreatePDB.sh
!/bin/sh
export ORACLE_SID=CDBNIMS1
mkdir -p /opt/mycom/data/oracle/cdbnims/CDBNIMS1/pdb1
sqlplus / as sysdba <<EOF
CREATE PLUGGABLE DATABASE pdb1 USING '/opt/mycom/3rd_party/oracle/app/oracle/products/19.0.0/NIMS.xml'
MOVE
FILE_NAME_CONVERT = ('/opt/mycom/data/oracle/nims/', ' /opt/mycom/data/oracle/cdbnims/CDBNIMS1/pdb1/');
ALTER SESSION SET CONTAINER=pdb1;
@$ORACLE_HOME/rdbms/admin/noncdb_to_pdb.sql
ALTER PLUGGABLE DATABASE OPEN;
ALTER PLUGGABLE DATABASE SAVE STATE;
exit;
EOFThe second script exit with above error.
Indeed,some my data tables have been repartitioned (using rdbms redefiniton) and used OMF as datafiles.
Thanks a lot.
Moh
The FILE_NAME_CONVERT clause doesn't work with Oracle Managed Files!
So either omit this clause or set
FILE_NAME_CONVERT = NONE
You can set the DB_CREATE_FILE_DEST to control the file locations.