Oracle Enterprise Manager Database Express

Welcome to the first tutorial of Oracle Enterprise Manager Database Express Series. In this series we will be learning the fundamentals of Oracle Enterprise Manager. So, let’s start with the most asked question –

During the installation I forgot to copy the URL of the Oracle Enterprise manager, what should I do?

Database configuration –

But before I address this question let me quickly brief you about the database configuration which I will be using for this demonstration—

So, I am using Oracle Database 19c enterprise edition which is the latest offering from the Oracle. Also, I have done its installation video. Therefore you can check it out here.

Also, in my Oracle Database I have just one container and one pluggable database configured. In addition the name of the container database is CDB$ROOT and the name of the pluggable database is ORCLPDB.

Furthermore, I am using Oracle 19c here. But these steps also apply for Oracle 12c and 18c. As the process is the same.

Therefore, if you haven’t setup your Oracle Database then click here to watch the installation video.

What is Oracle Enterprise Manager Express—

Oracle Enterprise Manager Database Express or OEM Express is a light weight web-based database management tool which comes built in with your Oracle Database software.

What is the URL of Oracle Enterprise Manager?

As Oracle Enterprise Manager is a web-based tool thus to access it we need a valid URL. And this URL is made up of two components, which are –

  1. Domain Name, and
  2. Port Number

Consequently, the Domain name is either the IP address or the name of the computer over which you have installed and configured your Oracle Database Server. So, if you have configured Oracle Database on your local machine, then this will be ‘localhost’. 

How to find the port number For Oracle Enterprise Manager?

In order to access the Oracle EM, we need to know the valid port number which OUI has assigned to it either during the installation or during the database creation.

In addition, Oracle Universal Installer (OUI) sets the port number 5500 by default for your Oracle Enterprise manager. Yes, 5500 is the default port number for Oracle Enterprise Manager.

However, if port number 5500 is already occupied by some other services then in this case OUI assigns next available port number to your OEM express. And the process of finding out that port number is as follows –

Step 1: Log on to your database –

Log on to your database using the sys or system user. Moreover, using high privileged user like sys or system is recommended.

>sqlplus / as sysdba

The above command will connect you with your database using the “sys user”. Furthermore, Sys is an external user thus instead of writing its username or password you simply put a forward slash.

Click here to read how to create your own external user.

Consequently, you can verify if you are connected to the database using the “sys user” or not, like this –

>SHOW user;

This command will show you the user through which you are currently connected with your database.

Step 2: Check your container

In the newer versions of Oracle database, especially which are based on multi-tenant architecture the oracle engine differentiates between login from a CDB and a PDB through the port number which we use in the URL of the enterprise manager.

Therefore, it is always advisable to verify the container name beforehand. In addition, you can verify the container name like this –

>SHOW con_name;

This command will show you the container name through which you are currently connected to your database.

Meanwhile if you want to switch your container then you can refer to this video from my Facebook Page. Also, make sure to follow me there too.

How To Switch FROM CDB TO PDB

A Quick Tutorial On How To Switch From Container Database To Pluggable #Database in Oracle.#Programming #Code

Posted by Manish Sharma on Monday, July 29, 2019
A Quick Tutorial On How To Switch FROM CDB TO PDB.

Step 3: Port Number of The Oracle EM.

Once you have successfully connected to your database and verified the container then you are all set to find out the port number for your Oracle Enterprise Manager.

We use a built-in function “gethttpsport” from the Oracle Database library to find out the port number.

The “gethttpsport” Function

The “gethttpsport()” function is defined inside the “DBMS_XDB_CONFIG” package. This function returns the https port number for the container into which you have called this function.

As this function is defined inside the DBMS_XDB_CONFIG package thus we will be using the dot notation to call it. Which means we will first write the name of the package DBMS_XDB_CONFIG followed by a dot (.) and the name of the function which is gethttpsport()

We will be calling this function using the SELECT statement. Like this

SELECT DBMS_XDB_CONFIG.gethttpsport() FROM dual;

Here, Dual is a dummy table which Oracle creates while configuring the database. Also, I have an Instagram post on Dual table, check here.

As a result upon execution this SELECT statement will return a number. And this will be the port number for your Oracle Enterprise Manager. In case if it returns 0 then it means no port is assigned for Oracle EM and you have to set it up manually.

I will be doing a dedicated video on how to manually set Port for Oracle EM. So stay tuned!

Therefore, that is how you can find out the port number for your Oracle Enterprise Manager. Now the question is how to find out the domain name.

Doman Name for Oracle Enterprise Manager

The domain name is either the IP-Address or the Name of the computer over which you have installed and configured your Oracle Database Server. So, you can always ask your network admin or your DBA for this information.

But in case you are a newly joined DBA who has access to the server then you can always use Oracle in-built utility to get whatever information you want.

For example, In Oracle Database Server, usually listener takes care of domain and port number. Hence, you can use it to find out the desired information.

You simply have to combine the Oracle command with the windows shell command like this

>LSNRCTL status | findstr HOST

Consequently, on execution this will show you all the statements containing the values for HOST from your listener. Therefore, you simply have to pick the hostname corresponding to the port number which you just found out.

That’s all you have to do.

That is the tutorial on how to find out the URL for accessing the Oracle Enterprise Manager Database Express. Hope you enjoyed reading it. Please share it with your friends on your social media.

Watch The Video For The Live Demonstration

Also, if you still have any doubts then feel free to leave me a message on my Facebook, here.

Thanks and have a great day.

Oracle Enterprise Manager FAQ