Download D78850GC20_ag PDF

TitleD78850GC20_ag
File Size4.1 MB
Total Pages310
Table of Contents
                            Oracle Database 12c: Backup and Recovery Workshop (Activity Guide)
Table of Contents
Course Practice Environment: Security Credentials
Practices for Lesson 1: Introduction
	Practices for Lesson 1: Overview
	Practice 1-1: Exploring the Course Environment
Practices for Lesson 2: Getting Started
	Practices for Lesson 2: Overview
	Practice 2-1: Backing Up in NOARCHIVELOG Mode
	Practice 2-2: Creating a Test Case for Recovery
	Practice 2-3: Recovering in NOARCHIVELOG Mode
Practices for Lesson 3: Configuring for Recoverability
	Practices for Lesson 3: Overview
	Practice 3-1: Configuring the Default Backup Destination and ARCHIVELOG Mode
	Practice 3-2: Setting the Date and Time Format for RMAN
	Practice 3-3: Configuring RMAN Settings
	Practice 3-4: Configuring Control Files
	Practice 3-5: Recovery Settings in Cloud Control
	Practice 3-6: Configuring Redo Log Files
Practices for Lesson 4: Using the RMAN Recovery Catalog
	Practices for Lesson 4: Overview
	Practice 4-1: Creating a Recovery Catalog Owner
	Practice 4-2: Creating the Recovery Catalog
	Practice 4-3: Registering a Database in the Recovery Catalog
	Practice 4-4: Configuring Enterprise Manager for the RMAN Catalog
	Practice 4-5: Configuring the Recovery Catalog for Recovery
Practices for Lesson 5: Backup Strategies and Terminology
	Practices for Lesson 5: Overview
	Practice 5-1: Case Study: Developing a Backup Strategy
	Practice 5-2: Creating a Backup Schedule
Practices for Lesson 6: Creating Backups
	Practices for Lesson 6: Overview
	Practice 6-1: Configuring Block Change Tracking
	Practice 6-2: Using Incremental Backup
Practices for Lesson 7: Improving Your Backups
	Practices for Lesson 7: Overview
	Practice 7-1: Backing up Other Database Files
	Practice 7-2: Creating an Archival Backup
Practices for Lesson 8: Using RMAN-Encrypted Backups
	Practices for Lesson 8: Overview
	Practice 8-1: Encrypting a Backup with RMAN
	Practice 8-2: Restoring an Encrypted Backup
Practices for Lesson 9: Diagnosing Database Failure
	Practices for Lesson 9: Overview
	Practice 9-1: Diagnosing and Repairing Database Failure
	Practice 9-2: Performing and Analyzing Instance Recovery
	Practice 9-3: Repairing Block Corruption
Practices for Lesson 10: Restore and Recovery Concepts
	Practices for Lesson 10: Overview
	Practice 10-1: Case Study: Determining Recovery Procedures
Practices for Lesson 11: Performing Recovery
	Practices for Lesson 11: Overview
	Practice 11-1: Recovering from Media Failure (Loss of a Data File)
	Practice 11-2: Recovering from Media Failure: Incomplete Recovery
Practices for Lesson 12: Performing Recovery II
	Practices for Lesson 12: Overview
	Practice 12-1: Recovering the Loss of a Parameter File
	Practice 12-2: Restoring the Control File
	Practice 12-3: Recovering from the Loss of all Control Files
	Practice 12-4: Restoring the Password File
	Practice 12-5: Recovering a Tempfile
	Practice 12-6: Creating Encrypted Backups
	Practice 12-7: Recovering by Using an Encrypted Backup
	Practice 12-8: Recovering a Lost Encryption Wallet
Practices for Lesson 13: RMAN and Oracle Secure Backup
	Practices for Lesson 13: Overview
	Practice 13-1: Installing Oracle Secure Backup
	Practice 13-2: Configuring Oracle Secure Backup
Practices for Lesson 14: Using Flashback Technologies
	Practices for Lesson 14: Overview
	Practice 14-1: Preparing to Use Flashback Technologies
	Practice 14-2: Restoring a Dropped Table
	Practice 14-3: Using Flashback Table
Practices for Lesson 15: Flashback Database
	Practices for Lesson 15: Overview
	Practice 15-1: Enabling Flashback Logging
	Practice 15-2: Performing Flashback Database
Practices for Lesson 16: Transporting Data
	Practices for Lesson 16: Overview
	Practice 16-1: Transporting a Tablespace
Practices for Lesson 17: Performing Point-in-Time Recovery
	Practices for Lesson 17: Overview
	Practice 17-1: Recovering a Table from a Backup
Practices for Lesson 18: Duplicating a Database
	Practices for Lesson 18: Overview
	Practice 18-1: Duplicating a Database
Practices for Lesson 19: RMAN Troubleshooting and Tuning
	Practices for Lesson 19: Overview
	Practice 19-1: Resetting Your Training Databases
Practices for Lesson 20: Workshop
	Practices for Lesson 20: Overview
	Practice 20-1: Preparing for the Backup and Recovery Workshop
	Practice 20-2: Experience the Real-Life Workshop
	Practice 20-3: Your Scenarios
                        
Document Text Contents
Page 1

Learn more from Oracle University at oracle.com/education/

Oracle Database 12c: Backup
and Recovery Workshop

Activity Guide

D78850GC20

Edition 2.0 | March 2015 | D90710

O
ra

cl
e

U
ni

ve
rs

ity
a

nd
E

rr
or

:
Y

ou
a

re
n

ot
a

V
al

id
P

ar
tn

er
u

se
o

nl
y

T
H

E
S

E
e

K
IT

M
A

T
E

R
IA

LS
A

R
E

F
O

R
Y

O
U

R
U

S
E

IN
T

H
IS

C
LA

S
S

R
O

O
M

O
N

LY
.

C
O

P
Y

IN
G

e
K

IT
M

A
T

E
R

IA
LS

F
R

O
M

T
H

IS
C

O
M

P
U

T
E

R
IS

S
T

R
IC

T
LY

P
R

O
H

IB
IT

E
D

Page 2

Copyright © 2015 , Oracle and/or its affiliates. All rights reserved.

Disclaimer

This document contains proprietary information and is protected by copyright and other intellectual property laws. You may copy and
print this document solely for your own use in an Oracle training course. The document may not be modified or altered in any way.
Except where your use constitutes "fair use" under copyright law, you may not use, share, download, upload, copy, print, display,
perform, reproduce, publish, license, post, transmit, or distribute this document in whole or in part without the express authorization
of Oracle.

The information contained in this document is subject to change without notice. If you find any problems in the document, please
report them in writing to: Oracle University, 500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not
warranted to be error-free.

Restricted Rights Notice

If this documentation is delivered to the United States Government or anyone using the documentation on behalf of the United
States Government, the following notice is applicable:

U.S. GOVERNMENT RIGHTS
The U.S. Government’s rights to use, modify, reproduce, release, perform, display, or disclose these training materials are restricted
by the terms of the applicable Oracle license agreement and/or the applicable U.S. Government contract.

Trademark Notice

Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective
owners.

Author s

Maria Billings, Donna Keesling

Technical Contributors and Reviewers

Chris Andrews, Tim Chien, Donna Cooksey, Raluca Constantin, Stefan Dolea, Gerlinde
Frenzen, Joel Goodman, Daniela Hansell, Dominique Jeunot, Sean Kim, Gwen Lazenby, Naoki
Kato, Olga Krakovna, Cris Pedregal, Pavan Nisankara Rao, Puneet Sangar, Ron Soltani, Jim
Spiller, Branislav Valny, Harald van Breederode, Lachlan Williams

This book was published using: Oracle Tutor

Page 155

Copyright © 2015, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11: Performing Recovery

Chapter 11 - Page 17

11. It is recommended to always restore the control file first for incomplete recovery so that
potential changes in the data structures are known to RMAN.

a. Bring the database to NOMOUNT state.

RMAN> shutdown immediate;

database dismounted
Oracle instance shut down

RMAN> startup nomount;
connected to target database (not started)

Oracle instance started



Total System Global Area 536870912 bytes



Fixed Size 2926472 bytes

Variable Size 281020536 bytes

Database Buffers 247463936 bytes

Redo Buffers 5459968 bytes

RMAN>

b. Restore the control file from autobackup.

RMAN> restore controlfile from autobackup;



Starting restore at 2014-12-16:08:21:04

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=12 device type=DISK



recovery area destination: /u01/app/oracle/fast_recovery_area

database name (or database unique name) used for search: ORCL

channel ORA_DISK_1: AUTOBACKUP
/u01/app/oracle/fast_recovery_area/ORCL/autobackup/2014_12_16/o1
_mf_s_866448236_b8zsvf34_.bkp found in the recovery area

channel ORA_DISK_1: looking for AUTOBACKUP on day: 20141216

channel ORA_DISK_1: restoring control file from AUTOBACKUP
/u01/app/oracle/fast_recovery_area/ORCL/autobackup/2014_12_16/o1
_mf_s_866448236_b8zsvf34_.bkp

channel ORA_DISK_1: control file restore from AUTOBACKUP
complete

output file name=/u01/app/oracle/oradata/orcl/control01.ctl

output file
name=/u01/app/oracle/fast_recovery_area/orcl/control02.ctl

Finished restore at 2014-12-16:08:21:06



RMAN>

O
ra

cl
e

U
ni

ve
rs

ity
a

nd
E

rr
or

:
Y

ou
a

re
n

ot
a

V
al

id
P

ar
tn

er
u

se
o

nl
y

T
H

E
S

E
e

K
IT

M
A

T
E

R
IA

LS
A

R
E

F
O

R
Y

O
U

R
U

S
E

IN
T

H
IS

C
LA

S
S

R
O

O
M

O
N

LY
.

C
O

P
Y

IN
G

e
K

IT
M

A
T

E
R

IA
LS

F
R

O
M

T
H

IS
C

O
M

P
U

T
E

R
IS

S
T

R
IC

T
LY

P
R

O
H

IB
IT

E
D

Page 156

Copyright © 2015, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 11: Performing Recovery

Chapter 11 - Page 18

c. Mount the database.

RMAN> alter database mount;

Statement processed

released channel: ORA_DISK_1

RMAN>

12. Restore the entire database from a backup that was taken before the missing archive log
file with the RESTORE DATABASE UNTIL SEQUENCE nn command.

RMAN> RESTORE DATABASE UNTIL SEQUENCE 70; (Enter your missing log
sequence number)


Starting restore at 2014-12-16:08:23:21

Starting implicit crosscheck backup at 2014-12-16:08:23:21

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=12 device type=DISK

Crosschecked 23 objects

Finished implicit crosscheck backup at 2014-12-16:08:23:22



Starting implicit crosscheck copy at 2014-12-16:08:23:22

using channel ORA_DISK_1

Crosschecked 11 objects

Finished implicit crosscheck copy at 2014-12-16:08:23:22



searching for all files in the recovery area

cataloging files...

cataloging done



List of Cataloged Files

=======================

File Name:
/u01/app/oracle/fast_recovery_area/ORCL/archivelog/2014_12_16/o1
_mf_1_67_b8zsw34h_.arc

File Name:
/u01/app/oracle/fast_recovery_area/ORCL/archivelog/2014_12_16/o1
_mf_1_69_b8zsw96w_.arc

File Name:
/u01/app/oracle/fast_recovery_area/ORCL/archivelog/2014_12_16/o1
_mf_1_65_b8zsvwh3_.arc

File Name:
/u01/app/oracle/fast_recovery_area/ORCL/archivelog/2014_12_16/o1
_mf_1_72_b8zswl8f_.arc

File Name:
/u01/app/oracle/fast_recovery_area/ORCL/archivelog/2014_12_16/o1
_mf_1_71_b8zswh8j_.arc

O
ra

cl
e

U
ni

ve
rs

ity
a

nd
E

rr
or

:
Y

ou
a

re
n

ot
a

V
al

id
P

ar
tn

er
u

se
o

nl
y

T
H

E
S

E
e

K
IT

M
A

T
E

R
IA

LS
A

R
E

F
O

R
Y

O
U

R
U

S
E

IN
T

H
IS

C
LA

S
S

R
O

O
M

O
N

LY
.

C
O

P
Y

IN
G

e
K

IT
M

A
T

E
R

IA
LS

F
R

O
M

T
H

IS
C

O
M

P
U

T
E

R
IS

S
T

R
IC

T
LY

P
R

O
H

IB
IT

E
D

Page 309

Copyright © 2015, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 20: Workshop

Chapter 20 - Page 9

Report of database schema for database with db_unique_name ORCL



List of Permanent Datafiles

===========================

File Size(MB) Tablespace RB segs Datafile Name

---- -------- -------------------- ------- ---------------------

1 810 SYSTEM YES
/u01/app/oracle/oradata/orcl/system01.dbf

2 10 BARTBS NO
/u01/backup/orcl/bartbs.dbf

3 730 SYSAUX NO
/u01/app/oracle/oradata/orcl/sysaux01.dbf

4 150 UNDOTBS1 YES
/u01/app/oracle/oradata/orcl/undotbs01.dbf

5 1243 EXAMPLE NO
/u01/app/oracle/oradata/orcl/example01.dbf

6 5 USERS NO
/u01/app/oracle/oradata/orcl/users01.dbf

List of Temporary Files

=======================

File Size(MB) Tablespace Maxsize(MB) Tempfile Name

---- -------- -------------------- ----------- -----------------

1 197 TEMP 32767
/u01/app/oracle/oradata/orcl/temp01.dbf


n. After this practice, execute /home/oracle/workshop/cleanup_20_07.sh. This
script includes a new backup.

Scenarios:
For the following scenarios, diagnose the failure and perform the recovery. There are minimal
hints.

8. Loss of tablespace and current redo log file.

9. Recover from the loss of all control files and a tablespace. This will require restoring the
control file from a backup set.

This scenario requires that there is a backup of the control file. Either backups must be
done with INCLUDING CONTROLFILE or with CONTROLFILE AUTOBACKUP ON. It is
possible to restore using a control file backup to trace, but it requires that you know the
location of the data files belonging to the lost tablespace. In all cases, a complete recovery
is possible.

10. Loss of all control files, and a tablespace dropped and re-created since the last backup.
Hint: The creation of the tablespace is visible in the alert log.

O
ra

cl
e

U
ni

ve
rs

ity
a

nd
E

rr
or

:
Y

ou
a

re
n

ot
a

V
al

id
P

ar
tn

er
u

se
o

nl
y

T
H

E
S

E
e

K
IT

M
A

T
E

R
IA

LS
A

R
E

F
O

R
Y

O
U

R
U

S
E

IN
T

H
IS

C
LA

S
S

R
O

O
M

O
N

LY
.

C
O

P
Y

IN
G

e
K

IT
M

A
T

E
R

IA
LS

F
R

O
M

T
H

IS
C

O
M

P
U

T
E

R
IS

S
T

R
IC

T
LY

P
R

O
H

IB
IT

E
D

Page 310

Copyright © 2015, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 20: Workshop

Chapter 20 - Page 10

11. Loss of a tablespace with backups that have not been cataloged. Recover using an
uncataloged backup set.

The setup creates a copy of backup files in the /u01/backup/alt directory.

Hint: Catalog the existing backup files, then recover using the REPAIR FAILURE
command.

O
ra

cl
e

U
ni

ve
rs

ity
a

nd
E

rr
or

:
Y

ou
a

re
n

ot
a

V
al

id
P

ar
tn

er
u

se
o

nl
y

T
H

E
S

E
e

K
IT

M
A

T
E

R
IA

LS
A

R
E

F
O

R
Y

O
U

R
U

S
E

IN
T

H
IS

C
LA

S
S

R
O

O
M

O
N

LY
.

C
O

P
Y

IN
G

e
K

IT
M

A
T

E
R

IA
LS

F
R

O
M

T
H

IS
C

O
M

P
U

T
E

R
IS

S
T

R
IC

T
LY

P
R

O
H

IB
IT

E
D

Similer Documents