Information about How to Configure a Oracle dbconsole Script
This document will describe the process to setup and run the dbconsole Script. The dbconsole is part of OEM (Oracle Enterprise Manager)
OEM is used to monitor the database. We use it to verify and schedule backups, research database alerts, and monitor database performance.
This script allows for manual start | stop | status of the dbconsole process. This also is added to /etc/init.d and to run-levels 3 and 5 so it will start emctl start dbconsole on srv0dbx03 if that node is rebooted.
Another script check_dbconsole was added to monitor the process and send email to SRV0 _ IT Oracle Admin DL, if it is not running.
Document Creator
Todd Walters 5/21/2009
Requirements
- Only run from srv0dbx03 server.
- The dbconsole script is used to start/stop dbconsole during a server reboot.
- The dbconsole script is located in srv0dbx03:/etc/init.d
- A copy of dbconsole script is located in /home/admins//sbin
- The dbconsole script is run by root and is configured to start up automatically in run-levels 3 & 5 or after reboot. Options are {start|stop|status}
- Must source Oracle Environment PSRV0DB3
- Must have root access to run this command.
- See man chkconfig for more information on registering any script with chkconfig
- Always check with DBA Team before running this command
- The check_dbconsole script is used to monitor the dbconsole perl process.\
- The check_dbconsole script is located in /opt//bin on srv0dbx03 with a copy in /home/admins//bin
- The check_dbconsole script is run via cron every hour and is only ran on srv0dbx03.
How to Setup dbconsole Script
- Login to srv0dbx03 Node 3 RAC Server
- Switch user to root and edit dbconsole if necessary
- [twalters@srv0smx00 ~]$ su -Password:
[root@srv0smx00 ~]# vi /home/admins//sbin/dbconsole - The Script must have the ORAENV in it to set the Oracle Environment:
- su - "$ORACLE_USER"<<EOO
ORACLE_SID=`ps -ef |grep pmon |grep DB | awk -F_ '{print $NF}'`
ORAENV_ASK=NO; export ORAENV_ASK
export ORACLE_SID
. oraenv
$ORACLE_HOME/bin/emctl start dbconsole - To make your script available for chkconfig this line must be added at the top: See man chckconfig
- # chkconfig: 35 97 1
- Add this script to be managed by chkconfig (Once this is done, you can turn on or off dbconsole with chkconfig)
- [root@srv0dbx03 orac]# chkconfig --add dbconsole
- [root@srv0dbx03 orac]# chkconfig --list dbconsole
dbconsole 0:off 1:off 2:off 3:on 4:off 5:on 6:off - Once dbconsole script is registered with chkconfig you can use service command to start/stop/status
- [root@srv0dbx03 init.d]# service dbconsole status
setting setdirinfo
setting setaliasinfo
TZ set to US/Pacific
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
https://srv0dbx03.mysite.com:1158/em/console/aboutApplication
Oracle Enterprise Manager 10g is running.
------------------------------------------------------------------
Logs are generated in directory /u00/app/oracle/product/10.2.0/DB/srv0dbx03_PSRV0DB3/sysman/log - With chkconfig, dbconsole symlinks were created in /etc/rc3.d and /etc/rc5.d
- S97dbconsole -> ../init.d/dbconsole
- also kill script symbolic links were created in the other rcX.d directories:
- K01dbconsole -> ../init.d/dbconsole
No comments:
Post a Comment