Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

CREATE PDB from SEED with file_name_convert and ASM

Peter_L_Feb 21 2016 — edited Feb 23 2016

Hi,

currently I am testing multitenant features for future customer requests. So I want to make it easy  to create a PDB from SEED.

Datafiles are placed in ASM and no use of OMF.

While performing

create pluggable database pdb_templ admin user test identified by test

I've got "file_name_convert is missing".

So I identify the SEED datafiles:

+DBDATA/REPODB/FD9AC20F64D244D7E043B6A9E80A2F2F/DATAFILE/pdbseed_temp012016-02-17_01-41-13-pm.dbf

+DBDATA/REPODB/FD9AC20F64D244D7E043B6A9E80A2F2F/DATAFILE/sysaux.256.904052445

+DBDATA/REPODB/FD9AC20F64D244D7E043B6A9E80A2F2F/DATAFILE/system.256.904052445

and try

create pluggable database pdb1 admin user test identified by test file_name_convert=('+DBDATA/REPODB/FD9AC20F64D244D7E043B6A9E80A2F2F/DATAFILE/,'+DBDATA/REPODB/PDB1/');

this failed with "ASM Alias +DBDATA/REPODB/PDB1 refers to a directory


then I try it with complete seed file conversions in FILE_NAME_CONVERT

create pluggable database pdb1 admin user test identified by test file_name_convert=('+DBDATA/REPODB/FD9AC20F64D244D7E043B6A9E80A2F2F/DATAFILE/pdbseed_temp012016-02-17_01-41-13-pm.dbf','+DBDATA/REPODB/PDB1/temp.dbf','+DBDATA/REPODB/FD9AC20F64D244D7E043B6A9E80A2F2F/DATAFILE/sysaux.256.904052445','+DBDATA/REPODB/PDB1/sysaux.dbf','+DBDATA/REPODB/FD9AC20F64D244D7E043B6A9E80A2F2F/DATAFILE/system.265.904052445','+DBDATA/REPODB/PDB1/system.dbf')

this worked, but it is very complicated to use that long convert string every time I want to create a PDB (I know there are DBCA and EM Cloud Control for creating a PDB too, but I still want to know that)

I assumed FILE_NAME_CONVERT works only with usergenerated directory structure. Thats why I copy and rename the original SEED datafiles.

startup mount

...

alter database rename file '+DBDATA/REPODB/FD9AC20F64D244D7E043B6A9E80A2F2F/DATAFILE/pdbseed_temp012016-02-17_01-41-13-pm.dbf' to '+DBDATA/REPODB/SEED/temp.dbf'

alter database rename file '+DBDATA/REPODB/FD9AC20F64D244D7E043B6A9E80A2F2F/DATAFILE/sysaux.256.904052445' to '+DBDATA/REPODB/SEED/sysaux.dbf'

alter database rename file '+DBDATA/REPODB/FD9AC20F64D244D7E043B6A9E80A2F2F/DATAFILE/system.265.904052445' to '+DBDATA/REPODB/SEED/system.dbf'

alter database open

The entire database cames up without problems and opened the seed.

Now lets try it again:

create pluggable database pdb1 admin user test identified by test file_name_convert=(' +DBDATA/REPODB/SEED','+DBDATA/REPODB/PDB1')

- And It works!

My Questions:

Is that what did (rename SEED datafiles) offical supported?

Why it's not possible, to skip the file_name_convert when I create PDB from SEED (the "target" should be enough)? During CREATE PDB from a seed, the interpreter should detect DB-seed files and build implicit the file_name_convert clause (Feature request to Oracle). 

Why does FILE_NAME_CONVERT not works below system generated directories?

Regards Peter

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 22 2016
Added on Feb 21 2016
7 comments
4,335 views