Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Metalink Note: Note:250655.1 : ADDM Basics USING THE AUTOMATIC DATABASE DIAGNOSTIC MONITOR Oracle
  • Postgres DB user and OS user. POSTGRESQL
  • set_env_dba Linux/Unix
  • remove archfiles only when it is applied to DR rm_archfiles.sh Linux/Unix
  • move_arch_files.ksh Linux/Unix
  • Drop tempfiles from database Oracle
  • useful dg links Oracle
  • FRA Information. Oracle
  • Good Oracle Architecture In Short and point to point Oracle
  • CPU Core related projections AWS
  • Drop specific SQL plan baseline – spm Oracle
  • avail.sh ( find filesystem spae usage) Linux/Unix
  • get_vmstat_solaris Oracle
  • 10g oem configuration Oracle
  • get_vmstat.ksh for Solaris Oracle

Running PDB on single node in RAC

Posted on 09-Apr-2026 By Admin

Configuring a PDB to Listen on a Specific RAC Node in Oracle Database

In Oracle Real Application Clusters (RAC) environments, you may need to restrict a Pluggable Database (PDB) to run on specific nodes. Here’s how to configure PDB MYPDB to listen only on node1:

Step-by-Step Configuration

1. Configure the PDB State on Node 1

First, ensure the PDB is open on your preferred node and save that state:

-- Connect to the PDB on Node 1
ALTER SESSION SET CONTAINER = MYPDB;

-- Open the PDB if it's not already open
ALTER PLUGGABLE DATABASE OPEN;

-- Save the open state for future restarts
ALTER PLUGGABLE DATABASE SAVE STATE;

The SAVE STATE command ensures the PDB will automatically open when the CDB starts on this node.

2. Configure the PDB State on Node 2

Next, explicitly close the PDB on other nodes and discard any saved state:

-- Connect to the PDB on Node 2
ALTER SESSION SET CONTAINER = MYPDB;

-- Close the PDB immediately
ALTER PLUGGABLE DATABASE CLOSE IMMEDIATE;

-- Discard any saved state for this PDB on Node 2
ALTER PLUGGABLE DATABASE DISCARD STATE;

The DISCARD STATE command removes any previously saved state, preventing the PDB from automatically opening on this node.

3. Configure the Service for Node Affinity

Finally, modify the service to ensure it only runs on your preferred node:

srvctl modify service -db node1 -service node1_mypdb.paas.oracle.com \
-modifyconfig -preferred node1 -available ""

This command:
– Sets node1 as the preferred node for the service
– Removes any available nodes (empty string after -available)
– Ensures the service (and thus the PDB) will only run on node1

Verification

After making these changes, verify your configuration:

  1. Check PDB status on each node:
    sql
    SELECT inst_id, name, open_mode FROM gv$pdbs;

  2. Verify service configuration:
    bash
    srvctl config service -db node1 -service node1_mypdb.paas.oracle.com

Important Notes

  • This configuration is particularly useful for:
  • License optimization (running certain PDBs only on licensed nodes)
  • Performance isolation
  • Workload separation
  • Remember that in a RAC environment, the PDB files must still be accessible from all nodes
  • The service name (node1_mypdb.paas.oracle.com) should match your actual service name

Would you like me to elaborate on any specific aspect of this configuration?

Oracle, RAC, SQL scripts

Post navigation

Previous Post: find_arc.sql
Next Post: runon_allcdbs_find_pdbs.sql

Related Posts

  • Rownum with Order by Oracle
  • How to find pinned objects from shared pool. (pinned via dbms_shared_pool.keep) Oracle
  • Backup and Recovery Scenarios Oracle
  • Oracle Internal Good Websites 1 Oracle
  • DBMS_UTILITY.ANALYZE_SCHEMA Oracle
  • SQLPLUS COPY command Precautions. Oracle

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
  • Good links for x$ tables in oracle. Oracle
  • get_ratio.sql get the ratio of users from v$session and this uses CASE-WHEN-THEN clause Oracle
  • runon_allcdbs_find_pdbs.sql Oracle
  • 276434.1 Modifying the VIP or VIP Hostname of a 10g or 11g Oracle Clusterware Node Oracle
  • note id 373303.1 Linux/Unix
  • In Addition to previous note, following grants needed on PERFSTAT user. Oracle
  • pvm_pre_change.sql Oracle
  • chk_space_SID.ksh Linux/Unix

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme