How to Get All Oracle Databases Size From OEM Repository

Database Manager asks you as a DBA about all the database size in the supported environment .

SQL> select host_name,target_name, sum( FILE_SIZE/1024/1024/1024)
     from mgmt$db_datafiles 
     group by host_name,target_name 
     order by host_name, target_name;

HOST_NAME                                TARGET_NAME                              SUM(FILE_SIZE/1024/1024/1024)
---------------------------------------- ---------------------------------------- -----------------------------
HOST1                                    DB1                                                    38.65
HOST2                                    DB2                                                    385.88
HOST3                                    DB3                                                    27.52
...
..
.

OR we can use another another view mgmt$db_tablespaces :

SQL> select host_name,target_name,sum( TABLESPACE_SIZE/1024/1024/1024) 
     from mgmt$db_tablespaces 
     group by host_name,target_name 
     order by 1,2;

OEM NAMED CREDENTIAL : java.util.HashMap cannot be cast to oracle.sysman.emSDK.sec.targetauth.EMTargetConnectionPool

On OEM, when DBA trying to browse database performance or top activity page,
The following error occurs:

java.util.HashMap cannot be cast to oracle.sysman.emSDK.sec.targetauth.EMTargetConnectionPool

Checked named credential working fine against database target, and preferred credential has been setup against database target accordingly.

Subscribe to get access

Read more of this content when you subscribe today.

Failed to connect to ASM instance. The connection is closed: The connection is closed

One client OEM reports the following incidents intermittently from OEM 13c.

Host=racnode1.virtuallab
Target type=Automatic Storage Management
Target name=+ASM1_racnode1.virtuallab
Categories=Availability
Message=Failed to connect to ASM instance. The connection is closed: The connection is closed
Severity=Fatal
Event reported time=20/12/2020 09:19:01AM EST
Target Lifecycle Status=Test
Operating System=LINUX
Platform=X86_64
Associated Incident Id=12345
Associated Incident Status=New
Associated Incident Owner=oracle
Associated Incident Acknowledged By Owner=No
Associated Incident Priority=High
Associated Incident Escalation Level=0
Event Type=Target Availability
Event name=Status
Availability status=Down

Let’s do some investigations, and provide the easy workaround if patches are unavailable to some clients.

Subscribe to get access

Read more of this content when you subscribe today.

ORA-24327: need explicit attach before authenticating a user (DBD ERROR: OCISessionBegin)

One of the OEM agent log has the following error, and some of the jobs fail due to the database connection issues:

$ grep ORA-24327 *
gcagent.log.16:em_error=Could not connect to dbsnmp/(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=racnode1.virtuallab)(Port=1521))(CONNECT_DATA=(SID=RACTESTDB1))): ORA-24327: need explicit attach before authenticating a user (DBD ERROR: OCISessionBegin)

The output from CA( Corrective Action) job:

Connector descriptor is (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=racnode1.virtuallab)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=RACTESTDB)(SERVER=DEDICATED)))
Could not connect to SYSTEM/(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=racnode1.virtuallab)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=RACTESTDB)(SERVER=DEDICATED))):ORA-24327: need explicit attach before authenticating a user (DBD ERROR: OCISessionBegin)

Subscribe to get access

Read more of this content when you subscribe today.

oracle.sysman.gcagent.task.TaskTimeoutException: task timeout: 120000 MILLISECONDS for oracle_database: ORCL:Response

There following alert has been received with timeout error message “…oracle.sysman.gcagent.task.TaskTimeoutException: task timeout: 120000 MILLISECONDS…”

 Host=oemnode1 
 Target type=Database Instance 
 Target name=OEMPROD
 Incident creation time=13/11/2020 10:09:39 PM AEDT 
 Last updated time=13/11/2020 10:09:39 PM AEDT 
 Message=Metric evaluation error start - oracle.sysman.emSDK.agent.fetchlet.exception.FetchletException: Timeout during collection: oracle.sysman.gcagent.task.TaskTimeoutException: task timeout: 120000 MILLISECONDS for oracle_database:OEMPROD:Response 
 Severity=Critical 
 Incident ID=463520 
 Event count=1 
 Incident Status=New 
 Escalated=No 
 Priority=High 
 Incident owner=SYSMAN
 Incident Acknowledged By Owner=No 
 Categories=Availability 
 ...
..
.

Subscribe to get access

Read more of this content when you subscribe today.