biemond-oradb icon indicating copy to clipboard operation
biemond-oradb copied to clipboard

Add ability to use ASM diskgroups for pluggable database

Open Mortinke opened this issue 7 years ago • 2 comments

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.

Mortinke avatar Sep 16 '16 05:09 Mortinke

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.

Mortinke avatar Sep 16 '16 08:09 Mortinke

yeah, that is a much better solution. else we need to make a custom type which can handle both.

biemond avatar Sep 17 '16 11:09 biemond