Oracle EM13.5 Startup and Shutdown Procedures: Fundamentals of Operation Management

EMCC_en

In the operation of Oracle Enterprise Manager Cloud Control 13c (EM13.5), understanding the “correct startup and shutdown sequence” during OS reboots or maintenance is extremely important. Incorrect sequencing can cause troubles such as the OMS (Oracle Management Server) failing to connect to the Repository DB (resulting in timeouts) or the management console failing to display.

In short, the golden rule is: Startup should be “Bottom-up” (from DB upwards), and Shutdown should be “Top-down” (from Agent downwards). This article explains the specific command examples in an Oracle Linux 8 environment, along with environment variable settings to make operations easier.

Conclusion: Shortest Procedure (To-Do List)

Startup Sequence (Bottom-up)

  1. Start Listener: lsnrctl start
  2. Start Repository DB: sqlplus / as sysdbastartup
  3. Start OMS: emctl start oms
  4. Start Agent: emctl start agent

Shutdown Sequence (Top-down)

  1. Stop Agent: emctl stop agent
  2. Stop OMS: emctl stop oms -all
  3. Stop Repository DB: sqlplus / as sysdbashutdown immediate
  4. Stop Listener: lsnrctl stop

Setting Environment Variables for Efficient Operation

When managing both EM and the DB on the same server, setting environment variables for both in .bash_profile significantly improves work efficiency.

Recommended .bash_profile Example

The following is an example where EM-specific variables are appended to standard 19c DB settings.

# --- Oracle Database settings ---
export ORACLE_SID=repdb
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH

# --- Oracle EM13.5 settings (Appended) ---
export MW_HOME=/u01/app/middleware
export AGENT_HOME=/u01/app/agent/agent_13.5.0.0.0
export PATH=$PATH:$MW_HOME/bin:$AGENT_HOME/bin

# For GUI (as needed)
export DISPLAY=192.168.56.1:0.0

Since ORACLE_SID is set, you no longer need to specify the SID every time you perform DB operations. Additionally, by adding each bin directory to the PATH, you can execute emctl or sqlplus directly from any directory.

Implementing Startup Procedures

1. Starting the Listener and Repository DB

If the PATH is correctly set in .bash_profile, the following commands are all you need.

# Start the Listener
lsnrctl start

# Start the Database (Login possible without specifying SID)
sqlplus / as sysdba
SQL> startup
SQL> exit

2. Starting the OMS and Agent

Start them utilizing the appended environment variables.

# Start the OMS (Starts the WebTier simultaneously)
emctl start oms

# Start the Agent
emctl start agent

Implementing Shutdown Procedures

1. Stopping the Agent and OMS

Stop services starting from the top-level service.

# Stop the Agent
emctl stop agent

# Stop all OMS components (including AdminServer)
emctl stop oms -all

Why is the -all option necessary? If you execute only emctl stop oms, only the OMS itself (Managed Server) stops, leaving the AdminServer (responsible for WebLogic management functions) running. If the AdminServer remains active, there is a risk that the shutdown may not complete normally during an OS reboot, or process conflicts may cause errors during the next startup. For maintenance or OS reboots, always use the -all flag to completely stop all components.

2. Stopping the Repository DB and Listener

Finally, close the DB layer.

# Stop the Database
sqlplus / as sysdba
SQL> shutdown immediate
SQL> exit

# Stop the Listener
lsnrctl stop

Execution Examples and Status Verification

After startup, verify the status using the following commands.

Verifying OMS Status

[oracle@em13cr5 ~]$ emctl status oms
WebTier is Up
Oracle Management Server is Up
JVMD Engine is Up

Verifying Agent Status

[oracle@em13cr5 ~]$ emctl status agent
---------------------------------------------------------------
Agent Version          : 13.5.0.0.0
...
Agent is Running and Ready

Troubleshooting

SituationCauseCountermeasure
Slow OMS startupWaiting for Repository DB startupVerify if the DB is in OPEN state.
OMS shutdown does not completeZombie processes or remaining sessionsUse `ps -ef
Command not foundIncorrect PATH settingVerify if bin is included in the PATH of .bash_profile.

Operational and Security Considerations

  • Avoid Overlapping Environment Variables: Depending on the order in the PATH setting, older versions of emctl (e.g., from the Agent side) might take precedence. Generally, prioritize the bin from the OMS side or utilize aliases.
  • OMS -all Option: As mentioned above, always use -all during maintenance to ensure a complete stop, including the AdminServer.
  • How to revert: If startup fails, stop everything in reverse order and then start again following the correct sequence.

FAQ

Q1: What is the benefit of setting ORACLE_SID? A: When logging in with sqlplus / as sysdba, the target DB is automatically determined from the environment variable, saving you the trouble of typing export ORACLE_SID=... every time.

Q2: Can the startup sequence be automated? A: Yes. By creating systemd unit files and defining dependencies (e.g., After=oracle-db.service), automatic execution at OS startup is possible.

Summary

  • Startup Order: Listener → DB → OMS → Agent
  • Shutdown Order: Agent → OMS (-all) → DB → Listener
  • Efficiency: Define both DB variables and EM variables (MW_HOME, AGENT_HOME) in .bash_profile.

This article explains targeting Oracle Enterprise Manager Cloud Control 13.5 (screens and default values may differ for other versions).

コメント

Copied title and URL