Skip to main content

How to Add a Target in Oracle Enterprise Manager

Adding a target host and database in Oracle Enterprise Manager

Introduction

With OEM installed, the next step is registering the servers and databases you actually want to monitor. This article follows on from our OEM 13.5 Installation on Linux post and walks through adding a target host to OEM, then registering the database and listener running on it, step by step.

Prerequisites

Below are the minimum requirements for a Linux environment:

  • Connectivity between the OEM and target servers.
  • The target hostname/IP entry added to OEM's /etc/hosts file, and vice versa.
  • Minimum 5GB free disk space on the target machine.
  • Root user or sudo access on the target machine.
  • Firewall disabled, or ports such as 1521 and 3872 opened between OEM and the target.

Environment Used in This Guide

OEM
Hostname oem.oraeasy.com
OS OL 7.3
OEM Version 13c Release 5 (13.5)
OMS Home /oem/app/oracle/middleware
Agent Base /oem/app/oracle/agent

Target
Hostname uat.oraeasy.com
OS OL 8.5
Database Name ORCLDB
Database Version 19c (19.27)
Oracle Home /u01/app/oracle/product/19c/db_home

Approach: We'll first add the target host itself to OEM, then add the database and listener running on that host as separate targets.

Step 1: Verify Database Services and Prepare the Target

Confirm the database and listener are already running on the target before OEM tries to discover them, and create the directories the management agent will need once it's deployed.


SQL> select name,open_mode,database_role,log_mode from v$database;

NAME      OPEN_MODE            DATABASE_ROLE    LOG_MODE
--------- -------------------- ---------------- ------------
ORCLDB    READ WRITE           PRIMARY          ARCHIVELOG

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 ORCLPDB                        READ WRITE NO

[oracle@uat ~]$ lsnrctl status

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 06-SEP-2025 20:15:42

Copyright (c) 1991, 2025, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=uat.oraeasy.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                06-SEP-2025 20:15:04
Uptime                    0 days 1 hr. 10 min. 40 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/19c/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/uat/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=uat.oraeasy.com)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "3d7f7aee5db8a4eee0650a00273ebb20" has 1 instance(s).
  Instance "orcldb", status READY, has 1 handler(s) for this service...
Service "86b637b62fdf7a65e053f706e80a27ca" has 1 instance(s).
  Instance "orcldb", status READY, has 1 handler(s) for this service...
Service "orcldb" has 1 instance(s).
  Instance "orcldb", status READY, has 1 handler(s) for this service...
Service "orcldbXDB" has 1 instance(s).
  Instance "orcldb", status READY, has 1 handler(s) for this service...
Service "orclpdb" has 1 instance(s).
  Instance "orcldb", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@uat ~]$
[oracle@uat ~]$ mkdir -p /u01/app/oracle/agent
[oracle@uat ~]$ mkdir -p /u01/app/oracle/agent_inst

Step 2: Add the Host Target in OEM

Adding the host deploys the OEM management agent onto the target server, which is what actually collects and reports data back to OMS.

Click Setup, then Add Target, then Add Targets.

OEM Setup menu with Add Target and Add Targets options

Under Add Host Target, click Install Agent on Host.

Selecting Install Agent on Host in OEM's Add Target screen

Click Add, then provide the target hostname and platform, then click Next.

Entering target hostname and platform for agent installation

Provide the base and instance directories. Click the + sign next to Credential and add credential details for both the oracle and root users, as shown below.

Setting agent base and instance directories in OEM

Credential entry for the oracle user:

Adding oracle user credential for agent deployment

Credential entry for the root user:

Adding root user credential for agent deployment

Click Next.

Agent deployment configuration summary screen

Review the details, then click Deploy Agent.

Reviewing agent deployment details before installing

Monitor the deployment progress.

Agent deployment progress screen
Agent deployment progress continuing
Agent deployment near completion

The agent has been successfully deployed.

Agent deployment successfully completed confirmation

Step 3: Add the Database and Listener as Targets

With the agent running, OEM can now discover and register the Oracle targets on that host.

Click Setup, then Add Target, then Add Targets, then click Add Using Guided Process.

Selecting Add Using Guided Process in OEM

In Guided Discovery, type and select Database, Listener, and so on, then click Add.

Selecting Database and Listener target types in Guided Discovery

Click the search icon to add the host.

Searching for the host to discover targets on

Click the hostname, then click Select.

Selecting the target host from the search results

Click Next.

Confirming host selection before target discovery

Target discovery runs in the background.

Target discovery in progress on the host

Check the box for the discovered database, provide the credentials for the DBSNMP user, then click Test Connection.

Selecting the discovered database and entering DBSNMP credentials

If DBSNMP is locked or the password is unknown, reset it on the target database first.


SQL> select username,account_status from dba_users where username='DBSNMP';

USERNAME             ACCOUNT_STATUS
-------------------- ----------------
DBSNMP               LOCKED

SQL>
SQL> alter user DBSNMP identified by YourPassword account unlock;

User altered.

SQL> select username,account_status from dba_users where username='DBSNMP';

USERNAME             ACCOUNT_STATUS
-------------------- -----------------
DBSNMP               OPEN

SQL> show pdbs

    CON_ID CON_NAME       OPEN MODE  RESTRICTED
---------- ------------ - ---------- ----------
         2 PDB$SEED       READ ONLY  NO
         3 ORCLPDB        READ WRITE NO
         
SQL> alter session set container=ORCLPDB;

Session altered.

SQL> select username,account_status from dba_users where username='DBSNMP';

USERNAME             ACCOUNT_STATUS
-------------------- -----------------
DBSNMP               OPEN

The connection test succeeds once DBSNMP is unlocked with the correct password.

Successful database connection test in OEM

Select the listener as well, then click Next.

Selecting the listener alongside the database target

Review the details, then click Save.

Reviewing database and listener target details before saving

Target saving is in progress.

Target saving in progress screen

The targets have been saved successfully. Click Close.

Confirmation that targets were saved successfully

Step 4: View the Added Targets

Both the host and its database can now be browsed directly from the Targets menu.

Click Targets, then Host, then click the host you want to view.

Browsing the Targets, Host menu in OEM

From here you can view host-level details like CPU and memory usage.

Host target details showing CPU and memory usage

Similarly, click Targets, then Database, then click the database you want to view.

Browsing the Targets, Database menu in OEM

Here you can view details like active sessions on the target database.

Database target details showing active sessions

With that, the target host and its database and listener are fully registered and visible in OEM. We'll be covering more OEM activities in future articles, so stay connected.

Thank you for reading!

I hope this content has been helpful to you. Your feedback and suggestions are always welcome. Feel free to leave a comment or reach out with any queries.

Abhishek Shrivastava

Oracle DBA with hands-on experience managing production Data Guard, RAC, GoldenGate, and APEX environments. I write practical, tested installation and troubleshooting guides based on real deployment work.

📧 Email: oraeasyy@gmail.com
🌐 Website: www.oraeasy.com

Follow Us

Comments