Professional Documents
Culture Documents
http://www.oracle-class.com/?p=2597
Tweet
34
Introduction:
Oracle Restart is a component added to the 11gR2 in order to improve the high
availability of dierent database resources.
Database instances, listeners are resources that can be automatically restarted
after a hardware or software failure or whenever the server host restarts.
These components can be easily added to the Oracle Restart using the crsctl add
command.
In this article, I am going to show you how to add the Enterprise Manager Agent
12c component to the Oracle Restart.
The following procedure has been tested on 11.2.0.3 RAC environment under
Redhat Enterprise Linux. Apply the following steps on each node of the cluster.
1 of 12
05/03/2014 04:56 PM
http://www.oracle-class.com/?p=2597
The procedure:
The Agent cloud control 12c is installed under the /opt/agent12c directory.
The agent can be started / Stopped by running $AGENT_HOME/bin/emctl start
agent , $AGENT_HOME/bin/emctl stop agent commands, where
$AGENT_HOME is /opt/agent12c/agent_inst in my case.
First, login to one of the RAC nodes as a root user, change the directory to
$GRID_HOME/crs/script (or $CRS_HOME/crs/script). Create two scripts
crs_agent12c.sh and agentstartup.sh with the following contents; (Remember to
change the values to reect your environment);
view plain
01.
02.
03.
04.
05.
06.
07.
08.
09.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
2 of 12
copy to clipboard
ORACLE_BASE
ORACLE_HOME
LD_LIBRARY_PATH
ORACLE_SID
ORACLE_UNQNAME
PATH
agent_start () {
sudo -u oracle /opt/11.2.0/grid/crs/script/agentstartup.sh start
}
agent_stop () {
sudo -u oracle /opt/11.2.0/grid/crs/script/agentstartup.sh stop
}
agent_check () {
sudo -u oracle /opt/11.2.0/grid/crs/script/agentstartup.sh check
}
case "$1" in
start)
agent_start
;;
stop)
agent_stop
;;
check)
agent_check
;;
clean)
05/03/2014 04:56 PM
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
http://www.oracle-class.com/?p=2597
ORACLE_BASE
ORACLE_HOME
LD_LIBRARY_PATH
ORACLE_SID
ORACLE_UNQNAME
AGENT_HOME
agent_start () {
$AGENT_HOME/bin/emctl start agent
}
agent_stop () {
$AGENT_HOME/bin/emctl stop agent
}
agent_check () {
$AGENT_HOME/bin/emctl status agent
}
case "$1" in
start)
agent_start
;;
stop)
agent_stop
;;
check)
agent_check
;;
clean)
agent_clean $(ps -C emagent -o pid=)
;;
*)
echo $"Usage: `basename $0` {start|stop|status|clean}"
exit 1
esac
[grid@node1 script]$
3 of 12
05/03/2014 04:56 PM
01.
02.
http://www.oracle-class.com/?p=2597
Now, edit the /etc/sudoers le where all the access rules are saved. Per default,
sudo requires authentication through a password. When NOPASSWD is specied
the execution of the commands will not requires a password.
view plain
01.
02.
03.
04.
05.
06.
07.
08.
09.
10.
11.
12.
copy to clipboard
01.
02.
03.
04.
05.
06.
07.
08.
09.
10.
11.
12.
13.
14.
15.
16.
copy to clipboard
Hope it helps!,
Wissem
4 of 12
05/03/2014 04:56 PM
http://www.oracle-class.com/?p=2597
Andreas says:
April 11, 2012 at 9:12 am
Hello Wissem,
thank you for the scripts, they are very helpful! However, there seems to be
a small problem: I cannot nd the denition of agent_clean(), which is
referenced in this command:
agent_clean $(ps -C emagent -o pid=)
Can you add the missing function? The start, stop, and check actions are
easy to understand, but I do not understand yet what the clean() function is
called for.
Reply
2. Auto Restart Enterprise Manager Cloud Control Agent 12c All Things
Oracle says:
May 10, 2012 at 10:25 am
[...] the full article here: Auto Restart Enterprise Manager Cloud Control
Agent 12c; Wissem El [...]
Reply
3.
Leave a Comment
Name (required)
5 of 12
05/03/2014 04:56 PM
http://www.oracle-class.com/?p=2597
Website
Polls
which oracle topic interests you most?
Oracle data guard
Oracle RAC
Oracle performance tuning
Oracle installation
PL/SQL or SQL
Oracle enterprise manager
ASM / Storage
RMAN, backup and recovery
Vote
View Results
Polls Archive
6 of 12
05/03/2014 04:56 PM
http://www.oracle-class.com/?p=2597
Recent Posts
Packts 2000th Title Campaign
Oracle 12c & Hadoop for better Data Management and Processing
Oracle Flex ASM Espaol (Article in Spanish)
Oracle Database 12c Backup and Recovery Survival Guide
E-books: 50% discount
Book: Oracle Database 12c Backup and Recovery Survival Guide
Oracle Data Guard 11gR2 Administration Beginners Guide
Oracle 12c: Recover tables using RMAN
Oracle 12c: Managing Resources
Oracle 12c: Transport tablespaces across platforms
Oracle 12c: [INS-20802] Oracle Services For Microsoft Transaction Server
failed.
Oracle 12c: Whats New in Oracle Data Guard 12cR1?
Oracle 12c: Managing PDBs using Triggers
Oracle 12c: Managing PDBs using Sql Developer
Oracle 12c: Performing PDB Point-In-Time Recovery
Oracle 12c: Manual container database creation in SQL*Plus
Oracle 12c: NOOPEN option for RMAN duplicate
Oracle Data Guard 11gR2 Administration Beginners Guide
Oracle 12c: Truncate Table Cascade
Oracle 12c: Managing Partitioning
Oracle 12c: DBMS_PART Package: Clean up global indexes on partitioned
tables
Oracle 12c: RMAN restore / recover pluggable database
Oracle 12c: RMAN restore / recover datale
Oracle 12c: Invisible Column
Oracle 12c: ASM New asmcmd commands
Oracle 12c: DBA_HIST_* Tables
Oracle 12c: RMAN Multisection Image Copies & Incremental Backups
Add Oracle Database 12c to Enterprise Manager 12c
Oracle 12c: RMAN recover Table
Oracle 12c ; RMAN supports SELECT statements
Oracle Database 12c available for download
Enterprise Manager Cloud Control 12c: RMAN-06403: could not obtain a
fully authorized session ORA-01034: ORACLE not available
Reinstall Enterprise Manager Cloud Control 12c Agent
7 of 12
05/03/2014 04:56 PM
http://www.oracle-class.com/?p=2597
8 of 12
05/03/2014 04:56 PM
http://www.oracle-class.com/?p=2597
automatic restart
Statspack in RAC
Tape datale recover
Interview with Kellyn Potvin Rocky Mountain Oracle User Group Director
of membership and vendors and Oracle Expert
11.2.0.1.3 PSU Oracle Solaris on SPARC (64-bit)
Entrevista con Nelson Calero Presidente del UYOUG y Experto en Oracle
RACEntrevista con Nelson Calero Presidente del UYOUG y Experto en
Oracle RAC
Copy ASM les to le system
Interview with Kai Yu Oracle ACE Director and Oracle Expert
Auto-managing an Oracle database: Fix database alerts automatically
Interview with Fahd Mirza Oracle ACE and Oracle Expert
11gR2; Silent installation in Oracle Solaris 10
Interview with Surachart Opun Oracle ACE and Oracle RAC Expert
Testing RAC Check audit tool
Interview with Debra Lilley Oracle ACE Director and UKOUG President
Interview with Eddie Awad Oracle ACE Director and Oracle Expert
11gR2; Automatic restart of DB Console11gR2; Redmarrer
automatiquement DB Console 11gR2; Reiniciar Automticamente DB
Console
Interview with Kyle Hailey Oracle ACE and Oracle Expert
Oracle 11g R1/R2 Real Application Clusters Essentials Book review
11gR2 ASM Inside story Part 6 (Recreate High available Service and
rename Disk group)11gR2 ASM Inside story Partie 6 (Recrer le service
de haute disponibilt et renommer un group de disques)11gR2 ASM
Inside story Parte 6 (Crear de nuevo el servicio de alta disponibilidad y
renombrar un grupo de discos)
Interview with Hans Forbrich Oracle ACE Director and Oracle
ExpertInterview avec Hans Forbrich Oracle ACE Directeur et Expert
OracleEntrevista con Hans Forbrich Oracle ACE Director y Experto
OracleEntrevista con Hans Forbrich Oracle ACE Director y Experto
Oracle
RAC Database tape Restore to a new server
11gR2; Sqlnet.ora and Oracle Restart
11gR2 ; DB console Policy Violations Directory Objects
Patch 12311357 11.2.0.2.2 Patch Set Update Standalone grid
infrastructure
Trace Materialized views;
RAC 11gR2 ORA-00245: control le backup operation failed
RAC 11.2.0.2 Patch 12311357 11.2.0.2.2 GI Patch Set Update and mutex
patch 4 Nodes on Redhat Linux
11g recongure DB console
11gR2 RMAN incremental updated backup demo
9 of 12
05/03/2014 04:56 PM
http://www.oracle-class.com/?p=2597
10 of 12
05/03/2014 04:56 PM
http://www.oracle-class.com/?p=2597
Recent Comments
Adrian Iriarte: Saludos, Que buen articulo, casi siempre al momento de
querer implementar soluciones para el...
Patricia: Hi Wissem, is there a workaround for this? I mean I want to use
the sqlnet.authentication_services =none,...
Brian: I created the cdb manually using the instruction, but then I tried to
create pdb within in, it failed. have...
Farmer Johnson: Hi Wissem. How did you avoid the error you had
previsouly encountered: sudo opatch auto...
Hctor Moro: Querido Nelson; Despus de entrevistar a mas de 50
profesionales de primer nivel en Uruguay, al n te...
What is NO2 Maximus: I genuinely apreciated your site! You shoul
update it with new info!
Nav: Indeed helpful, to the point article..
Koti: Can you please explain all the sections of AWR report in RAC. I mean
to ask output produced by awrgrpt.sql...
Himanshu: Nice post.can you please comment on this Why RMAN restored
the DATA_REORTING datae to +DATA diskgroup?
Enrique: Great post.
gabriel: what version of sqldeveloper support plugable database?
Kal: Quality thanks
11 of 12
05/03/2014 04:56 PM
http://www.oracle-class.com/?p=2597
wissem: Well , like I mentioned in the post, delete service and add service
using IP.
Kelly: were you able to solve this? Thanks!
wissem: Hello, You can buy the book from PakT: http://www.packtpub.com
/oracle -data-guard-11gr2-administr...
goutham: hi i want to buy this book.could you please let me know how can i
buy this book. i am in Malaysia. thanks...
cesar Lopez: Hola me gustaria saber tu punto de vista de MYSQl vs
ORACLE para una sistema de Nomina de unos 1500...
wissem: Check my previous article in English; Oracle 12c: RMAN recover
Table http://www.oracle-class.com/?p =2866
NILESH: Sir, English please
Ramakrishna: I want step by step installation of Hyper-table in windows
and also usage of Hyper-table like data...
Copyright Oracle Class Wissem All About Oracle is proudly powered by -MeWissem EL KHLIFI
Contact
12 of 12
05/03/2014 04:56 PM