Database Administration (MOSC)

MOSC Banner

How to start PDB service at startup in Active Dataguard

edited Dec 1, 2023 8:51PM in Database Administration (MOSC) 5 commentsAnswered ✓

Hi

I'm using Oracle 19.17.

I'm running Active Dataguard: 1 PRIMARY database with 1 service in 1 PDB , and 1 duplicated STANDBY database opened in read only mode (WITH APPLY).

I would like the STANDBY PDB automatically opened, and the service in this PDB automatically started at STANDBY normal read only startup (without switchover or failover).

As I can't save PDB state in read only STANDBY, I created this trigger to open PDB and start service:

CREATE  TRIGGER register_open_GBPROD  AFTER STARTUP ON DATABASE
BEGIN
    EXECUTE IMMEDIATE 'ALTER PLUGGABLE DATABASE ALL OPEN';
    
     -- 
	EXECUTE IMMEDIATE 'alter session set container = "GBPROD"';

    --DBMS_SERVICE.START_SERVICE(service_name => 'SVC_GBPROD_BO');
    --EXECUTE IMMEDIATE 'ALTER SYSTEM REGISTER';
END
Tagged:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center