EM Express 19c Flash-Based for CDB/PDB


During database creation, DBCA enables Enterprise Manager Express (EM Express) for being created CDB, not for PDB. We have to enable it by ourselves. In this post, you can see steps that you should take to start EM express which is dedicated for a CDB/PDB.



Acess URL : https://hostname-or-ipaddress:5501/em


Function used : 

1. https

2. http

[oracle@west01 ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Tue Aug 11 13:31:02 2020

Version 19.8.0.0.0

Copyright (c) 1982, 2020, Oracle.  All rights reserved.


Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.8.0.0.0

SQL> show con_name

CON_NAME

------------------------------

CDB$ROOT

SQL> select dbms_xdb_config.gethttpsport() from dual;

DBMS_XDB_CONFIG.GETHTTPSPORT()

------------------------------

                            0

SQL> exec dbms_xdb_config.sethttpsport(5500);

PL/SQL procedure successfully completed.

SQL>  select dbms_xdb_config.gethttpsport() from dual;

DBMS_XDB_CONFIG.GETHTTPSPORT()

------------------------------

                          5500


SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED

---------- ------------------------------ ---------- ----------

         2 PDB$SEED                       READ ONLY  NO

         3 WORAVRPDB1                     READ WRITE NO

SQL> alter session set container=WORAVRPDB1;

Session altered.

SQL> show con_name

CON_NAME

------------------------------

WORAVRPDB1

SQL> select dbms_xdb_config.gethttpsport() from dual;


DBMS_XDB_CONFIG.GETHTTPSPORT()

------------------------------

                             0

SQL> exec dbms_xdb_config.sethttpsport(5501);

PL/SQL procedure successfully completed.

SQL>  select dbms_xdb_config.gethttpsport() from dual;

DBMS_XDB_CONFIG.GETHTTPSPORT()

------------------------------

                          5501


EM Express 19c  Flash-Based



Since Oracle database 19c, we have a new UI of Enterprise Manager Express (EM Express) which is based on Java JET technology.


I installed Oracle 19c database. I logged as System user into Enterprise Manager. I want to create new user and set permissions to him, but the Server tab is missing. There is only Performance tab.


As you can see, some functions we used in EM Express 12c are not available anymore in the new UI. On the positive side, it responds very fast, very express. But maybe it's too simplified to be useful for DBA. Luckily, we can revert the UI back to flash-based.

SQL> @?/rdbms/admin/execemx emx


Session altered.


no rows selected

old   1: select nvl( '&1','omx') p1 from dual

new   1: select nvl( 'emx','omx') p1 from dual

P1

---

emx

PL/SQL procedure successfully completed.

Session altered.

After that, please re-logon to make it work.


To go back to Java JET based UI, you can do this:

SQL> @?/rdbms/admin/execemx omx

Session altered.

no rows selected

old   1: select nvl( '&1','omx') p1 from dual

new   1: select nvl( 'omx','omx') p1 from dual

P1

---

omx

PL/SQL procedure successfully completed.

Session altered.

https://docs.oracle.com/en/database/oracle/oracle-database/19/admqs/getting-started-with-database-administration.html#GUID-F1C3023C-35DC-4086-A63F-F58F3FFC2923


ASMLib Scanned No Disks on Boot


ASMLib seems to be started too soon to scan iSCSI disks which may not be ready on boot in Enterprise Linux 7.


[root@woravr01 ~]# oracleasm listdisks

No Result here ...

lets Check the status of ASM :

[root@woravr01 ~]# oracleasm status

Checking if ASM is loaded: yes

Checking if /dev/oracleasm is mounted: yes



[root@woravr01 ~]# systemctl status oracleasm

● oracleasm.service - Load oracleasm Modules

   Loaded: loaded (/usr/lib/systemd/system/oracleasm.service; enabled; vendor preset: disabled)

   Active: active (exited) since Tue 2020-08-11 12:44:06 IST; 2min 39s ago

  Process: 1494 ExecStart=/usr/sbin/oracleasm.init start_sysctl (code=exited, status=0/SUCCESS)

 Main PID: 1494 (code=exited, status=0/SUCCESS)

    Tasks: 0

   CGroup: /system.slice/oracleasm.service


Aug 11 12:44:03 woravr01.oravr.in systemd[1]: Starting Load oracleasm Modules...

Aug 11 12:44:06 woravr01.oravr.in oracleasm.init[1494]: Initializing the Oracle ASMLib driver: OK

Aug 11 12:44:06 woravr01.oravr.in oracleasm.init[1494]: Scanning the system for Oracle ASMLib disks: OK

Aug 11 12:44:06 woravr01.oravr.in systemd[1]: Started Load oracleasm Modules.

[root@woravr01 ~]#




Let's see some background information of ASMLib Everything looks Good

[root@woravr01 ~]#  oracleasm configure

ORACLEASM_ENABLED=true

ORACLEASM_UID=oracle

ORACLEASM_GID=asmadmin

ORACLEASM_SCANBOOT=true

ORACLEASM_SCANORDER=""

ORACLEASM_SCANEXCLUDE=""

ORACLEASM_SCAN_DIRECTORIES=""

ORACLEASM_USE_LOGICAL_BLOCK_SIZE="false"



[root@woravr01 ~]# cat /etc/sysconfig/oracleasm

#

# This is a configuration file for automatic loading of the Oracle

# Automatic Storage Management library kernel driver.  It is generated

# By running /etc/init.d/oracleasm configure.  Please use that method

# to modify this file

#

# ORACLEASM_ENABLED: 'true' means to load the driver on boot.

ORACLEASM_ENABLED=true

# ORACLEASM_UID: Default user owning the /dev/oracleasm mount point.

ORACLEASM_UID=grid

# ORACLEASM_GID: Default group owning the /dev/oracleasm mount point.

ORACLEASM_GID=asmadmin

# ORACLEASM_SCANBOOT: 'true' means scan for ASM disks on boot.

ORACLEASM_SCANBOOT=true

# ORACLEASM_SCANORDER: Matching patterns to order disk scanning

ORACLEASM_SCANORDER=""

# ORACLEASM_SCANEXCLUDE: Matching patterns to exclude disks from scan

ORACLEASM_SCANEXCLUDE=""

# ORACLEASM_SCAN_DIRECTORIES: Scan disks under these directories

ORACLEASM_SCAN_DIRECTORIES=""

# ORACLEASM_USE_LOGICAL_BLOCK_SIZE: 'true' means use the logical block size

# reported by the underlying disk instead of the physical. The default

# is 'false'

ORACLEASM_USE_LOGICAL_BLOCK_SIZE=false





oracleasm is running well, but it scanned nothing on boot . This is because oracleasm started before the iSCSI storage is fully started by the server. So all we need to do is to re-arrange the initialization order.

We re-arrange the boot order by adding the following lines on "oracleasm.service"

[root@woravr01 ~]# vi /usr/lib/systemd/system/oracleasm.service

[Unit]

Description=Load oracleasm Modules

Requires=multipathd.service iscsi.service

After=multipathd.service iscsi.service

[Service]

Type=oneshot

RemainAfterExit=yes

ExecStart=/usr/sbin/oracleasm.init start_sysctl

ExecStop=/usr/sbin/oracleasm.init stop_sysctl

ExecReload=/usr/sbin/oracleasm.init restart_sysctl

[Install]

WantedBy=multi-user.target

~

--End 



reboot the all nodes :

[root@woravr01 ~] reboot

[root@woravr02 ~] reboot


[root@woravr01 ~]# oracleasm listdisks

ACFS

DATA

FRA

OCR

[root@woravr02 ~]# oracleasm listdisks

ACFS

DATA

FRA

OCR