In this post I’ll review all the steps required to install OEM 13.4 including its repository database. The versions I’m going to install are OEM 13.4 and database 19.8 on the same Oracle Linux 8.
Preparing the Server
There are a few requirements for installing database and OEM. These requirements are hardware related (CPU, RAM, etc.), software related (required RPMs), and configuration (kernel parameters).
You can find the database requirements for Linux (all versions) here and OEM requirements for Linux (all versions) here.
Installing the Database
We will install Oracle database 19.3 for Linux, and on top of that we will apply 19.8 patch. Then we will create a new container database called REPO and a PDB call OEMREP. This will be a simple database installation.
Note that OL8 was released after database 19c was out, so you’ll get the following warning: “[INS-08101] Unexpected error while executing the action at state: ‘supportedOSCheck'”. I tried to ignore this warning but the installer was hanging, so instead I used the following and everything worked. Thanks Martin for this post about it:
export CV_ASSUME_DISTID=OEL7.8
Since installing Oracle database is pretty common, I’ll skip the specific steps here and assume we already installed 19.8 database and created the database as I mentioned above. I’ll just say that OEM doesn’t need any database option (like JVM, Test, Spatial, etc.), so you can uncheck all of them when creating the database and have a smaller cleaner database.
Automatic Startup of the Database
One thing that we need to take care of is automatic database startup and shutdown. Once installed, the OEM will start automatically (as Oracle handle it), but not the database. For OL7 and OL8 the information is quite confusing, so I’ll add how to do it here.
First, make sure that your /etc/oratab file is configured correctly (the database has the Y flag for auto start/stop). Then create the dbora.service file to manage the automatic operations of the database.
This is the /lib/systemd/system/dbora.service file:
[Unit]
Description=The Oracle Database Service
After=network.target
[Service]
Type=forking
RemainAfterExit=yes
KillMode=none
TimeoutStopSec=5min
User=oracle
Group=oinstall
ExecStart=/oracle/app/oracle/product/19c/db/bin/dbstart /oracle/app/oracle/product/19c/db &
ExecStop=/oracle/app/oracle/product/19c/db/bin/dbshut /oracle/app/oracle/product/19c/db
Restart=no
[Install]
# Puts wants directive for the other units in the relationship
WantedBy=default.target
Now, run these commands to enable and start the service:
[root@oem134ol8 system]# systemctl enable dbora.service
Created symlink /etc/systemd/system/default.target.wants/dbora.service → /usr/lib/systemd/system/dbora.service.
[root@oem134ol8 system]# systemctl start dbora.service
Configuring the Database for OEM
Once the database is ready we should set it up for OEM.
At the CDB level:
- SGA_TARGET should be at least 3GB
- SHARED_POOL_SIZE should be at least 600MB
- There should be at least 3 redo log groups, each at least 300MB
At the PDB level:
alter system set "_allow_insert_with_update_check"=true;
alter system set session_cached_cursors=200 scope=spfile;
alter system set "_optimizer_nlj_hj_adaptive_join"= FALSE scope=both sid='*'; -- see comment below
alter system set "_optimizer_strans_adaptive_pruning" = FALSE scope=both sid='*'; -- see comment below
alter system set "_px_adaptive_dist_method" = OFF scope=both sid='*'; -- see comment below
alter system set "_sql_plan_directive_mgmt_control" = 0 scope=both sid='*'; -- see comment below
alter system set "_optimizer_dsdir_usage_control" = 0 scope=both sid='*'; -- see comment below
alter system set "_optimizer_use_feedback" = FALSE scope=both sid='*'; -- see comment below
alter system set "_optimizer_gather_feedback" = FALSE scope=both sid='*'; -- see comment below
alter system set "_optimizer_performance_feedback" = OFF scope=both sid='*'; -- see comment below
After setting this, restart the database.
Comment: as per MOS note #2635383.1, disable the following parameters for the installation and enable then after the installation is finished. This is to avoid the “Check if all adaptive features parameters are unset” error.
Installing OEM
Now we are ready to install OEM itself. Download the 7 installation files to a directory, and start the installation:
[oracle@oem134ol8 ~]$ cd /oracle/install/
[oracle@oem134ol8 install]$ chmod +x em13400_linux64.bin
[oracle@oem134ol8 install]$ ./em13400_linux64.bin
Once the installation starts and you pass the screens about software update and prerequirements checks, you’ll get to the installation type screen. “Simple” installation is for evaluation only, while “advance” is for production.
The next screen will be the directory structure:
Then you’ll see a plugin screen (leave the default unless you need to monitor special targets) and setting passwords.
Now we got to the database connection details:
When you enter the details make sure that the hostname is resolvable, and use the PDB database service. The difference between the different deployment sizes is described in the OEM requirements doc. If you chose “simple” installation you won’t have this option.
After clicking “next” the installer will check for the repository requirements. For some reason I got a warning about the characterset (that it should be AL32UTF8) even though this is already my setting, so I just ignored it.
If at that point you see the “Check if all adaptive features parameters are unset” error, please refer to the “Configuring the Database for OEM” section above.
Next you’ll see the following box, this is OEM letting you know it is disabling CBO stats gathering job and setting the max parallel servers temporarily during the installation process. It also sets the min parallel servers to 0.
Click YES to allow it to make the changes and continue.
And lastly, You’ll see a warning about the SGA_TARGET and SHARED_POOL_SIZE settings. If you have set these parameters you can ignore this. This message is shown because the parameters are set at the CDB level, while OEM is connected to the PDB level where these parameters are seen with the value of 0.
Click OK to continue, provide passwords and make sure the DB files paths and names are correct and continue.
In the next screen, enter the path for Oracle Software Library (if you’d like to enable it). For information about OSLIB check this documentation page. Also, decide if you’d like to enable BI publisher (for reports) and if you’d like to have additional OEM servers in the future, configure a shared location for the common data.
In the next screen you can edit all the ports that are part of the OEM infrastructure.
Once you reviewed everything, click “install” to start the installation.
Post Installation
Once the installation is done, don’t forget to connect to the PDB and remove the hidden parameters we set before the installation and restart the database:
alter system reset "_optimizer_nlj_hj_adaptive_join" scope=both sid='*';
alter system reset "_optimizer_strans_adaptive_pruning" scope=both sid='*';
alter system reset "_px_adaptive_dist_method" scope=both sid='*';
alter system reset "_sql_plan_directive_mgmt_control" scope=both sid='*';
alter system reset "_optimizer_dsdir_usage_control" scope=both sid='*';
alter system reset "_optimizer_use_feedback" scope=both sid='*';
alter system reset "_optimizer_gather_feedback" scope=both sid='*';
alter system reset "_optimizer_performance_feedback" scope=both sid='*';
Great post on oem installation.
I think to avoid all manual changes to database parameters we can use db template for oem.
Hi Bashir,
Yes, you can create a template, but since you’ll probably have only a single OEM repository, I don’t see a reason to.
Also, note that you should change some parameters back after the installation.
Liron
Liron excellent post.
Thanks