#!/usr/bin/bash
ORACLE_HOME=/u02/app/oracle/product/19.0.0.0/dbhome_1
for v_inst in `ps -ef| grep pmon | awk '{print $8}' | grep -iv asm | grep -iv apx | awk -F"_" '{print $3}'`
do
echo "Instance name = $v_inst"
export ORACLE_SID=$v_inst
# Fetch the list of PDBs (excluding the Seed PDB)
# We use -S (silent) to keep the output clean for the loop
PDB_LIST=$(sqlplus -S / as sysdba <<EOF
SET HEAD OFF FEEDBACK OFF PAGES 0
SELECT name FROM v\$pdbs WHERE name != 'PDB\$SEED';
EXIT;
EOF
)
echo "----------------------------------------------------"
echo "Iterating through PDBs for SID: $ORACLE_SID"
echo "----------------------------------------------------"
for PDB in $PDB_LIST
do
echo "Checking PDB: $PDB"
sqlplus -S / as sysdba <<EOF
set lines 120 pages 200
ALTER SESSION SET CONTAINER = $PDB;
SHOW CON_NAME;
EXIT;
EOF
echo "----------------------------------------------------"
done
done
Key Management in Oracle: The Core Issue: Missing Master Key
Here is the step-by-step summary of the issue and the resolution, including the exact commands used. 1. The Core Issue: Missing Master Key In an Oracle Cloud (OCI) environment, every Pluggable Database (PDB) must have its own “Master Encryption Key” stored in a secure file called a Wallet. When you tried to clone YOURPDB, the…
Read More “Key Management in Oracle: The Core Issue: Missing Master Key” »
