How to Unregister a Database from RMAN Repository

Target Database is Still Available

You connect to the target database TEST and then unregister it:

rman TARGET SYS/Passwd@TEST CATALOG rman/rman@catdb

RMAN> UNREGISTER DATABASE NOPROMPT;

Unregistering a Database That is Not Unique in Catalog or Target Database is Unvailable

The following UNIX shell script unregisters database testdb from the recovery catalog. Because multiple databases called testdb are registered in the recovery catalog, and because RMAN is not connected to the target database (which has already been deleted from the file system), you must run SET DBID:

Show DBID of a database:

RMAN >  list incarnation of database testdb;
rman CATALOG rman/rman@catdb
RMAN> RUN
{  
  SET DBID 1334531173;   # specifies test database by DBID
  UNREGISTER DATABASE testdb NOPROMPT;
}

List all Registered Database

RMAN > LIST DB_UNIQUE_NAME ALL;

OGGMON-20272:OGG Monitor Instance Is Unable To Register The OGG Instance Due To Null

Symptoms

Oracle Goldengate monitor instance is not able to register with the Jagent with the below error:


[2025-09-23T17:11:01.063+10:00] [JAGENT] [ERROR] [OGGMON-20272] [com.goldengate.monitor.jagent.jmx.MBeansContainerImpl] [tid: StatusCollector] [ecid: 0000P_WUnVbF^64_zTO5yW1cnElJ000003,0] unable to register the OGG instance. Due to null
[2025-09-23T17:11:11.063+10:00] [JAGENT] [ERROR] [OGGMON-20498] [com.goldengate.monitor.jagent.comm.ws.NotificationsCollector] [tid: StatusCollector] [ecid: 0000P_WUnVbF^64_zTO5yW1cnElJ000003,0] Exception thrown is: [[
java.lang.NullPointerException
at com.goldengate.monitor.jagent.comm.impl.ManagerFacadeImpl.getCachedInstances(ManagerFacadeImpl.java:299)
at com.goldengate.monitor.jagent.comm.ws.NotificationsCollector.checkAndDeleteProcess(NotificationsCollector.java:162)
at com.goldengate.monitor.jagent.comm.ws.NotificationsCollector.checkAndPublishRegisteredAndDeletedProcess(NotificationsCollector.java:150)
at com.goldengate.monitor.jagent.comm.ws.NotificationsCollector.run(NotificationsCollector.java:80)
at java.lang.Thread.run(Thread.java:750)

]]

Solution

  1. Check Jagent config file as per “GGMON-20272:OGG Monitor Instance Is Unable To Register The OGG Instance Due To Null (Doc ID 2618440.1)”
  2. If step 1 is not working and the Monitor Agent is used by Enterprise Manager (OEM).

    Make sure to bounce the Manager, then restart JAGENT and PMSRVR.
GGSCI > stop JAGENT
GGSCI > stop PMSRVR
GGSCI > stop *
GGSCI > stop manager
GGSCI > info all # all should be stopped
GGSCI > start manager
GGSCI > info all # all are up running
GGSCI > start JAGENT
GGSCI > info all # PMSRVR should be running as well

RMAN-06004: Oracle error from recovery catalog database: RMAN-20020: database incarnation not set

The following errors occur when RMAN backup took place:

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 08/06/2025 12:38:27
RMAN-03014: implicit resync of recovery catalog failed
RMAN-06004: Oracle error from recovery catalog database: RMAN-20020: database incarnation not set

RESOLUTION

RMAN> reset database;
reset database;
database incarnation already registered

ASM Instance ORA-04031: unable to allocate 232 bytes of shared memory (“shared pool”,”select ks.inst_id,ksuxsins,k…”,”KKSSP^2431″,”kglpn”)

One of the +ASM instance alert log has ORA-04031 errors:

2025-07-17T23:00:48.475567+10:00
Errors in file /u01/app/grid/diag/asm/+asm/+ASM1/trace/+ASM1_ppa7_64031.trc (incident=160513):
ORA-04031: unable to allocate 2072 bytes of shared memory ("shared pool","unknown object","sga heap(1,0)","parameter table block")
Incident details in: /u01/app/grid/diag/asm/+asm/+ASM1/incident/incdir_160513/+ASM1_ppa7_64031_i160513.trc
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
2025-07-17T23:00:48.550908+10:00
ORA-04031 heap dump being written to trace file /u01/app/grid/diag/asm/+asm/+ASM1/incident/incdir_160513/+ASM1_ppa7_64031_i160513.trc

CAUSES

The SGA_TARGET or MEMORY_TARGET parameter setting is too small.


SQL> SELECT INST_ID, POOL, NAME, BYTES/1024/1024 "SPACE MB"
FROM gv$sgastat
WHERE name = 'free memory'
AND POOL = 'shared pool'
ORDER BY INST_ID;


INST_ID POOL NAME SPACE MB
---------- -------------- ------------------------------ ----------
1 shared pool free memory 195.44057
2 shared pool free memory 115.6167
3 shared pool free memory 92.235062

RESOLUTION

Increase size of parameter SGA_TARGET or MEMORY_TARGET.

How to add a port to a service in firewalld

This post shows how to add port 5000 into filrewalld for Oracle Autonomous Health Framework (AHF) running on GI/RAC.

  1. List existing services:
    # firewall-cmd –get-services
  2. Add the port: If the service you want to modify already exists, use the following command to add the port: 

    # firewall-cmd –permanent –add-port=<port>/<protocol> –service=<service-name>
    eg.

    #firewall-cmd –permanent –add-port=5000/tcp –service=oracle_rac
  3. Reload firewalld: After making changes, reload firewalld to apply the new configuration:

    # firewall-cmd –reload
  4. Check the port added into service:

    # firewall-cmd –info-service=oracle_rac
    oracle_rac
    ports: 1521/tcp 5000/tcp
    protocols:
    source-ports:
    modules:
    destination:
    includes:
    helpers: