Parando o banco de dados ,o OMS e o Agent em um ambiente que usa OEM (ORACLE ENTERPRISE MANAGER) 11G

oracle-11g-logo

 

É muito simples parar o banco de dados, o OMS e o agent em um ambiente que usa OEM. Você somente precisa setar as variáveis de ambiente e configurar uma parada correta como abaixo:

##STOP DB

  1. export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
  2. export ORACLE_SID=OEM
  3. sqlplus “/as sysdba”
  4. select instance_name, status, host_name from gv$instance;
  5. shutdown immediate

 

[oracle@ocm ~]$ sqlplus ” /as sysdba”

SQL*Plus: Release 11.2.0.3.0 Production on Thu Oct 22 19:31:21 2015

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

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select instance_name, status, host_name from gv$instance;

INSTANCE_NAME    STATUS
—————- ————
HOST_NAME
—————————————————————-
OEM              OPEN
ocm.localdomain

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.

 

##STOP LISTENER

  1. lsnrctl
  2. status
  3. stop

[oracle@ocm ~]$ lsnrctl

LSNRCTL for Linux: Version 11.2.0.3.0 – Production on 22-OCT-2015 19:32:01

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

Welcome to LSNRCTL, type “help” for information.

LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ocm.localdomain)(PORT=1522)))
STATUS of the LISTENER
————————
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.3.0 – Production
Start Date                22-OCT-2015 19:25:24
Uptime                    0 days 0 hr. 6 min. 41 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/ocm/listener/alert/log.xml
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ocm.localdomain)(PORT=1522)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1522)))
The listener supports no services
The command completed successfully
LSNRCTL> stop
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ocm.localdomain)(PORT=1522)))
The command completed successfully

 

##STOP OMS

  1. Set OMS_HOME variable (example: export OMS_HOME=/u01/Oracle/MWOEM/oms11g)
  2. Set AGENT_HOME variable (example: export AGENT_HOME=/u01/Oracle/MWOEM/agent11)
  3. Set ORACLE_HOME variable (example:export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)
  4. $OMS_HOME/bin/emctl stop oms -all

[oracle@ocm ~]$ export OMS_HOME=/u01/Oracle/MWOEM/oms11g
[oracle@ocm ~]$ export AGENT_HOME=/u01/Oracle/MWOEM/agent11g
[oracle@ocm ~]$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
[oracle@ocm ~]$  $OMS_HOME/bin/emctl stop oms -all
Oracle Enterprise Manager 11g Release 1 Grid Control
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
Stopping WebTier…
WebTier Successfully Stopped
Stopping Oracle Management Server…
Oracle Management Server Successfully Stopped
Oracle Management Server is Down

 

##STOP AGENT

  1. $AGENT_HOME/bin/emctl stop agent
  2. $AGENT_HOME/bin/emctl status agent

[oracle@ocm agent11g]$ $AGENT_HOME/bin/emctl stop agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
Stopping agent … stopped.
[oracle@ocm agent11g]$ $AGENT_HOME/bin/emctl status agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
—————————————————————
Agent is Not Running

 

kindregards

Related posts

Leave a Comment