diff --git a/createDatabase b/createDatabase index 89fcb4d..c66da48 100755 --- a/createDatabase +++ b/createDatabase @@ -27,20 +27,46 @@ set -Eeuo pipefail NEW_PDB="${1:-}" if [ -n "${NEW_PDB}" ]; then + if [ -f "${ORACLE_BASE}/${NEW_PDB}.pdb" ]; then + echo "Plugging existing pluggable database ${NEW_PDB} from ${ORACLE_BASE}/${NEW_PDB}.pdb" - RANDOM_PDBADIN_PASSWORD=$(date +%s | sha256sum | base64 | head -c 8) + sqlplus -s / as sysdba <