biemond-oradb
biemond-oradb copied to clipboard
Add ability to use ASM diskgroups for pluggable database
Currently, we use the $pdb_datafile_destination parameter to verify that the pluggable database already exists.
exec { "dbca pdb execute ${title}":
command => $command,
timeout => 0,
path => $execPath,
cwd => $oracle_home_dir,
user => $user,
group => $group,
creates => $pdb_datafile_destination,
logoutput => $log_output,
}
If I want use asm diskgroups for the $pdb_datafile_destination parameter like '+DATA', i get the error, that the value for the creates parameter from exec must be a full qualified path. Thus, we can not use ASM disksgroups for pluggable databases.
One solution could be to use the postPDBCreation.log or plugDatabase.log file, which always created at the end of the creation process from the plugable database in the directory ${oracle_base}/cfgtoollogs/dbca/${source_db}/${pdb_name}.
ls -lr /u01/app/oracle/cfgtoollogs/dbca/devdb/devpdb/
total 12
-rw-r-----. 1 oracle dba 7 Sep 16 01:02 postPDBCreation.log
-rw-r-----. 1 oracle dba 251 Sep 16 01:02 plugDatabase.log
-rw-r-----. 1 oracle dba 503 Sep 16 01:02 devdb.log
Unfortunately, this files are not delete if the plugable database is deleted.
Once a plugable database has been deleted, a deletePDB.log file is always created in the directory ${oracle_base}/cfgtoollogs/dbca/${source_db}/upcase(${pdb_name})/
ls -ltr /u01/app/oracle/cfgtoollogs/dbca/devdb/DEVPDB
total 0
-rw-r-----. 1 oracle oinstall 0 Sep 16 06:52 deletePDB.log
Possibly we could use this file to check which file is older, the postPDBCreation.log or the deletePDB.log file.
yeah, that is a much better solution. else we need to make a custom type which can handle both.