/u01/app/oracle/product/11.2.0/dbhome_1/sysman/config
under this directory you will work on
- emd.properties
- emagentlogging.properties
- emagentlogging.properties
- emd.properties
For the people who think differently Welcome aboard
/u01/app/oracle/product/11.2.0/dbhome_1/sysman/config
under this directory you will work on
$ cat agent_check.sh
#!/usr/bin/ksh
#
agent_status=`ps -ef|awk ‘{print $8}’|grep agent10g/bin/emagent`
if [[ -z $agent_status ]]
then
$AGENT_HOME/bin/emctl start agent
echo Agent started on server `hostname` at `date`
else
echo Agent is running fine on server `hostname` at `date`
fi
It is running every 30min.
crontab –l
00,30 * * * * /home/oemagent/agent_check.sh >> /home/oemagent/agent_status.log
Enjoy
Thank you
Osama Mustafa
1- set ORACLE_SID=orcl
2-emca -deconfig dbcontrol db -repos drop
3- You’ll receive the following prompts :
STARTED EMCA at AUG 10, 2011 8:26:42 AM
EM Configuration Assistant, Version 10.2.0.5.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID: orcl
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user:
Password for SYSMAN user:
Do you wish to continue? [yes(Y)/no(N)]: y
But if you already have Sysman schema the following error will be appear :
CONFIG: ORA-20001: SYSMAN already EXISTS..
ORA-06512: at line 17
4-Drop User Sysman in the following steps (sqlplus /as sysdba)
DROP USER sysman CASCADE;
DROP PUBLIC SYNONYM setemviewusercontext;
DROP ROLE mgmt_user;
DROP PUBLIC SYNONYM mgmt_target_blackouts;
DROP USER mgmt_view;
5-emca -config dbcontrol db -repos create
STARTED EMCA at AUG 10, 2011 8:28:48 AM
EM Configuration Assistant, Version 10.2.0.5.0 Production
Copyright (c) 2003, 2005, Oracle. ALL rights reserved.
Enter the following information:
DATABASE SID: orcl
Listener port NUMBER: 1521
Password FOR SYS USER:
Password FOR DBSNMP USER:
Password FOR SYSMAN USER:
Password FOR SYSMAN USER: Email address FOR notifications (optional):
Outgoing Mail (SMTP) server FOR notifications (optional):
-----------------------------------------------------------------
You have specified the following settings
DATABASE ORACLE_HOME ................ C:\app\Administrator\product\11.1.0\db_1
LOCAL hostname ................ mclaughlin11g
Listener port NUMBER ................ 1521
DATABASE SID ................ orcl
Email address FOR notifications ...............
Outgoing Mail (SMTP) server FOR notifications ...............
-----------------------------------------------------------------
Do you wish TO continue? [yes(Y)/no(N)]: y