Professional Documents
Culture Documents
ADG With EM12c
ADG With EM12c
May 2013
Environment
ADG:
Oracle Linux 5.
User: oracle
Password: oracle
Oracle Database 11g R2
SID: orcl
Password: oracle
VM1EM12c:
Oracle Linux 5.
User: oracle
Password: oracle
Enterprise Manager 12c
User: sysman
Password: welcome1
Network
Both machines are configured to use an internal network called: ADG. For that reason,
the machines must be started on the same computer.
.
1
Active Data Guard with Enterprise Manager 12c
Go into VM1EM12c machine, and start the browser. Log into Oracle Enterprise Manager
12c with sysman/welcome1
Go to “Targets -> Databases” and select the database which we are going to add a
standby database, in this case: orcl
2
Active Data Guard with Enterprise Manager 12c
3
Active Data Guard with Enterprise Manager 12c
Select “Availability -> Add Standby Database” to create a standby database. Introduce the
sysdba credentials.
4
Active Data Guard with Enterprise Manager 12c
We are going to create a new physical standby database. Select the first option and click
on “Continue”
5
Active Data Guard with Enterprise Manager 12c
Select “Online Backup” and “Use Recovery Manager” to create the standby database
using RMAN.
6
Active Data Guard with Enterprise Manager 12c
Select the credentials for the host called ORACLE and click next.
7
Active Data Guard with Enterprise Manager 12c
8
Active Data Guard with Enterprise Manager 12c
For this demo, the listener is going to be the same for both machines. Select
“LISTENER” as listener name and port “1521”.
9
Active Data Guard with Enterprise Manager 12c
In this configuration screen, we are going to introduce the name that we will see in the
Enterprise Manager 12c. Introduce:
Database Unique Name: stby
Target Name: stby
10
Active Data Guard with Enterprise Manager 12c
11
Active Data Guard with Enterprise Manager 12c
Click “Enterprise -> Job -> Activity” and select the Data Guard job to see the standby
process.
12
Active Data Guard with Enterprise Manager 12c
13
Active Data Guard with Enterprise Manager 12c
14
Active Data Guard with Enterprise Manager 12c
Wait until the job suceed to see the standby database. Go to “Targets -> Databases” We
will see the new database. Select the primary database “orcl”.
15
Active Data Guard with Enterprise Manager 12c
Let’s configure Active Data Guard. Go to “Availability -> Data Guard Administration”.
16
Active Data Guard with Enterprise Manager 12c
17
Active Data Guard with Enterprise Manager 12c
The first step is to configure the Fast-start Failover. Click on “Disabled” to enter in the
configuration screen.
18
Active Data Guard with Enterprise Manager 12c
Click on “Configure Observer” and select the Enterprise Manager machine as observer.
19
Active Data Guard with Enterprise Manager 12c
20
Active Data Guard with Enterprise Manager 12c
Click “Continue”.
21
Active Data Guard with Enterprise Manager 12c
22
Active Data Guard with Enterprise Manager 12c
23
Active Data Guard with Enterprise Manager 12c
24
Active Data Guard with Enterprise Manager 12c
25
Active Data Guard with Enterprise Manager 12c
From this screen, we can configure the protection mode. Click on the link Maximum
Performance to change it.
26
Active Data Guard with Enterprise Manager 12c
27
Active Data Guard with Enterprise Manager 12c
In the Primary Database, click on Propierties and enable “Redo Transport On”. Click
Apply.
28
Active Data Guard with Enterprise Manager 12c
29
Active Data Guard with Enterprise Manager 12c
30
Active Data Guard with Enterprise Manager 12c
Now we are going to open the “stby” database to read only. Click “Edit” in the standby
database. Activate Real-Time Query and click apply.
31
Active Data Guard with Enterprise Manager 12c
32
Active Data Guard with Enterprise Manager 12c
Now we are going to change the roles of the databases. Click on switchover and confirm.
33
Active Data Guard with Enterprise Manager 12c
34
Active Data Guard with Enterprise Manager 12c
35
Active Data Guard with Enterprise Manager 12c
36
Active Data Guard with Enterprise Manager 12c
37
Active Data Guard with Enterprise Manager 12c
Now, if we go to “Targets -> Databases”, we can see that the roles of the databases had
changed.
38
Active Data Guard with Enterprise Manager 12c
39
Active Data Guard with Enterprise Manager 12c
40
Active Data Guard with Enterprise Manager 12c
41
Active Data Guard with Enterprise Manager 12c
42
Active Data Guard with Enterprise Manager 12c
43
Active Data Guard with Enterprise Manager 12c
44
Active Data Guard with Enterprise Manager 12c
Now we are going to check what happen if the primary database is down for any reason.
We are going to login into ADG machine. Open a new terminal and set the environment
for “orcl” database. Connect as sysdba and execute a “shutdown abort”. The standby
database will change to primary database automatically.
45
Active Data Guard with Enterprise Manager 12c
46
Active Data Guard with Enterprise Manager 12c
47
Active Data Guard with Enterprise Manager 12c
48
Active Data Guard with Enterprise Manager 12c
49
Active Data Guard with Enterprise Manager 12c
50
Active Data Guard with Enterprise Manager 12c
51
Active Data Guard with Enterprise Manager 12c
52
Active Data Guard with Enterprise Manager 12c
53
Active Data Guard with Enterprise Manager 12c
54
Active Data Guard with Enterprise Manager 12c
55
Active Data Guard with Enterprise Manager 12c Copyright © 2012, Oracle and/or its affiliates. All rights reserved. This document is provided for information purposes only and the
May 2013 contents hereof are subject to change without notice. This document is not warranted to be error-free, nor subject to any other
Author: Javier de la Torre warranties or conditions, whether expressed orally or implied in law, including implied warranties and conditions of merchantability or
fitness for a particular purpose. We specifically disclaim any liability with respect to this document and no contractual obligations are
EMEA Presales Center
formed either directly or indirectly by this document. This document may not be reproduced or transmitted in any form or by any
Bangalore | Bucharest | Malaga
means, electronic or mechanical, for any purpose, without our prior written permission.
Severo Ochoa, 21
Campanillas-Malaga 29590
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Spain
oracle.com