Useful shortcuts for vi editor

Showing posts with label em. Show all posts
Showing posts with label em. Show all posts

Thursday 10 November 2016

How to add target manually in 12c EM ?

Prepare the 12c EM server
# vi /etc/hosts
10.10.10.10 alperdb.com
-> remote machine (agent) IP and hostname

Prepare the environment (at new host)

# useradd grid12 -g dba
# vi /etc/hosts
10.10.10.2 grid12.com 
-> Current grid12 server machine IP and hostname

# vi /etc/sudoers
grid12 ALL=NOPASSWD: ALL
grid12 ALL=(ALL) ALL

# vi /etc/oraInst.loc
inventory_loc=/home/grid12/oraInventory
inst_group=dba

# passwd grid12
-> password: grid12

# sudo su - grid12
$ mkdir /home/grid12/oraInventory

Adding Host

Login -> Setup from top-right corner -> Add Target -> Add Target Manually -> Add Host -> Installation Base Directory: /home/grid12/agent -> Instance Directory field will be filled automatically -> 

Configure Agent

Login -> Setup from top-right corner -> Add Target -> Add Target Manually -> Select Add Targets Declaratively by Specifying Target Monitoring Properties -> Target Type: Database Instance, Monitoring Agent: 10.10.10.10:3872 -> Target Name: ALPERDB, Database System: ALPERDB, Oracle Home Path: echo $ORACLE_HOME, Port: 1521 -> Click Test Connection -> Submit -> Done! :)

Wednesday 15 October 2014

How to configure EM (Enterprose Manager) if has any problem?

On linux terminal;
set ORACLE_SID=<YOURSID>
emca -deconfig dbcontrol db -repos drop;
then;
emca -config dbcontrol db -repos create;
or
emca -config dbcontrol db -repos recreate;

Tuesday 14 October 2014

Enterprise Manager and OEM Agent commands in Oracle

Please login to database server with ssh as oracle user and run that commands.

Go to /bin path
su - grid12
cd agent/agent_inst/bin

How to start/stop Enterprise Manager
./emctl start dbconsole;
./emctl stop dbconsole;

for 12c grid EM
/home/grid12/oms/bin/emctl start oms
/home/grid12/oms/bin/emctl stop oms

How to start/stop Oem Agent
Be sure run root.sh as root user and run below commands as oracle user:
./emctl stop agent
./emctl start agent

How to check Oem Agent
./emctl status agent

How to restore Oem Agent
Run as grid12 user:
./emctl clearstate agent; and then
./emctl upload agent;