Starting and Stopping Cloud Control and all its components

##################################################################################

-- Starting Cloud Control and All Its Components

##################################################################################

-- 1. Start Database

> ORACLE_HOME/bin/sqlplus /nolog

SQL> connect SYS as SYSDBA

SQL> startup;

SQL> quit

-- 2. Start the listener

> $ORACLE_HOME/bin/lsnrctl start

-- 3. Set environment variable if not set in .bash_profile

export ORACLE_HOME=/opt/oracle/product/11.3.0

export OMS_HOME=/opt/oracle/Middleware/oms

export AGENT_HOME=/opt/oracle/agent/agent_inst

-- 4. Start OMS

>$OMS_HOME/bin/emctl start oms

-- 5. Start Agent

>$AGENT_HOME/bin/emctl start agent

##################################################################################

-- Stopping Cloud Control and All Its Components

##################################################################################

-- 1. Set environment variable if not set in .bash_profile

export ORACLE_HOME=/opt/oracle/product/11.3.0

export OMS_HOME=/opt/oracle/Middleware/oms

export AGENT_HOME=/opt/oracle/agent/agent_inst

-- 2. Stop OMS

>$OMS_HOME/bin/emctl stop oms

-- 3. Stop Agent

>$AGENT_HOME/bin/emctl stop agent

-- 4. Shudwodn Database

> ORACLE_HOME/bin/sqlplus /nolog

SQL> connect SYS as SYSDBA

SQL> shutdown immediate;

SQL> quit

-- 5. Stop Listener

> $ORACLE_HOME/bin/lsnrctl stop