Sie sind auf Seite 1von 12

Copyright 2006, Oracle. All rights reserved.

Workshop
O
r
a
c
l
e

U
n
i
v
e
r
s
i
t
y

a
n
d

S
Q
L

S
T
A
R

I
N
T
E
R
N
A
T
I
O
N
A
L

L
I
M
I
T
E
D

u
s
e

o
n
l
y
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS
COMPUTER IS STRICTLY PROHIBITED
Oracle Database 10g: Data Guard Administration 13 - 2
Copyright 2006, Oracle. All rights reserved.
Objectives
After completing this lesson, you should be able to do the
following:
Explain the workshop methodology
Explain the workshop setup
O
r
a
c
l
e

U
n
i
v
e
r
s
i
t
y

a
n
d

S
Q
L

S
T
A
R

I
N
T
E
R
N
A
T
I
O
N
A
L

L
I
M
I
T
E
D

u
s
e

o
n
l
y
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS
COMPUTER IS STRICTLY PROHIBITED
Oracle Database 10g: Data Guard Administration 13 - 3
Copyright 2006, Oracle. All rights reserved.
Workshop Premise
You are the DBA of a growing company that has
decided to implement Oracle Data Guard to protect its
Oracle database.
You use Enterprise Manager and SQL commands to
manage your Data Guard configuration.
O
r
a
c
l
e

U
n
i
v
e
r
s
i
t
y

a
n
d

S
Q
L

S
T
A
R

I
N
T
E
R
N
A
T
I
O
N
A
L

L
I
M
I
T
E
D

u
s
e

o
n
l
y
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS
COMPUTER IS STRICTLY PROHIBITED
Oracle Database 10g: Data Guard Administration 13 - 4
Copyright 2006, Oracle. All rights reserved.
Workshop Flow
In this workshop, you perform the following tasks:
Create one or more standby databases.
Verify the configurations.
Change the protection mode.
Retrieve information from the standby database.
Perform failovers.
O
r
a
c
l
e

U
n
i
v
e
r
s
i
t
y

a
n
d

S
Q
L

S
T
A
R

I
N
T
E
R
N
A
T
I
O
N
A
L

L
I
M
I
T
E
D

u
s
e

o
n
l
y
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS
COMPUTER IS STRICTLY PROHIBITED
Oracle Database 10g: Data Guard Administration 13 - 5
Copyright 2006, Oracle. All rights reserved.
Workshop Scenarios
The workshop comprises the following scenarios:
1. Creating a Data Guard configuration to ensure high
availability, data protection, and disaster recovery
2. Verifying the configuration and the operation of log
transport and apply services
3. Verifying that the automatic gap detection and
resolution feature is working properly
4. Changing the protection mode to meet stated
requirements
General Notes for the Workshop
The scenarios should be performed in order.
O
r
a
c
l
e

U
n
i
v
e
r
s
i
t
y

a
n
d

S
Q
L

S
T
A
R

I
N
T
E
R
N
A
T
I
O
N
A
L

L
I
M
I
T
E
D

u
s
e

o
n
l
y
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS
COMPUTER IS STRICTLY PROHIBITED
Oracle Database 10g: Data Guard Administration 13 - 6
Copyright 2006, Oracle. All rights reserved.
Workshop Scenarios
5. Configuring the feature that will ensure you will not
need to re-create the primary database after failover
6. Adding a data file to your primary database
7. Configuring the standby database so that users can
use it for reporting
8. Adding a standby database that will support reporting
9. Verifying that the automatic gap detection and
resolution feature is working properly
O
r
a
c
l
e

U
n
i
v
e
r
s
i
t
y

a
n
d

S
Q
L

S
T
A
R

I
N
T
E
R
N
A
T
I
O
N
A
L

L
I
M
I
T
E
D

u
s
e

o
n
l
y
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS
COMPUTER IS STRICTLY PROHIBITED
Oracle Database 10g: Data Guard Administration 13 - 7
Copyright 2006, Oracle. All rights reserved.
Workshop Scenarios
10. Configuring SQL Apply so that specified DML
statements are not executed on the logical standby
database
11. Creating a new view on the logical standby database
12. Performing a failover operation
13. Adding your original primary database back into the
configuration
14. Returning to your original Data Guard configuration
O
r
a
c
l
e

U
n
i
v
e
r
s
i
t
y

a
n
d

S
Q
L

S
T
A
R

I
N
T
E
R
N
A
T
I
O
N
A
L

L
I
M
I
T
E
D

u
s
e

o
n
l
y
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS
COMPUTER IS STRICTLY PROHIBITED
Oracle Database 10g: Data Guard Administration 13 - 8
Copyright 2006, Oracle. All rights reserved.
Summary
In this lesson, you should have learned:
The flow of the workshop
The setup that is used for the workshop
Some hints that will help you through the workshop
O
r
a
c
l
e

U
n
i
v
e
r
s
i
t
y

a
n
d

S
Q
L

S
T
A
R

I
N
T
E
R
N
A
T
I
O
N
A
L

L
I
M
I
T
E
D

u
s
e

o
n
l
y
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS
COMPUTER IS STRICTLY PROHIBITED
Oracle Database 10g: Data Guard Administration 13 - 9
Workshop Preparation
To prepare for the workshop, you need to drop your Data Guard configuration and your standby
databases. Perform the following steps:
1. Access the Data Guard page and disable fast-start failover.
2. Change the protection mode from Maximum Availability to Maximum Performance.
3. Drop your Data Guard configuration by selecting Remove Data Guard Configuration in the
Additional Administration section. Click Yes on the Confirmation: Remove Data Guard
Configuration page to confirm.
4. Invoke DBCA on the server machine your standby databases are on and delete your standby
databases.
5. Remove your <HOSTNAME>_SITE1 and <HOSTNAME>_SITE2 databases from Grid Control.
O
r
a
c
l
e

U
n
i
v
e
r
s
i
t
y

a
n
d

S
Q
L

S
T
A
R

I
N
T
E
R
N
A
T
I
O
N
A
L

L
I
M
I
T
E
D

u
s
e

o
n
l
y
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS
COMPUTER IS STRICTLY PROHIBITED
Oracle Database 10g: Data Guard Administration 13 - 10
Workshop Scenarios
In the workshop you will create standby databases and modify your configuration to meet the
business requirements outlined in the workshop scenarios.
1. You need to create a Data Guard configuration to ensure high availability, data protection, and
disaster recovery for your enterprise data. You want to be able to open your standby database in
read-only mode so that queries can be executed. Create your standby database to meet these
requirements with the following specifications:
Standby database unique and target name: <YOUR_HOSTNAME>_SITE1
Location: Create your standby database on the next-highest student PC in your classroom. For
example, if your host name is EDRSR8P1, create your physical standby database named
EDRSR8P1_SITE1 on EDRSR8P2. If you are on EDRSR8P12, create your standby database
on EDRSR8P1.
2. You want to ensure that you have created your standby database successfully and that the log
transport and apply services are working. Use Enterprise Manager to confirm that your Data
Guard configuration is functioning properly.
3. You understand that Data Guard can automatically detect archive gaps and resolve those gaps
by copying the missing sequence of log files to the standby destination. As an example, if
connectivity is lost between the primary and one or more standby databases (for example, due
to network problems), redo data being generated on the primary database cannot be sent to
those standby databases. Once a connection is reestablished, the missing archived redo log files
(referred to as a gap) are automatically detected by Data Guard, which then automatically
transmits the missing archived redo log files to the standby databases. Verify that this feature is
working properly in your configuration by simulating a loss of connectivity. Disable log
transport services to your standby database, switch the log on your primary database, and
reenable log transport services to your standby database.
4. Maximum performance is the default protection mode and provides the highest level of data
protection that is possible without affecting the performance of the primary database. This is
accomplished by allowing a transaction to commit as soon as the redo data needed to recover
that transaction is written to the local online redo log.
You have determined that you need to change the data protection mode to ensure the redo data
needed to recover each transaction is written to both the local online redo log and to the standby
redo log on at least one standby database before the transaction commits. You also want to
configure the protection mode so that the primary database does not shut down if a fault
prevents it from writing its redo stream to a remote standby redo log. Change the protection
mode so that your configuration meets these requirements.
O
r
a
c
l
e

U
n
i
v
e
r
s
i
t
y

a
n
d

S
Q
L

S
T
A
R

I
N
T
E
R
N
A
T
I
O
N
A
L

L
I
M
I
T
E
D

u
s
e

o
n
l
y
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS
COMPUTER IS STRICTLY PROHIBITED
Oracle Database 10g: Data Guard Administration 13 - 11
Workshop Scenarios (continued)
5. You want to ensure that you will not need to re-create the primary database after you have
performed a failover operation. Configure the feature that will enable you to flash back the
failed primary database to a point in time before the failover and convert it into a standby
database for the new primary database.
6. You have been asked to add a data file to the EXAMPLE tablespace in your primary database.
Add the data file with the following specifications:
Data file name: /u01/app/oracle/oradata/orcl/example02.dbf
Data file size: 2 MB
Verify that the new data file has been added to your standby database.
7. The application users need to run some additional reports and do not want to impact the
production system. Perform the steps required to make the standby database available for this
reporting task. Verify that you can query tables in the standby database and then restart real-
time apply so that the standby database will be resynchronized with the primary database.
8. You have determined that the users will need to run reports on a regular basis and do not want
to impact the production database. In addition, you would like to add a standby database to your
configuration for additional data protection. Configure a second standby database that will be
available for users to perform queries, summations, and reporting activities against at all times
with the following specifications:
Standby database unique and target name: <HOSTNAME>_SITE2
Location: Create your standby database on the next-highest student PC in your classroom. For
example, if your host name is EDRSR8P1, create your standby database on EDRSR8P2. If you
are on EDRSR8P12, create your standby database on EDRSR8P1.
9. Verify that the automatic gap detection and resolution feature is working properly in your
configuration by simulating a loss of connectivity to your new standby database. Disable log
transport services to your standby database, switch the log on your primary database, and
reenable log transport services to your standby database.
O
r
a
c
l
e

U
n
i
v
e
r
s
i
t
y

a
n
d

S
Q
L

S
T
A
R

I
N
T
E
R
N
A
T
I
O
N
A
L

L
I
M
I
T
E
D

u
s
e

o
n
l
y
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS
COMPUTER IS STRICTLY PROHIBITED
Oracle Database 10g: Data Guard Administration 13 - 12
Workshop Scenarios (continued)
10. Because the users want to use some tables in the new standby database to report against for
historical purposes, you need to configure SQL Apply so that certain DML statements are not
executed against those tables on the logical standby database. You decide to test this feature
first by creating a new table on the primary database as follows:
CREATE TABLE hr.emp_name
AS SELECT first_name, last_name
FROM hr.employees
WHERE 1=2;
Define a filter that prevents SQL Apply from issuing DML statements against the
HR.EMP_NAME table on the logical standby database. Insert a few rows into the
HR.EMP_NAME table on the primary database and commit your changes. Force a log switch on
the primary database and then verify that the new rows are not applied to your logical standby
database.
11. You have been asked to create a view for the users to query on the logical standby database.
Create the view as follows:
CREATE VIEW hr.emp_90_vw
AS SELECT *
FROM hr.employees
WHERE department_id=90;
12. You have experienced a failure on your primary database server. Fail over to your physical
standby database.
13. You have been able to restore the server which your primary database was on. Add your
original primary database back into your Data Guard configuration as a physical standby
database.
14. Return to your original Data Guard configuration with your
HOSTNAME_ORCL.oracle.com database as your primary database.
O
r
a
c
l
e

U
n
i
v
e
r
s
i
t
y

a
n
d

S
Q
L

S
T
A
R

I
N
T
E
R
N
A
T
I
O
N
A
L

L
I
M
I
T
E
D

u
s
e

o
n
l
y
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS
COMPUTER IS STRICTLY PROHIBITED

Das könnte Ihnen auch gefallen