Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Find Time Consuming SQL Statements in Oracle 10g Oracle
  • standard Monitoring – 1 Oracle
  • USE_NL and INDEX hints example Oracle
  • DB Console Mainenance. Oracle
  • fuser to check who is using diretory Linux/Unix
  • scripts to take listener.log backup Linux/Unix
  • Jai Shree Ram Linux/Unix
  • ORA-3136 Oracle
  • Wait.sql Oracle
  • scripts to take listener.log backup Linux/Unix
  • Generating XML from SQLPLUS Oracle
  • Jai Shree Ram Oracle
  • create trigger syntax Oracle
  • alter database backup controlfile to trace Oracle
  • New Latest Param.sql for finding all hidden parameters also Oracle

Key Management in Oracle: The Core Issue: Missing Master Key

Posted on 12-May-202612-May-2026 By Admin No Comments on 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 operation failed because this specific PDB had never been assigned its own key.

How we checked for the missing key:

SQL

-- Run in Source CDB
SELECT CON_ID, KEY_ID FROM V$ENCRYPTION_KEYS 
WHERE CON_ID = (SELECT CON_ID FROM V$PDBS WHERE NAME = 'YOURPDB');
-- Result was "no rows selected," confirming the key was missing.

2. The Hurdle: Auto-Login vs. Password

OCI databases usually run with an Auto-Login wallet. This is a “read-only” mode that allows the database to start up automatically. However, you cannot create a new key while the wallet is in this read-only mode. We had to manually “log in” with the administrative password to gain write access.

How we gained write access (at the CDB level):

SQL

-- Step A: Close the "Read-Only" session
ADMINISTER KEY MANAGEMENT SET KEYSTORE CLOSE;

-- Step B: Open the "Write" session using your password
ADMINISTER KEY MANAGEMENT SET KEYSTORE OPEN IDENTIFIED BY "Your_Password";

3. The Fix: Creating the PDB Key

Once we had write access at the top level, we had to go specifically into the PDB and tell Oracle to generate a new unique key for it.

How we created the new key:

SQL

-- Step C: Move into the PDB
ALTER SESSION SET CONTAINER = YOURPDB;

-- Step D: Open the PDB's specific "drawer" in the wallet
ADMINISTER KEY MANAGEMENT SET KEYSTORE OPEN IDENTIFIED BY "Your_Password";

-- Step E: Create and activate the new Master Key
ADMINISTER KEY MANAGEMENT SET KEY WITH BACKUP IDENTIFIED BY "Your_Password";

4. The Result: Success

After running these, the PDB finally had a “Master Key ID.” You verified this by running the query again and seeing a long string of numbers and letters (the KEY_ID) assigned to your PDB.

The final verification query:

SQL

SELECT CON_ID, KEY_ID, ACTIVATION_TIME FROM V$ENCRYPTION_KEYS;

Summary for your records:

  • The Error: ORA-28374 meant the PDB was “unlocked” but had no key to move.
  • The Fix: We used the admin password to create a unique key for the PDB.

Oracle

Post navigation

Previous Post: SAT Mathematics 10 questions and answer at the end.

Related Posts

  • get_vmstat_solaris Oracle
  • 339939.1 Running Cluster Verification Utility to Diagnose Install Problems Oracle
  • Processes Parameter decision Oracle
  • load SPM baseline from cursor cache Oracle
  • Find Plan Hash value fphv.sql Oracle
  • Gather Stats manually using DBMS_STATS after disabling DBMS_SCHEDULER jobs as previous entry Oracle

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • Ansible (0)
  • AWS (2)
  • Azure (1)
  • Django (0)
  • GIT (1)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (403)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (18)
  • rman-dataguard (26)
  • shell (150)
  • SQL scripts (350)
  • SQL Server (6)
  • Uncategorized (5)
  • Videos (0)

Recent Posts

  • Key Management in Oracle: The Core Issue: Missing Master Key12-May-2026
  • SAT Mathematics 10 questions and answer at the end.30-Apr-2026
  • top 10 AI news today30-Apr-2026
  • runon_allpdbs_show_conname.sh23-Apr-2026
  • runon_allcdbs_find_pdbs.sql23-Apr-2026
  • Running PDB on single node in RAC09-Apr-2026
  • find_arc.sql09-Apr-2026
  • pvm_pre_change.sql08-Apr-2026
  • find_encr_wallet.sql08-Apr-2026
  • find_pdbs.sql08-Apr-2026

Archives

  • 2026
  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Running select from V$ views from remote server Linux/Unix
  • copying/removing directory with all its subdirectory Linux/Unix
  • cold backup scripts to copy locally Linux/Unix
  • How to Use DBMS_STATS to Move Statistics to a Different Database Oracle
  • Processes Parameter decision Oracle
  • Explain Plan Doesn’T Change For Sql After New Statistics Generated Oracle
  • logminer and my_lbu Oracle
  • Sending SQLPLUS output in HTML format Oracle

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme