Anda di halaman 1dari 352

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY.

SHARING THE FILE IS STRICTLY PROHIBITED.

D50079CN20

2.0

2011 3

D71767

Oracle University and (Oracle Corporation) use only.

Oracle Database 11g


II

2011Oracle

Maria Billings

Christian Bauwens
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Yanti Chang
Timothy Chien
Joe Fong
Andy Fortunak
Gerlinde Frenzen
Mark Fuller
Peter Fusek
Joel Goodman
Vimala Jacob
Dominique Jeunot

Oracle
Oracle

Oracle University, 500 Oracle Parkway, Redwood Shores, California 94065


USA

U.S. GOVERNMENT RIGHTS


The U.S. Governments 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.

Pete Jones

Fukue Kawabe

Oracle Oracle /

Donna Keesling
Sean Kim
Achiel Langers
Gwen Lazenby
Jerry Lee
Deidre Matishak
Bill Millar
Lakshmi Naraparreddi
Ira Singer
Ranbir Singh
James Spiller
Matt Taylor
Branislav Valny
Jean-Francois Verrier

Nita Pavitran
Raj Kumar

Satish Bettegowda

Jayanthy Keshavamurthy

Oracle University and (Oracle Corporation) use only.

I-2
I-3
Oracle Database 11gg Grid I-4
Oracle Grid Infrastructure I-6
HR I-8

Oracle DB
1-2
Oracle DB Server 1-3
Oracle DB Server 1-4
1-6
Oracle DB 1-7
Oracle DB 1-8
1-10
1-11
1-13
1-14
1-15
1-17
1-19
ASM 1-20
ASM 1-21
DBA 1-23
DBA 1-24
Oracle Restart 1-25
1-27
1-28

2-2
2-3

iii

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2-4
Oracle 2-5
Oracle 2-6
Oracle 2-9
Recovery Manager 2-10
RMAN 2-11
2-12
2-13
ARCHIVELOG 2-14
ARCHIVELOG 2-15
2-16
2-18
2-20
2-22
2-23
2-25
2-26
2-28
2-30
FRA 2-31
2-32
2-33
2-35
2 2-36
3

RMAN
3-2
RMAN 3-3
3-4
3-5
3-6
3-7
3-8
3-9
3-10

iv

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2-7

3-11
Oracle Enterprise Manager 3-12
3-13
3-16
3-17
RMAN 3-18
RMAN 3-19
RMAN 3-20
3-21
3-22
3-23
3-24
IMPORT CATALOG 3-25
3-27
RMAN 3-28
3-30
3-32
3-34
3 RMAN 3-35
4

4-2
RMAN 4-3
4-4
4-5
4-7
4-8
4-10
4-11
4-12
CONFIGURE BACKUP COPIES 4-13
4-14
4-16
4-17
RMAN 4-18

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

3-14

4-19
4-20
4-22

RMAN
5-2
5-3
5-4
5-6
RMAN 5-8
5-10
5-11
5-12
5-13
BACKUP COPIES 5-14
5-15
5-16
5-17
RMAN 5-18
5-19
EM 5-21
RMAN 5-22
5-23
5-24
5-25
5-27
Oracle Enterprise Manager 5-28
5-29
5-30
5-32
5 5-33

6-2
6-3

vi

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

4 4-23

6-4
6-5
6-6
6-8
6-9
6-10
6-11
6-13
6-14
6-16
6-17
6-18
6-20
NOLOGGING 6-21
6-22
6-23
6-24
6-26
7

RMAN
7-2
RMAN RESTORE RECOVER 7-3
ARCHIVELOG 7-5
ARCHIVELOG 7-6
7-7
7-8
7-9
SET NEWNAME 7-10
SET NEWNAME 7-11
NOARCHIVELOG 7-12
7-13
7-14
7-16
7-17
7-18

vii

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

6-7

7-19
NOARCHIVELOG 7-21
7-22
7-24
7-28
7-30
7-32
7 RMAN 7-33
8

RMAN
8-2
8-3
RMAN 8-5
RMAN 8-7
RMAN 8-9
DEBUG 8-10
RMAN 8-11
RMAN 8-12
RMAN 8-13
8-14
8-15
I/O I/O 8-16
RMAN 8-18
I/O 8-19
I/O 8-20
8-21
BACKUP 8-23
RMAN 8-24
LARGE_POOL_SIZE 8-25
RMAN 8-26
8-28
8-30
8 RMAN 8-31

viii

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

7-23

9-2
9-3
9-7
RMAN 9-8
9-9
9-11
9-12
9-13
9-14
9-15
9-16
ORA-01578 9-17
9-18
9-19
9-21
9-22
RECOVER...BLOCK 9-23
9-24
9-25
ADR (ADRCI) 9-26
V$DIAG_INFO 9-27
9-28
9-29
PL/SQL 9-30
ADRCI HM 9-31
9-32
9-36
9 9-37

10 I
10-2
10-3
10-4
10-5

ix

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

9-6

10-6
10-8
10-9
10-11
10-12
10-13
10-15
10-16
10-17
10-18
10-20
10-21
10-22
Oracle Enterprise Manager 10-23
10-24
10-25
10-26
10-27
10-28
10-29
10-30
EM 10-32
10-33
10-34
10 10-35
11 II
11-2
Oracle Total Recall 11-3
11-4
Total Recall 11-5
Oracle Total Recall 11-6
11-9
11-10
11-11

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

10-10

11-12
11-13
11-14
11-17
11-19
11-20
11-21

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

11-16

11-22
11-23
11-24
11-25
11 11-26
12
12-2
12-3
12-4
12-5
12-6
12-7
12-8
12-9
EM 12-11
12-12
12-13
12-14
12-16
12 12-17
13
13-2
13-3
Oracle DB 13-4
13-6
13-8

xi

13-10
13-11
Java 13-12
13-14
Oracle DB 13-15
13-16
13-18
13-20
13-22
ASMM 13-23
13-24
ASMM 13-26
(PGA) 13-27
V$PARAMETER 13-29
13-30
13-31
13 AMM 13-32
14
14-2
14-3
14-4
14-6
14-7
14-8
14-9
14-10
14-12
14-13
Oracle Enterprise Manager 14-14
Oracle 14-15
14-16
14-18
14-19
14-20

xii

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

13-13

14-21
14-22
14-24
Real Application Testing 14-27
14-28
14-29
14-30
14 14-31
15 SQL
15-2
SQL 15-3
SQL 15-4
SQL 15-5
15-6
SQL 15-7
SQL 15-8
SQL 15-9
SQL 15-10
SQL 15-11
SQL 15-13
SQL 15-14
SQL 15-15
15-16
15-17
15-20
SQL 15-21
SQL 15-22
SQL 15-24
15-25
15-29
15 SQL 15-30

xiii

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

14-26

16
16-2
16-3
16-5
16-7
DEFAULT_PLAN 16-8
16-9
16-11
16-12
EMPHASIS RATIO 16-13
16-15
16-16
16-18
16-19
CPU 16-20
CPU 16-22
16-23
16-24
16-25
16-27
16-28
16-29
16-32
16-33
16 16-34
17
17-2
17-3
17-4
17-5
17-7
17-8
17-9
17-10

xiv

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

16-4

17-12
Oracle Enterprise Manager 17-13
17-14
17-17
17-18
17-19
17-20
17-22
17-24
17-25
17-26
17-28
17-29
17-30
17-32
17-33
17-35
17-36
17-37
17-38
17-39
17-41
17-42
17 17-43
18
18-2
18-3
18-4
18-5
18-7
18-8
18-9
18-10
18-11

xv

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

17-15

18-12
18-13
18-14
18-16
18-17
18-18
DML OLTP 18-20
18-21
18-22
DBMS_COMPRESSION 18-23
18-24
18-25
18-26
18-27
18-28
18-29
ASSM 18-30
18-31
18-32
18-33
18-34
EM 18-35
SQL 18-36
18-37
18-38
18-40
18-42
18-43
18-44
18 18-45
19
19-2
19-3
4 KB 19-4

xvi

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

18-15

4 KB 19-5
19-6
19-7
19-11
19-12
19-13
Endian 19-14
RMAN CONVERT 19-16
Oracle Enterprise Manager 19-17
19-20
19-21
19-22
19-23
19-24
19-25
19 19-26
20
20-2
20-3
20-4
20-5
20-6
20-7
20-8
20-9
20-10
20-11
SET NEWNAME 20-12
SET NEWNAME 20-13
20-14
NOMOUNT 20-16
20-17
20-18
RMAN 20-19

xvii

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

19-10

DUPLICATE 20-21
DUPLICATE 20-22
EM 20-23
20-25
20 20-26
A
B
B-2
(TSPITR) B-3
(TSPITR) B-4
B-5
TSPITR B-7
TSPITR B-8
B-9
B-10
B-11
B-12
RMAN TSPITR B-13
TSPITR B-14
TSPITR B-15
Oracle Enterprise Manager TSPITR B-16
RMAN TSPITR B-17
RMAN RMAN TSPITR B-19
RMAN TSPITR B-20
RMAN TSPITR B-21
B-22
C
C-2
C-3
C-4
C-5
C-6

xviii

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

20-24

NOARCHIVELOG C-7
ARCHIVELOG C-8
C-9
C-11
C-12
C-13
C-15
C-16
C-17
C-18
C-19
C-21
C-22
C-24
C-26
D ASM
D-2
ASM D-3
ASM D-4
ASM ASM D-6
ASM D-7
ASM D-9
ASM D-10
ASM D-11
Oracle Enterprise Manager ASM D-12
SQL*Plus ASM D-13
srvctl ASM D-15
asmcmd ASM D-16
D-17
ASM D-18
D-19
ASM D-20
D-21
D-22

xix

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

C-10

D-23
ASM D-25
D-26
D-28
SQL*Plus D-29
D-30
ALTER D-31
Oracle Enterprise Manager ASM D-32
ASM D-33
ASM D-35
Oracle Enterprise Manager D-36
ASM D-37
ASM D-38
D-39

xx

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

D-27

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

Oracle University and (Oracle Corporation) use only.

Oracle DB

Recovery Manager (RMAN)

SQL

2011Oracle

DBA

Oracle Database 11g II I-2

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

1.

Oracle DB

2.

14.

3.

RMAN

15. SQL

4.

16.

5.

RMAN

6.

7.

RMAN

8.

RMAN

9.

13.

17.

18.
19.
20.

10. I
11. II
12.

2011Oracle

Oracle Database 11g II I-3

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

(OGF)

Oracle Grid Infrastructure




Grid Control

Real
Application
Clusters

Oracle Enterprise
Manager
Grid Control

2011Oracle

Oracle Database 11gg Grid


(OGF)

OGF http://www.ogf.org
Oracle

UNIX
(SMP) Intel
Linux
Oracle

(ASM)

Real Application Clusters (RAC)

Oracle Enterprise Manager Grid Control

Oracle Database 11g II I-4

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Oracle Database 11gg Grid

Oracle Database 11gg Grid

Oracle Real Application Clusters

Oracle Database 10g

Oracle RAC

Oracle Database 10g Java (JDBC)

Oracle WebLogic Application Grid Oracle WebLogic


ServerIBM WebSphere Application Server JBoss Application Server
Oracle WebLogic Application Grid
Oracle WebLogic Application Grid

Oracle Enterprise Manager Grid Control

Grid Control

Oracle Enterprise Manager Database Console

Oracle Database 11g II I-5

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

/ (I/O) ASM

Oracle Grid Infrastructure Oracle


Database 11g 2 (11.2)

Oracle DB

Oracle (ASM)

Oracle Restart

Oracle Net

ASM

ASM

Data Guard Oracle (ONS/eONS)


2011Oracle

Oracle Grid Infrastructure


Oracle Grid Infrastructure Oracle Database 11g 2
Oracle DB Oracle
Oracle Restart
Oracle Restart Oracle DB
Oracle Real Application Cluster (Oracle RAC)
Oracle Clusterware Oracle Restart

Oracle Net

ASM

ASM

Data Guard Oracle (ONS/eONS)

Oracle Restart
Oracle Restart Oracle DB Oracle Grid
Infrastructure
Oracle Database 11g II I-6

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Oracle Grid Infrastructure

Oracle Grid Infrastructure

(SGA)
Oracle Real Application Clusters

Oracle Net

Oracle Clusterware
RAC /
Oracle Clusterware
DBMS_SERVICE Oracle Clusterware

ASM Oracle DB ASM Oracle DB


(SGA) ASM
ASM SGA SGAASM ASM
ASM

ASM ASM
I/O

Oracle (ONS) -
(FAN)

Oracle Database 11g II I-7

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

HR
REGION_ID (PK)
REGION_NAME

COUNTRIES

JOBS

COUNTRY_ID (PK)
COUNTRY_NAME
REGION_ID (FK)

JOB_ID (PK)
JOB_TITLE
MIN_SALARY
MAX_SALARY

LOCATIONS

EMPLOYEES

LOCATION_ID (PK)
STREET_ADDRESS
POSTAL_CODE
CITY
STATE_PROVINCE
COUNTRY_ID (FK)

DEPARTMENTS

DEPARTMENT_ID (PK)
DEPARTMENT_NAME
MANAGER_ID
LOCATION_ID (FK)

JOB_HISTORY

EMPLOYEE_ID (PK)
START_DATE (PK)
END_DATE
JOB_ID (FK)
DEPARTMENT_ID (FK)

EMPLOYEE_ID (PK)
FIRST_NAME
LAST_NAME
EMAIL
PHONE_NUMBER
HIRE_DATE
JOB_ID (FK)
SALARY
COMMISION_PCT
MANAGER_ID (FK)
DEPARTMENT_ID (FK)

2011Oracle

HR
(HR)

HR

JOB_HISTORY

JOB_HISTORY (PK)
EMPLOYEE_ID START_DATE

PK = Primary KeyFK = Foreign Key


(FK) FK
EMPLOYEES FK
FK

Oracle Database 11g II I-8

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

REGIONS

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

Oracle University and (Oracle Corporation) use only.

Oracle DB

(ASM) Oracle DB

DBA

2011Oracle

ASM Oracle DB
DBA

Oracle Database 11g II 1-2

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.


PGA

2011Oracle

Oracle DB Server

1. Oracle DB ___________________ _________________


2. _____________________ _____________________
3. Oracle DB Server ____________________________
____________
4. _______________ ______________

Oracle Database 11g II 1-3

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Oracle DB Server


PGA

2011Oracle

Oracle DB Server
Oracle DB Server
Oracle DB Oracle DB

(SGA)

Oracle

Oracle (ASM)

Oracle DB
Oracle DB
Oracle DB
Oracle Database 11g II 1-4

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Oracle DB Server

Oracle DB

Oracle DB
/ HR/HR Oracle DB

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

SQL*Plus

Oracle Database 11g II 1-5

I1
I2

I1

I2

I3

D1
D2

2011Oracle

Real Application
Clusters (RAC)
RAC

Oracle Database 11g II 1-6

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Oracle DB

nK

Java

(SGA)
2011Oracle

Oracle DB

1. PGA ____________ _______________


2. SGA
-

___________________________

___________________________

___________________________

___________________________

___________________________

___________________________

___________________________

___________________________

___________________________

Oracle Database 11g II 1-7

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

(PGA)

Oracle DB
PGA

Java

nK

(SGA)
2011Oracle

Oracle DB
Oracle DB

(SGA) SGA Oracle


DB SGA SGA
SQL

(PGA)
PGA Oracle DB
PGA PGA

Oracle Database 11g II 1-8

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

(PGA)

Oracle DB

nK

Oracle I/O

Java Java (JVM) Java

Oracle Streams

Oracle Enterprise Manager SQL*Plus SGA


(PGA) Oracle
Server PGA
PGA
Oracle PGA
(UGA)
SGA
Java
Oracle DB

(MEMORY_TARGET) (MEMORY_MAX_TARGET)

Oracle Database 11g II 1-9

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

SGA SGA

Oracle DB

Oracle

Oracle

/

Grid Infrastructure

2011Oracle

Oracle DB

Oracle

Oracle DB Server Oracle DB

Oracle

Oracle SQL*Plus

Oracle DB Oracle Server

I/O
Oracle DB Oracle DB

Oracle DB Server

Oracle Database 11g II 1-10

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

ASM
(SGA)
PGA

DBWn

CKPT

LGWR

SMON

ARCn

ASMB

RBAL

PMON

RECO

Grid Infrastructure
ASM Oracle Restart

ohasd

ocssd

diskmon

orarootagent

oraagent

cssdagent

2011Oracle

Oracle DB
Oracle DB Oracle DB
Oracle DB

SQL

SGA
SGA

Oracle DB
Oracle DB Oracle DB

Oracle Database 11g II 1-11

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

(DBWn)

(LGWR)

(CKPT)

(SMON)

(PMON)

(RECO)

(CJQ0)

(Jnnn)

(ARCn)

(QMNn)

RAC
V$BGPROCESS

Grid Infrastructure
Linux Unix Oracle Grid Infrastructure
ohasdOracle Oracle Clusterware

ocssd

diskmon HP Oracle Exadata Storage Server

cssdagent CSS ocssd

oraagent Oracle

orarootagent Oracle root

Oracle Database 11g II 1-12

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RAC ASM

1. ______

2. ______

3. ______

4. ______
5. ______

6. ______

A. (CKPT)
B.
(SMON)
C. (RECO)
D. (LGWR)
E. (ARCn)
F.
(PMON)
G. (DBWn)

7. ______

2011Oracle

Oracle Database 11g II 1-13

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Oracle Grid Infrastructure

init

Grid Infrastructure Grid Infrastructure

init.ohasd
(root)

ohasd.bin
oraagent.bin
orarootagent.bin
diskmon.bin
cssdagent
ocssd.bin

ASM

DB

Oracle Grid Infrastructure /etc/inittab

# cat /etc/inittab
..
h1:35:respawn:/etc/init.d/init.ohasd run >/dev/null 2>&1 </dev/null

2011Oracle

Oracle Grid Infrastructure /etc/inittab


Oracle Grid Infrastructure

Oracle Grid Infrastructure


UNIX /etc/inittab
id : run levels : action : process with parameters
respawn
Oracle Grid Infrastructure root
Oracle Grid Infrastructure Windows

Oracle Database 11g II 1-14

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

Oracle DB

sysdbasysoper sysasm

Oracle Database 11g II 1-15

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Oracle

Oracle

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Oracle Database 11g II 1-16

SAN

NFS

NAS

ASM

Exadata RAW
Oracle

2011Oracle

TEMPORARY

Oracle DB
Oracle

Oracle Database 11g II 1-17

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.


Oracle
Oracle
RAID

UNDO

SQL Oracle DB

Oracle DB

Oracle Database 11g II 1-18

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Oracle DB

ASM
(ACFS)

Oracle DB

ASM

ASM

Oracle
DB
ASM

2011Oracle

(ASM) Oracle DB ASM


(SMP) Oracle Real
Application Clusters (RAC)
Oracle ASM (ACFS)
ASM Oracle DB
BFILE
ASM / (I/O) I/O
ASM DBA DBA

ASM
ASM

ASM DBA

Oracle Database 11g II 1-19

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

ASM
Oracle DB

ASM

ASM

ASM

ASM

ASM

2011Oracle

ASM
ASM
ASM ASM
Oracle DB ASM
Oracle DB ASM

Oracle ASM Oracle ASM


Oracle ASM
Oracle ASM
(LUN) (LV) ASM ASM
(AU) ASM ASM
ASM 12481632 64 MB
ASM ASM Oracle ASM
Oracle ASM Oracle ASM
ASM AU 1 4
16

Oracle Database 11g II 1-20

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

ASM

ASM ASM
(SGA)

ASM

CPU
RBAL

ARBn

MARK

GMON

Onnn

PZ9n

ASM

2011Oracle

ASM
ASM (SGA)
Oracle ASM SGA Oracle ASM Oracle
DB ASM CPU RAM
ASM SGA SGA ASM
SGA

ASM

ASM 256 MB ASM


SGA ASM ASM

ASM ASM

Oracle Database 11g II 1-21

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

ASM

ASM ASM

CKPT

DBWn

DIAG

Jnnn

LGWR

PMON

PSP0

QMNn

RECO

SMON

VKTM

MMAN

ASM
LGWR SGA
ASM SGA
ASM LGWR ASM
ASM ASM

LMON

LMDn

LMSn

LCKn

ASM D

Oracle Database 11g II 1-22

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

ASM

ARCn

OUI Oracle Grid


Infrastructure

ASM (+ASM) +DATA
Oracle Restart

asmca ASM +FRA

OUI Oracle Database 11g


dbca orcl Oracle DB

2011Oracle

DBA
DBA Oracle

Oracle Universal Installer (OUI) Oracle


OUI
Oracle DB

Oracle ASM Configuration Assistant (ASMCA) ASM


Oracle ASM (Oracle Automatic Storage Management Cluster
File System, Oracle ACFS)

Oracle Database Configuration Assistant (DBCA) Oracle DB

Oracle DB OUI

Net Configuration Assistant (NETCA) Oracle

Oracle Restart Oracle Grid Infrastructure


Oracle Restart Oracle
Oracle Oracle DB
Oracle Grid Infrastructure Oracle Restart
Oracle Database 11g II 1-23

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

DBA

Oracle DB

SQL*Plus
SQL> startup
SQL> shutdown immediate


Grid Control

$ lsnrctl status

Database Control

Oracle Enterprise Manager

$ emctl status dbconsole


$ emctl start dbconsole
$ emctl stop dbconsole

2011Oracle

DBA
Oracle DB

Oracle Enterprise Manager Grid Control Oracle


Enterprise Manager Database Control

SQL*Plus startup shutdown immediate

lsnrctl status

Oracle Enterprise Manager Database Control


- emctl dbconsole status
-

emctl dbconsole start

emctl dbconsole stop

Oracle Database 11g II 1-24

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

DBA

Oracle

ASM

crsctl Oracle Restart

srvctl Oracle Restart


$ srvctl stop database d orcl o abort

2011Oracle

Oracle Restart

Oracle Restart
Oracle

Oracle Restart

Oracle Restart Oracle Real Application Clusters


(Oracle RAC) Oracle Clusterware

Oracle Restart Oracle


ASM Oracle Restart
ASM
Oracle Restart

Oracle Restart Oracle Net


Oracle Restart
Oracle Restart

Oracle Database 11g II 1-25

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Oracle Restart

Oracle Restart
Clusterware Control (crsctl) Oracle Restart
Oracle Restart Server Control (srvctl)
Oracle Restart

srvctl Grid Infrastructure $ORACLE_HOME/bin Oracle


DB $ORACLE_HOME/bin Oracle DB Oracle DB
srvctl ASM Grid Infrastructure
srvctl

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Oracle Database 11g II 1-26

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

1.

2.

2011Oracle

Oracle Database 11g II 1-27

Oracle University and (Oracle Corporation) use only.

Oracle Restart Oracle Grid


Infrastructure

ASM Oracle DB

DBA

orcl +asm

DATA
FRA
Oracle Enterprise
Manager

2011Oracle

orcl +asm
DATA FRA

Oracle Enterprise Manager

Oracle Database 11g II 1-28

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

Oracle University and (Oracle Corporation) use only.

Recovery Manager (RMAN)


ARCHIVELOG

(FRA)

2011Oracle

(Fast Recovery Area, FRA) Flash Recovery Area

Oracle Database 11g II 2-2

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

ARCHIVELOG

Oracle Database 11g II 2-3

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

Oracle Database 11g II 2-4

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN



2011Oracle

Oracle

Recovery Manager
RMAN

RMAN

Linux zip


Oracle DB
0 11
0
0 1
Oracle Database 11g II 2-5

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Oracle

OS

RMAN

OSB

(filesperset 3)

2011Oracle

Oracle
OS RMAN
Oracle Secure Backup (OSB)

RMAN OSB

RMAN SPFILE
RMAN
(MML) Oracle Secure Backup
Oracle Secure Backup (OSB) Oracle Oracle DB
OSB (LAN)
(WAN) SAN
Oracle

Oracle Database 11g II 2-6

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Oracle


1. ___

2. ___ SCN
SCN
3. ___

4. ___

5. ___
(W) (F) (C)
(P) (O)
2011Oracle

1P2C3F4O5W

Oracle Database 11g II 2-7

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.


1.
2.

A)

B)

2011Oracle

1B2A

Oracle Database 11g II 2-8

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

Oracle
Oracle Enterprise Manager Oracle
24 48
Oracle

Oracle MaintenanceBackup/Recovery
/Schedule BackupBackup Strategies
Oracle-Suggested BackupOracle
Customized BackupOracle

24 48
n1

Oracle Database 11g II 2-9

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Oracle

$ rman target /
RMAN> BACKUP DATABASE;
Starting backup at 10-JUN-07
.
.
RMAN> LIST BACKUP;
BS Key Type LV Size
Device Type Elapsed Time Completion Time
------- ---- -- ------- ----------- ------------ --------------1
Full
1.06G
DISK
00:01:49
10-JUN-07
.
.
RMAN> DELETE OBSOLETE;
.
.
Do you really want to delete the above objects (enter YES or NO)? YES
deleted archived log
.
.

2011Oracle

Recovery Manager
RMAN
target
catalog
nocatalog
cmdfile
log
RMAN
RMAN OS
RMAN
$ rman target / cmdfile=~/fullbu.rman log=~/fullbu.log

RMAN RMAN
(LIST BACKUP)
(DELETE OBSOLETE)
RMAN Oracle Database Backup and Recovery
Users Guide RMAN Oracle Database Backup
and Recovery Reference
Oracle Database 11g II 2-10

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Recovery Manager

RMAN

RMAN
RUN

RUN

2011Oracle

RMAN
RMAN
RMAN
CHANGE
CONNECT
CREATE CATALOGRESYNC CATALOG
CREATE SCRIPTDELETE SCRIPTREPLACE SCRIPT
RMAN

ALLOCATE CHANNEL
RUN
BACKUP DATABASE RMAN

Oracle Database 11g II 2-11

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

RUN
RMAN> RUN
2> {
3>
ALLOCATE CHANNEL c1 DEVICE TYPE DISK
4>
FORMAT "/disk2/%U";
5>
BACKUP AS BACKUPSET DATABASE;
6>
SQL 'alter system archive log current';
7> }

RUN

2011Oracle

RUN RUN
RUN
RUN
ALLOCATE CHANNEL
SWITCH
RMAN RUN RMAN
RUN RUN
Oracle DB /
(I/O) I/O
6 SQL

Oracle Database 11g II 2-12

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

ARCHIVELOG

(ARCn)

FRA

2011Oracle

ARCHIVELOG

Oracle DB Oracle

Oracle Database 11g II 2-13

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.


(ARCn)

2011Oracle

ARCHIVELOG

(ARCn)

ARCHIVELOG

Oracle Database 11g II 2-14

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

ARCHIVELOG

ARCHIVELOG

Oracle Enterprise Manager


ARCHIVELOG ModeARCHIVELOG

Apply MOUNT
ARCHIVELOG
Yes

SQL

ALTER DATABASE ARCHIVELOG

2011Oracle

ARCHIVELOG
ARCHIVELOG
Oracle Enterprise Manager Availability > Recovery Settings >
ARCHIVELOG ModeARCHIVELOG

SQL ARCHIVELOG MOUNT

ARCHIVELOG
SQL>
SQL>
SQL>
SQL>

SHUTDOWN IMMEDIATE
STARTUP MOUNT
ALTER DATABASE ARCHIVELOG;
ALTER DATABASE OPEN;

NOARCHIVELOG

ARCHIVELOG
ARCHIVELOG
ARCHIVELOG

Oracle Database 11g II 2-15

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

ARCHIVELOG

LOG_ARCHIVE_DEST_n


LOG_ARCHIVE_DEST
LOG_ARCHIVE_DUPLEX_DEST

2011Oracle

LOG_ARCHIVE_DEST_n
n 1 10

LOCATION= /disk3/arch

LOG_ARCHIVE_DEST_1 = 'LOCATION=/disk3/arch'

SERVICE
standyby1
LOG_ARCHIVE_DEST_2 = 'SERVICE=standby1'.

Oracle DB LOG_ARCHIVE_DEST
LOG_ARCHIVE_DUPLEX_DEST

LOG_ARCHIVE_DEST = '/disk1/arch'
LOG_ARCHIVE_DUPLEX_DEST = '/disk2/arch'

Oracle Database 11g II 2-16

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Oracle LOG_ARCHIVE_DEST_n

Oracle Database 11g II 2-17

LOG_ARCHIVE_MIN_SUCCEED_DEST = 2

2011Oracle

LOG_ARCHIVE_MIN_SUCCEED_DEST

LOG_ARCHIVE_MIN_SUCCEED_DEST 2
1

LOG_ARCHIVE_DEST_n
1 10 LOG_ARCHIVE_DEST
1 2

Oracle Database 11g II 2-18

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.


MANDATORY OPTIONAL
MANDATORY
OPTIONAL
OPTIONAL
Oracle DB

LOG_ARCHIVE_MIN_SUCCEED_DEST
LOG_ARCHIVE_DEST
LOG_ARCHIVE_MIN_SUCCEED_DEST = 1 LOG_ARCHIVE_DUPLEX_DEST
LOG_ARCHIVE_MIN_SUCCEED_DEST = 2

Oracle Database 11g II 2-19

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

LOG_ARCHIVE_DEST_1 = 'LOCATION=/disk3/arch MANDATORY'

SYSDATE

SYSDATE

2011Oracle

RMAN
CONFIGURE Oracle Enterprise Manager

SYSDATE backup_checkpoint_time >= recovery_window

RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF <>


DAYS;

<>

Oracle Database 11g II 2-20

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.


RESYNC CATALOG
RMAN

RMAN> CONFIGURE RETENTION POLICY TO REDUNDANCY <>;

<>

RMAN
RMAN
RMAN
RMAN
CONTROL_FILE_RECORD_KEEP_TIME

RMAN> CONFIGURE RETENTION POLICY TO NONE;

RMAN

Oracle Database 11g II 2-21

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

CONTROL_FILE_RECORD_KEEP_TIME
CONTROL_FILE_RECORD_KEEP_TIME

100

200

300

400

500

B 201 500

2011Oracle

RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;

B
201 500 A (B)
C

Oracle Database 11g II 2-22

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

Oracle DB


Oracle Database SQL Language
Reference CREATE CONTROLFILE Semantics

LOGFILE

- DB_CREATE_ONLINE_LOG_DEST_n

- DB_CREATE_FILE_DEST
- DB_RECOVERY_FILE_DEST DB_CREATE_FILE_DEST

Oracle Database 11g II 2-23

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

LOG_ARCHIVE_DEST_1

LOG_ARCHIVE_DEST_n
LOG_ARCHIVE_DEST_n

RMAN Oracle DB Server

BACKUP AS COPY
RMAN RMAN

FRA

Oracle Database 11g II 2-24

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Oracle Database SQL


Language Reference CREATE DATABASE LOGFILE

FRA
DB_RECOVERY_FILE_DEST_SIZE

DB_RECOVERY_FILE_DEST FRA

2011Oracle

FRA
DB_RECOVERY_FILE_DEST_SIZE FRA
FRA
-
Oracle

- FRA
- FRA FRA

DB_RECOVERY_FILE_DESTFRA

Oracle Enterprise Manager Grid Control Database Control FRA


Availability > Recovery Settings > Recovery
Settings FRA FRA

Oracle Database 11g II 2-25

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

1
2
3
4

RMAN

1
2

2011Oracle

RMAN
DB_REOVERY_FILE_DEST_SIZE
Oracle
DB Server RMAN 100%
DB_RECOVERY_FILE_DEST_SIZE

Oracle DB Server

85% 97%

WARNING: db_recovery_file_dest_size of 52428800 bytes is


100.00% used, and has 0 remaining bytes available.

Oracle Database 11g II 2-26

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN
RMAN

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

SQL> SELECT object_type, message_type, message_level,


2 reason, suggested_action
3 FROM dba_outstanding_alerts;

Oracle Database 11g II 2-27

RMAN REPORT OBSOLETE DELETE


OBSOLETE

2011Oracle

RMAN
RMAN
RMAN
RMAN

DB_RECOVERY_FILE_DEST_SIZE
Oracle Enterprise Manager
RMAN
RMAN
RMAN RMAN

RMAN
BACKUP ARCHIVELOG ALL DELETE ALL INPUT;

Oracle Database 11g II 2-28

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Oracle Enterprise Manager Manage Backups

CONFIGURE ARCHIVELOG DELETION POLICY


FRA
RMAN
FRA FRA

BACKUP ... DELETE INPUT DELETE ARCHIVELOG


FRA

CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;

Oracle Database 11g II 2-29

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN RMAN
RMAN CROSSCHECK
DELETE

2011Oracle

Streams

Data GuardStreamsFlashback Database

FRABACKUP ... DELETE INPUT DELETE ... ARCHIVELOG


FRA
FRA RMAN

Oracle Database 11g II 2-30

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

...

2011Oracle

FRA
Oracle Enterprise Manager Database Control FRA
Related LinksAll Metrics
Recovery Area
Recovery Area Free Space (%) (%)

Oracle Database 11g II 2-31

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

FRA

2011Oracle

FRA
Oracle Corporation

Oracle Database 11g II 2-32

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2.

3.

4.

2011Oracle

124

Oracle Database 11g II 2-33

Oracle University and (Oracle Corporation) use only.

1.

(FRA)
1. FRA ASM
2. FRA
3. FRA
4. FRA

2011Oracle

12

Oracle Database 11g II 2-34

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN
ARCHIVELOG

2011Oracle

Oracle Database 11g II 2-35

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

FRA

RMAN

2011Oracle

Oracle Database 11g II 2-36

Oracle University and (Oracle Corporation) use only.

ARCHIVELOG

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

Oracle University and (Oracle Corporation) use only.

RMAN

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

RMAN

2011Oracle

Oracle Database 11g II 3-2

Oracle University and (Oracle Corporation) use only.

RMAN

.
.
.

2011Oracle

RMAN
RMAN

RMAN
RMAN
Oracle

Oracle Database 11g II 3-3

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

Recovery
Manager
(RMAN)

2011Oracle

RMAN

Oracle Database 11g II 3-4

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

BACKUP KEEP FOREVER

2011Oracle

RMAN

RMAN

RC_
V$
RMAN
BACKUP ... KEEP
KEEP FOREVER

REPORT SCHEMA
AT [time|scn|logseq]
AT

Oracle Database 11g II 3-5

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

1.

2.

3.

Oracle Database 11g II 3-6

Oracle University and (Oracle Corporation) use only.



RMAN

SQL> CREATE TABLESPACE rcat_ts DATAFILE SIZE 15M;

2011Oracle

RMAN
15 MB

Oracle Database 11g II 3-7

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

SQL>
2
3
4
SQL>

RECOVERY_CATALOG_OWNER

CREATE USER rcowner IDENTIFIED BY rcpass


TEMPORARY TABLESPACE temp
DEFAULT TABLESPACE rcat_ts
QUOTA UNLIMITED ON rcat_ts;
GRANT recovery_catalog_owner TO rcowner;

2011Oracle

UNLIMITED
RECOVERY_CATALOG_OWNER RECOVERY_CATALOG_OWNER
ALTER SESSIONCREATE CLUSTER
CREATE DATABASE LINKCREATE PROCEDURECREATE SEQUENCECREATE
SESSIONCREATE SYNONYMCREATE TABLECREATE TRIGGERCREATE TYPE
CREATE VIEW
SQL Oracle Enterprise Manager

Oracle Database 11g II 3-8

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

$ rman
RMAN> CONNECT CATALOG username/password@net_service_name

CREATE CATALOG

RMAN> CREATE CATALOG;

2011Oracle

RMAN CREATE CATALOG

ORACLE_SID SID
CONNECT net_service_name

Oracle Database 11g II 3-9

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

Oracle Database 11g II 3-10

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

$ rman TARGET / CATALOG


username/password@net_service_name
RMAN> REGISTER DATABASE;

2011Oracle

1. RMAN
% rman TARGET / CATALOG rman/rman@reccatdb

2.
3. REGISTER
RMAN> REGISTER DATABASE;

Oracle Database 11g II 3-11

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Oracle Enterprise
Manager (EM)
1. EMRecovery
Catalog Settings
2.
3.

EM EM

2011Oracle

Oracle Enterprise Manager


EM EM
EM
RMAN EM
EM
RMAN REGISTER DATABASE
Oracle Enterprise Manager
1. EM DatabaseEM Availability > Recovery Catalog
Settings > Add Recovery Catalog
SID
2. Recovery Catalog Setting
Use Recovery Catalog
OK

Oracle Database 11g II 3-12

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Oracle Enterprise Manager

$ rman TARGET / CATALOG


username/password@net_service_name
RMAN> UNREGISTER DATABASE;

2011Oracle

RMAN

Oracle Enterprise Manager Database Control

Oracle Database 11g II 3-13

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

CATALOG

RMAN
CATALOG





RMAN> CATALOG BACKUPPIECE 'file_name';

2011Oracle

CATALOG
RMAN

RMAN> CATALOG CONTROLFILECOPY


'/disk1/controlfile_bkup/2009_01_01/control01.ctl';
RMAN> CATALOG DATAFILECOPY
'/disk1/datafile_bkup/2009_01_01/users01.dbf';
RMAN> CATALOG ARCHIVELOG '/disk1/arch_logs/archive1_731.log',
'/disk1/arch_logs/archive1_732.log';
RMAN> CATALOG BACKUPPIECE '/disk1/backups/backup_820.bkp';

RMAN> CATALOG RECOVERY AREA NOPROMPT;

START WITH
START WITH

Oracle Database 11g II 3-14

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

/tmp/arch_logs
/tmp bset

RMAN> CATALOG START WITH '/tmp/bset';

/tmp/bset
CATALOG

Oracle Database 11g II 3-15

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN> CATALOG START WITH '/tmp/arch_logs/';

2011Oracle

RMAN /

RMAN

RMAN

CONTROL_FILE_RECORD_KEEP_TIME
RESYNC
CATALOG

Oracle Database 11g II 3-16

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

RMAN> RESYNC CATALOG;

2011Oracle

RMAN

Oracle Backup and Recovery


Users Guide

Oracle Database 11g II 3-17

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

CREATE SCRIPT script_name


{ <RMAN commands>}


RMAN

CREATE GLOBAL SCRIPT script_name


{ <RMAN commands> }

CREATE [GLOBAL] SCRIPT script_name FROM FILE 'file_name';

2011Oracle

RMAN
RMAN RMAN

RMAN
RMAN

RMAN

RMAN
CREATE SCRIPT

Oracle Database 11g II 3-18

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

RUN { EXECUTE SCRIPT


script_name
; }

RUN { EXECUTE GLOBAL SCRIPT


script_name
; }

2011Oracle

RMAN
EXECUTE SCRIPT
EXECUTE SCRIPT RUN RMAN
RMAN

ALLOCATE CHANNEL
RMAN> RUN
{
ALLOCATE CHANNEL ch1 DEVICE TYPE DISK;
ALLOCATE CHANNEL ch2 DEVICE TYPE DISK;
ALLOCATE CHANNEL ch3 DEVICE TYPE DISK;
EXECUTE SCRIPT full_backup;
}

Oracle Database 11g II 3-19

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

RMAN

PRINT [GLOBAL] SCRIPT script_name;

PRINT [GLOBAL] SCRIPT script_name TO FILE 'file_name';

LIST [GLOBAL] SCRIPT NAMES;

REPLACE [GLOBAL] SCRIPT script_name


{ <RMAN commands> ; }

REPLACE [GLOBAL] SCRIPT script_name FROM FILE


'file_name';

DELETE SCRIPT script_name;


2011Oracle

RMAN
PRINT SCRIPT

LIST SCRIPT NAMES

REPLACE SCRIPT
RMAN

DELETE SCRIPT

Oracle Database 11g II 3-20

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Recovery
Manager
(RMAN)

2011Oracle

Oracle DBOracle
RMAN RMAN
RMAN

ARCHIVELOG

REDUNDANCY 1

BACKUP DATABASE PLUS ARCHIVELOG

(NOCATALOG) RMAN

ON

Oracle Database 11g II 3-21

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.


RESYNC CATALOG
RMAN

CATALOG START WITH

2011Oracle

Oracle

RESYNC CATALOG
RMAN

CATALOG START WITH...

Oracle Database 11g II 3-22

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

2011Oracle

1. Oracle
2.
3. 2
CREATE CATALOG

Oracle Database 11g II 3-23

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN
UPGRADE CATALOG
UPGRADE CATALOG;

DROP CATALOG
DROP CATALOG;

2011Oracle

RMAN UPGRADE
CATALOG

CREATE TYPE

UPGRADE RMAN
RMAN

RMAN

DROP CATALOG

RMAN
CATALOG CONNECT CATALOG

Oracle Database 11g II 3-24

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

1.
CONNECT CATALOG cat111/oracle@destdb;

2.
IMPORT CATALOG cat102/oracle@srcdb;

3.
IMPORT CATALOG cat92/oracle@catdb DBID=1423241, 1423242;

4.
RMAN

IMPORT CATALOG cat102/rman@srcdb;

IMPORT CATALOG cat101/rman@srcdb;


IMPORT CATALOG cat92/rman@srcdb NO UNREGISTER;

2011Oracle

IMPORT CATALOG
IMPORT CATALOG

IMPORT CATALOG <connectStringSpec>


[DBID = <dbid> [, <dbid>,]]
[DB_NAME=<dbname>[, <dbname,]]
[ NO UNREGISTER ];

<connectStringSpec>
RMAN RMAN
DBID ID ID
RMAN ID
RMAN

Oracle Database 11g II 3-25

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

IMPORT CATALOG

IMPORT CATALOG

NO UNREGISTER ID
NO UNREGISTER RMAN ID

1. RMAN cat111

RMAN
RMAN
2. cat102 srcdb RMAN RMAN

3. cat92 srcdb RMAN RMAN DBID


1423241 1423242
4. srcdb RMAN ID
destdb cat111 cat92

RMAN

Oracle Database 11g II 3-26

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

DB_NAME
RMAN

RMAN

(VPC)
2011Oracle

RMAN
RMAN RMAN
RECOVERY_CATALOG_OWNER
REGISTER

VPC

SQL*Plus
SELECT DISTINCT db_name FROM DBINC;

SYSDBA SYSOPER
RMAN

Oracle Database 11g II 3-27

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

1. RMAN
RMAN> CONNECT CATALOG catowner/oracle@catdb
RMAN> CREATE CATALOG;

2. RECOVERY_CATALOG_OWNER VPC
SQL> CONNECT SYS/oracle@catdb AS SYSDBA
SQL> GRANT RECOVERY_CATALOG_OWNER to vpcowner;

3a. REGISTER VPC


RMAN> CONNECT CATALOG catowner/oracle@catdb
RMAN> GRANT REGISTER DATABASE TO vpcowner;

3b. CATALOG FOR DATABASE VPC


RMAN>GRANT CATALOG FOR DATABASE db10g TO vpcowner;

2011Oracle

RMAN
RMAN
1.
2. DBA (VPC)
RECOVERY_CATALOG_OWNER
3. VPC
REGISTER GRANT CATALOG
GRANT CATALOG FOR DATABASE prod1, prod2 TO vpcowner;

GRANT REGISTER
GRANT REGISTER DATABASE TO vpcowner;

VPC VPC

Oracle Database 11g II 3-28

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

4a. 11g
RMAN> CONNECT CATALOG vpcowner/oracle@catdb
RMAN> CREATE VIRTUAL CATALOG;

4b. 11g
SQL> CONNECT vpcowner/oracle@catdb
SQL> exec catowner.dbms_rcvcat.create_virtual_catalog;

5.
RMAN> CONNECT TARGET / CATALOG vpcowner/oracle@catdb
RMAN> REGISTER DATABASE;

6.
RMAN> CONNECT TARGET / CATALOG vpcowner/oracle@catdb;
RMAN> BACKUP DATABASE;

2011Oracle

RMAN
4.
a. Oracle Database 11g RMAN 11g
RMAN
CREATE VIRTUAL CATALOG;

b. Oracle Database 10g 2


SQL*Plus
BASE_CATALOG_OWNER.DBMS_RCVCAT.CREATE_VIRTUAL_CATALOG;

5. VPC
6. RMAN
SYSDBA SYSOPER

Oracle Database 11g II 3-29

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN


1.
2.
3. IMPORT CATALOG

4.
5.
6.

2011Oracle

RMAN
1.
2. RMAN

3. IMPORT CATALOG
4.
5.
6.

Oracle Database 11g II 3-30

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

RMAN

RMAN
catdb catowner
prod1prod2 prod3

RMAN
RMAN
RMAN
RMAN

RMAN

Oracle Database 11g II 3-31

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

Oracle
1.

2. Oracle
3. EM
EM

2011Oracle

13

Oracle Database 11g II 3-32

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2.

2011Oracle

Oracle Database 11g II 3-33

Oracle University and (Oracle Corporation) use only.

RMAN
1.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

RMAN

2011Oracle

Oracle Database 11g II 3-34

Oracle University and (Oracle Corporation) use only.


dbca RCAT

RMAN
ORCL

RCAT

2011Oracle

Oracle Database 11g II 3-35

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

3 RMAN

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Oracle Enterprise Manager

2011Oracle

Oracle Database 11g II 4-2

Oracle University and (Oracle Corporation) use only.

RMAN

RMAN
CONFIGURE



BACKUPSET COPY







2011Oracle

RMAN
RMAN RMAN
RMAN
RMAN

RMAN
CONFIGURE RMAN
RMAN

SET RMAN

EM Oracle Enterprise Manager RMAN

Oracle Database 11g II 4-3

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

RMAN
SHOW ALL

V$RMAN_CONFIGURATION

2011Oracle

SHOW ALL SQL*Plus


V$RMAN_CONFIGURATION RMAN

SQL> select * from V$RMAN_CONFIGURATION


2 /
CONF# NAME
VALUE
------ ---------------------- -------------------------------1 CONTROLFILE AUTOBACKUP ON
2 CHANNEL
DEVICE TYPE 'SBT_TAPE' PARMS
'SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/tape)'

Oracle Database 11g II 4-4

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;

Oracle

2011Oracle

Oracle Enterprise Manager Database


Availability > Backup Settings >
RMAN

NOCATALOG RMAN

Oracle Enterprise Manager RMAN

CONFIGURE CONTROLFILE AUTOBACKUP ON;

RMAN

RMAN

Oracle
DDL
Oracle Database 11g II 4-5

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

IIIIIIIIII DBID

YYYYMMDD

QQ 00 FF

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE


type TO 'string' %F

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT


FOR DEVICE TYPE DISK TO '/u01/oradata/cf_ORCL_auto_%F';

RMAN RMAN

Oracle Database 11g II 4-6

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

%F RMAN

c-IIIIIIIIII-YYYYMMDD-QQ

RMAN> CONFIGURE DEVICE TYPE sbt PARALLELISM 3;

SHOW

RMAN> SHOW CONTROLFILE AUTOBACKUP FORMAT;


RMAN> SHOW EXCLUDE;
RMAN> SHOW ALL;

CONFIGURE CLEAR

RMAN> CONFIGURE BACKUP OPTIMIZATION CLEAR;


RMAN> CONFIGURE MAXSETSIZE CLEAR;
RMAN> CONFIGURE DEFAULT DEVICE TYPE CLEAR;

2011Oracle

RMAN
2
BACKUP

PARALLELISM
CONFIGURE DEVICE TYPE <device> PARALLELISM <n>

<n>
RMAN SHOW RMAN SHOW
ALL
CLEAR CONFIGURE CONFIGURE

Oracle Database 11g II 4-7

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Recovery
Manager

Oracle Secure
Backup
MML

2011Oracle

RMAN Oracle Secure Backup

Oracle DB Server (MML)

Oracle DB Server MML


Oracle Backup Solutions Program (BSP) Oracle MML
MML Oracle DB
Oracle BSP
RMAN RMAN

Oracle Database 11g II 4-8

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2. RMAN

3. Oracle DB
Oracle DB Server

Recovery Manager
run {
# Allocating a channel of type 'sbt' for serial device
ALLOCATE CHANNEL ch1 DEVICE TYPE sbt;
BACKUP DATAFILE 3;
}

Recovery Manager Oracle DB


Oracle DB

1. Oracle DB Server
2.
3. Oracle DB
4. Oracle DB Server

Oracle Database 11g II 4-9

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

1. RMAN

RMAN> CONFIGURE DEFAULT DEVICE TYPE TO DISK;

Oracle Secure Backup

RMAN> CONFIGURE DEFAULT DEVICE TYPE TO TAPE;



2011Oracle

(MML)

MML
MML
Oracle DB

FORMAT

Oracle Secure Backup Oracle Secure Backup Administrators


Guide
Oracle Database 11g II 4-10

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

CONFIGURE

RMAN>
RMAN>
RMAN>
RMAN>

CONFIGURE DEVICE TYPE sbt;


CONFIGURE DEFAULT DEVICE TYPE TO sbt;
CONFIGURE CHANNEL DEVICE TYPE sbt ...
BACKUP DATABASE;

RUN ALLOCATE CHANNEL

RMAN> RUN
{
ALLOCATE CHANNEL ch1 DEVICE TYPE DISK;
BACKUP DATABASE PLUS ARCHIVELOG;
}

2011Oracle

CONFIGURE RMAN RUN


BACKUP

RUN ALLOCATE CHANNEL BACKUP

Oracle Database 11g II 4-11

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.


CONFIGURE ... BACKUP COPIES

BACKUP...COPIES

HR_DATA

2011Oracle

RMAN
0tcm8u2s_1_1
0tcm8u2s_1_2
BACKUP...COPIES
CONFIGURE ... BACKUP COPIES DISK FORMAT
sbt
SBT API 2

(SBT) API (MML)


RMAN MML

BACKUP...COPIES
CONFIGURE ... BACKUP COPIES

Oracle Database 11g II 4-12

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN> CONFIGURE ARCHIVELOG BACKUP COPIES


2> FOR DEVICE TYPE sbt TO 2;
RMAN> CONFIGURE DATAFILE BACKUP COPIES
2> FOR DEVICE TYPE sbt TO 2;
RMAN> BACKUP DATABASE PLUS ARCHIVELOG;
RMAN> BACKUP DEVICE TYPE DISK AS COPY DATABASE;
COPIES

2011Oracle

CONFIGURE BACKUP COPIES


CONFIGURE ... BACKUP COPIES
BACKUP BACKUPSET

CONFIGURE BACKUP COPIES


1.
2. BACKUP
3. LIST BACKUP
BACKUP COPIES

Oracle Database 11g II 4-13

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

CONFIGURE BACKUP COPIES


RMAN> CONFIGURE BACKUP OPTIMIZATION ON;
BACKUP DATABASE ALL LIKE
BACKUP ARCHIVELOG BACKUP BACKUPSET ALL

FORCE

RMAN> BACKUP DEVICE TYPE sbt BACKUPSET ALL FORCE;

RECOVERY AREA
DB_RECOVERY_FILE_DEST RECOVERY FILES

2011Oracle

BACKUP

RMAN
RMAN RMAN

RMAN
Oracle Database Backup and Recovery Users Guide
Oracle Enterprise Manager Backup Settings
CONFIGURE BACKUP OPTIMIZATION ON

BACKUP RECOVERY AREA | DB_RECOVERY_FILE_DEST BACKUP RECOVERY


FILES

Oracle Database 11g II 4-14

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.


BACKUP FORCE

BACKUP DEVICE TYPE sbt BACKUPSET ALL FORCE;

Oracle Enterprise Manager


CONFIGURE BACKUP OPTIMIZATION OFF;

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

FORCE

Oracle Database 11g II 4-15

(HWM)

HWM

2011Oracle

RMAN
HWM

Oracle Secure Backup

Oracle Database 11g II 4-16

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

HIGHMEDIUMLOW BASIC

DBA

CONFIGURE COMPRESSION ALGORITHM 'HIGH/MEDIUM/LOW/BASIC'


run {
SET COMPRESSION ALGORITHM 'HIGH/MEDIUM/LOW/BASIC';
..
}

2011Oracle

HIGHMEDIUMLOW BASIC
BACKUP TYPE TO COMPRESSED

CPU

CPU

Oracle Database 11g II 4-17

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

LOW

CPU

MEDIUM

CPU

HIGH

CPU

BASIC

MEDIUM
CPU

MEDIUM HIGH

2011Oracle

RMAN
BASIC
Oracle

Oracle Corporation
CPU CPU

LOW MEDIUM CPU


LZO

MEDIUM CPU ZLIB

HIGH CPU GZIP

BASIC BZIP210g

Oracle Database 11g II 4-18

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

wallet

wallet

**********

2011Oracle

wallet

wallet

Oracle Database 11g

Oracle Database 11g II 4-19

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN
1. RMAN
SHOW ALL
2. SQL*Plus SHOW RMAN
CONFIGURATION
3. RMAN
SHOW ALL
4.
V$RMAN_CONFIGURATION

2011Oracle

14

Oracle Database 11g II 4-20

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN
1. FORCE

2. RMAN
3.

2011Oracle

13

Oracle Database 11g II 4-21

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Oracle Enterprise Manager

2011Oracle

Oracle Database 11g II 4-22

Oracle University and (Oracle Corporation) use only.

RMAN

2011Oracle

RMAN RMAN SPOOL LOG

RMAN> SPOOL LOG TO '/home/oracle/labs/my_lab_output.txt';

Oracle Database 11g II 4-23

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

Oracle University and (Oracle Corporation) use only.

RMAN

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

2011Oracle

Oracle Database 11g II 5-2

Oracle University and (Oracle Corporation) use only.

RMAN> BACKUP AS BACKUPSET


2> FORMAT '/BACKUP/df_%d_%s_%p.bus'
3> TABLESPACE hr_data;

HR_DATA

2011Oracle

RMAN RMAN

FORMAT
ALLOCATE CHANNEL CONFIGURE FORMAT

Oracle Database 11g II 5-3

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN> BACKUP AS COPY DATAFILE '/ORADATA/users_01_db01.dbf';


RMAN> BACKUP AS COPY ARCHIVELOG LIKE '/arch%';

3
3

2011Oracle

BACKUP AS
COPY RMAN BACKUP AS COPY

RMAN SWITCH
ALTER DATABASE RENAME FILE SQL
Oracle DB

NOCHECKSUM RMAN

BACKUP NOCHECKSUM Oracle Database Backup and


Recovery Reference
0
0
Oracle Database 11g II 5-4

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

/ORADATA/users01_db01.dbf

Oracle Database 11g II 5-5

RMAN> BACKUP DATABASE


PLUS ARCHIVELOG;

SPFILE

2011Oracle

(SPFILE) Recovery
Manager (RMAN)
RMAN BACKUP
DELETE INPUT RMAN

RMAN> BACKUP DATABASE PLUS ARCHIVELOG DELETE INPUT;

CONFIGURE
CONFIGURE DEFAULT DEVICE TYPE TO disk;
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COPY;
CONFIGURE CONTROLFILE AUTOBACKUP ON;

RMAN> BACKUP COPY OF DATABASE;

Oracle Database 11g II 5-6

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.


BACKUP AS COPY

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN BACKUP

CONFIGURE DEVICE TYPE DISK PARALLELISM n n

Oracle Database 11g II 5-7

0 0

1
0

2011Oracle

RMAN

RMAN

0 1
0
0 1
1
BACKUP INCREMENTAL
INCREMENTAL LEVEL [0 | 1]

Oracle Database 11g II 5-8

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

RMAN
RMAN

0
RMAN> BACKUP INCREMENTAL LEVEL 0 DATABASE;


RMAN> BACKUP INCREMENTAL LEVEL 1 DATABASE;


RMAN> BACKUP INCREMENTAL LEVEL 1 CUMULATIVE DATABASE;

FULL INCREMENTAL RMAN

RECOVER
RMAN

NOARCHIVELOG

ARCHIVELOG

Oracle Database 11g II 5-9

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

1 0

CTWR

SGA

1011001010110
0001110100101
1010101110011

2011Oracle

RMAN
RMAN

RMAN


RAC

10 MB 10 MB Oracle
DB
Oracle Database 11g II 5-10

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

ALTER DATABASE
{ENABLE|DISABLE} BLOCK CHANGE TRACKING
[USING FILE '...']

2011Oracle

Database Control Availability > Backup


Settings > Policy > > DB_CREATE_FILE_DEST

DB_CREATE_FILE_DEST Oracle Managed File (OMF)

ALTER DATABASE
ALTER
DATABASE RENAME MOUNT
ALTER DATABASE RENAME FILE

ALTER DATABASE RENAME FILE '...' TO '...';

RMAN

Oracle Database 11g II 5-11

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

SQL> SELECT filename, status, bytes


2 FROM
v$block_change_tracking;
SQL>
2
3
4
5
5
6
7
8

SELECT file#, avg(datafile_blocks),


avg(blocks_read),
avg(blocks_read/datafile_blocks)
* 100 AS PCT_READ_FOR_BACKUP,
avg(blocks)
FROM
v$backup_datafile
WHERE used_change_tracking = 'YES'
AND
incremental_level > 0
GROUP BY file#;

2011Oracle

V$BLOCK_CHANGE_TRACKING
(ENABLED/DISABLED)
V$BACKUP_DATAFILE
I/O PCT_READ_FOR_BACKUP RMAN

V$BACKUP_DATAFILE
FILE#
----1
2
3
4
5

BLOCKS_IN_FILE
-------------56320
3840
49920
640
19200

BLOCKS_READ PCT_READ_FOR_BACKUP BLOCKS_BACKED_UP


----------- ------------------- ---------------4480
7
462
2688
70
2408
16768
33
4457
64
10
1
256
1
91

Oracle Database 11g II 5-12

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Recovery
Manager

(SAN)

2011Oracle

RMAN BACKUP PROXY MML

BACKUP [AS BACKUPSET] PROXY [ONLY] DATABASE|TABLESPACE....

PROXY ONLY

Oracle

SAN LAN
LAN MML RMAN

Oracle Database 11g II 5-13

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN> BACKUP AS BACKUPSET DEVICE TYPE sbt


2> COPIES 2
3> INCREMENTAL LEVEL 0
4> DATABASE;

2011Oracle

BACKUP COPIES
COPIES BACKUP COPIES
DUPLEX
BACKUP COPIES
1. BACKUP COPIES
2. LIST BACKUP

Oracle Database 11g II 5-14

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

BACKUP COPIES

RMAN> BACKUP DEVICE TYPE DISK AS BACKUPSET


2> DATABASE PLUS ARCHIVELOG;
RMAN> BACKUP DEVICE TYPE sbt BACKUPSET ALL;

2011Oracle

RMAN BACKUP BACKUPSET RMAN


DISK
BACKUP BACKUPSET

Oracle Database 11g II 5-15

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

/
RMAN BACKUP SKIP READONLY

2011Oracle

/ BACKUP
SKIP READONLY RMAN

Oracle Database 11g II 5-16

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

2011Oracle

Oracle 128 TBRMAN


RMAN

256

RMAN Oracle Database 11g


COMPATIBLE 11.0

Oracle Database 11g II 5-17

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN
BACKUP <options> SECTION SIZE <integer> [K | M | G]
VALIDATE DATAFILE <options> SECTION SIZE <integer> [K | M | G]

RMAN> BACKUP DATAFILE 5 SECTION SIZE = 25M TAG 'section25mb';


backing up blocks 1 through 3200
piece handle=/u01/.../o1_mf_nnndf_SECTION25MB_382dryt4_.bkp
tag=SECTION25MB comment=NONE
...
backing up blocks 9601 through 12800
piece handle=/u01/.../o1_mf_nnndf_SECTION25MB_382dsto8_.bkp
tag=SECTION25MB comment=NONE

2011Oracle

RMAN
BACKUP VALIDATE DATAFILE
SECTION SIZE <integer> [K | M | G]

5 25 MB
100 MB

V$BACKUP_SET RC_BACKUP_SET MULTI_SECTION

V$BACKUP_DATAFILE RC_BACKUP_DATAFILE SECTION_SIZE

Oracle Database 11g II 5-18

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN


250
A

900
S

Q1

nnn

2011Oracle

RMAN
RMAN

KEEP
RESTORE POINT
RESTORE POINT
RMAN SPFILE

Oracle Database 11g II 5-19

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

DELETE
OBSOLETE

FORMAT

Oracle Database 11g II 5-20

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

SCN

2011Oracle

EM
Oracle Enterprise Manager
1. Availability > Schedule Backup > Schedule Customized Backup >
>
2. Schedule Customized Backup
Settings
3. Override Current SettingsPolicy
Override Retention Policy

Device
KEEP SPFILE

Oracle Database 11g II 5-21

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

EM

KEEP

KEEP {FOREVER | UNTIL TIME [=] ' date_string '}


NOKEEP
[RESTORE POINT rsname]

RMAN

LIST RESTORE POINT ALL;

LIST RESTORE POINT 'rsname';

2011Oracle

RMAN
RMAN
BACKUP ... KEEP {FOREVER|UNTIL TIME 'SYSDATE + <n>'} RESTORE POINT
<restore_point_name>

UNTIL TIME FOREVER

RESTORE POINT RESTORE


POINT SCN
SCN
UNTIL TIME

Oracle Database 11g II 5-22

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

RMAN> CONNECT TARGET /


RMAN> CONNECT CATALOG rman/rman@catdb
RMAN> CHANGE BACKUP TAG 'consistent_db_bkup'
2> KEEP FOREVER;

RMAN> CHANGE COPY OF DATABASE CONTROLFILE NOKEEP;

2011Oracle

CHANGE
CHANGE ... NOKEEP OBSOLETE

CHANGE

RESTORE POINT CHANGE

Oracle Database 11g II 5-23

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN> BACKUP RECOVERY AREA

RMAN> BACKUP RECOVERY FILES

2011Oracle

BACKUP RECOVERY AREA


BACKUP RECOVERY FILES
FRA

CONFIGURE
FORCE

DEVICE TYPE DISK


RMAN SPFILE

Oracle Database 11g II 5-24

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN
LIST

REPORT

REPORT NEED BACKUP

REPORT OBSOLETE

2011Oracle

RMAN LIST

RMAN AVAILABLE






RMAN REPORT RMAN
REPORT NEED BACKUP

Oracle Database 11g II 5-25

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Oracle Database Backup and Recovery Reference

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

REPORT OBSOLETE
REPORT OBSOLETE REPORT
OBSOLETE REDUNDANCY RECOVERY WINDOW

Oracle Database 11g II 5-26

V$BACKUP_SET

V$BACKUP_PIECE

V$DATAFILE_COPY

V$BACKUP_FILES

2011Oracle

V$
RC_
RC_BACKUP_SETRC_BACKUP_PIECE
RC_DATAFILE_COPY RC_BACKUP_FILES
RC_BACKUP_FILES
SQL> CALL DBMS_RCVMAN.SETDATABASE(null,null,null,<dbid>);

<dbid> ID

Oracle Database 11g II 5-27

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

Oracle Enterprise Manager


Backup Report

SearchResult
ResultsStart Time
Time TakenStatus
Backup NameResults

ResultsStatus
Summary of job
Backup NameBackup Report

Backup ReportResult
Input Summary
Output SummaryInputs and Outputs

Oracle Database 11g II 5-28

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Oracle Enterprise Manager

RMAN
CROSSCHECK
RMAN
DELETE EXPIRED
EXPIRED

DELETE OBSOLETE

2011Oracle

CROSSCHECK
CROSSCHECK RMAN
CROSSCHECK DISK sbt
AVAILABLE EXPIRED CROSSCHECK
EXPIRED
DELETE LIST CROSSCHECK
DELETE
DELETE OBSOLETE REPORT OBSOLETE
REDUNDANCY RECOVERY WINDOW
RMAN UNCATALOG
CROSSCHECK DELETE EXPIRED
Oracle Database Backup and Recovery Reference

Oracle Database 11g II 5-29

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2.

2011Oracle

Oracle Database 11g II 5-30

Oracle University and (Oracle Corporation) use only.

1.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2.

2011Oracle

Oracle Database 11g II 5-31

Oracle University and (Oracle Corporation) use only.

RMAN
1.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

2011Oracle

Oracle Database 11g II 5-32

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

Oracle Database 11g II 5-33

Oracle University and (Oracle Corporation) use only.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

Oracle Database 11g II 6-2

Oracle University and (Oracle Corporation) use only.

2011Oracle

Oracle Database 11g II 6-3

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

Oracle Database 11g II 6-4

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle


LGWR

Oracle Database 11g II 6-5

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.


SQL
SQL> select * from big_table order by
1,2,3,4,5,6,7,8,9,10,11,12,13;
select * from big_table order by
1,2,3,4,5,6,7,8,9,10,11,12,13
*
ERROR at line 1:
ORA-01565: error in identifying file
'/u01/app/oracle/oradata/orcl/temp01.dbf'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory

2011Oracle

(tempfile)
SQL
SQL

Oracle DB

Re-creating tempfile /u01/app/oracle/oradata/orcl/temp01.dbf

SQL> ALTER TABLESPACE temp ADD TEMPFILE


'/u01/app/oracle/oradata/orcl/temp02.dbf' SIZE 20M;
SQL> ALTER TABLESPACE temp DROP TEMPFILE
'/u01/app/oracle/oradata/orcl/temp01.dbf';

Oracle Database 11g II 6-6

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

CURRENTLGWR

ACTIVE

INACTIVE

2011Oracle

Oracle DB

CURRENT LGWR

ACTIVE

INACTIVE
CURRENT

Oracle Database 11g II 6-7

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

INACTIVE

ACTIVE

CKPT

2011Oracle

INACTIVE

ACTIVE

CURRENT
LGWR
RESETLOGS

Oracle Database 11g II 6-8

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

ALTER DATABASE CLEAR LOGFILE ...

ALTER DATABASE CLEAR UNARCHIVED LOGFILE ...

ALTER DATABASE CLEAR UNARCHIVED LOGFILE ... UNRECOVERABLE DATAFILE

2011Oracle

ALTER DATABASE CLEAR [UNARCHIVED] LOGFILE GROUP <n>


[UNRECOVERABLE DATAFILE]

SQL> SELECT GROUP#, STATUS, ARCHIVED FROM V$LOG;

3
SQL> ALTER DATABASE CLEAR LOFGILE GROUP 3;

UNARCHIVED

Oracle Database 11g II 6-9

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RECOVER

2011Oracle

1.
2.
3.
4.

Oracle Database 11g II 6-10

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.


PARALLEL

NOLOGGING

SQL> CREATE INDEX rname_idx


2 ON hr.regions (region_name)
3 PARALLEL 4;

2011Oracle

PARALLELNOPARALLEL

Oracle Server

ID

NOLOGGING
Direct Loader
(SQL*Loader)
ALTER INDEX NOLOGGING/LOGGING
NOLOGGING Data Guard
FORCE LOGGING

Oracle Database 11g II 6-11

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.


CONTENT=METADATA_ONLY SQL
SQLFILE=<filename>
Oracle Database 11g
IOracle Database Utilities

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Oracle Database 11g II 6-12

OS

OS

2011Oracle

SYSDBA SYSOPER

SYSDBA SYSOPER

OSDBA
SYSDBA OSOPER SYSOPER

OSDBA OSOPER
SYSDBA SYSOPER
/

Oracle Database 11g II 6-13

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

SQL> grant sysdba to admin2;


grant sysdba to admin2
*
ERROR at line 1:
ORA-01994: GRANT failed: password file missing or disabled

1. orapwd
$ orapwd file=$ORACLE_HOME/dbs/orapworcl password=ora entries=5

2.

2011Oracle

Oracle DB orapwd SYSDBA


SYS SYSOPER
PUBLIC GRANT

REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE SHARED

IGNORECASE=Y

Oracle Database 11g II 6-14

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

orapwd file=filename password=password entries=max_users

- filename
-

password SYS password

entries SYSDBA SYSOPER


(=)

orapwd file=$ORACLE_HOME/dbs/orapwU15
password=admin entries=5
2. 1
SQL> CONNECT sys/admin AS SYSDBA
SQL> grant sysdba to admin2;

UNIX$ORACLE_HOME/dbs
Windows%ORACLE_HOME%\database

Oracle Database 11g II 6-15

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

1. orapwd

2011Oracle

Oracle Database 11g II 6-16

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

1.
2.

3.
4.
5.

Oracle Database 11g II 6-17

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

(PIT)

6
PIT

2011Oracle

1.
OS RMAN RESTORE
2. RECOVER

3.

4. ALTER DATABASE OPEN

Oracle Database 11g II 6-18

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.


5.

SCN

RESETLOGS

Oracle Database 11g II 6-19

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

6.

2011Oracle

/
1.
2.
3.
1

Oracle Database 11g II 6-20

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

SQL> CREATE TABLE sales_copy NOLOGGING;


SQL> INSERT /*+ APPEND */ INTO sales_copy
2 SELECT * FROM sales_history;

2011Oracle

NOLOGGING
NOLOGGING NOLOGGING

SALES_COPY NOLOGGING APPEND


SALES_HISTORY

NOLOGGING
NOLOGGING
REPORT UNRECOVERABLE RMAN
NOLOGGING

Oracle Database 11g II 6-21

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

NOLOGGING

OPEN RESETLOGS

OPEN RESETLOGS

OPEN
RESETLOGS

OPEN RESETLOGS

2011Oracle

RESETLOGS

RESETLOGS

RESETLOGS

Oracle Database 11g II 6-22

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

SHUTDOWN ABORT
STARTUP MOUNT
RESETLOGS

2011Oracle

% cp /backup/control01.dbf /disk1/oradata/trgt/control01.dbf
% cp /backup/control02.dbf /disk2/oradata/trgt/control02.dbf

SQL> RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL;

RESETLOGS

Oracle Database 11g II 6-23

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN RECOVER
1. NOARCHIVELOG
2. ARCHIVELOG
3. NOARCHIVELOG
4. ARCHIVELOG

2011Oracle

234

Oracle Database 11g II 6-24

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

DBA

1. RMAN
2.
3. Oracle Enterprise Manager
4.
5. SYSOPERSYSDBA SYSASM

2011Oracle

Oracle Database 11g II 6-25

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

Oracle Database 11g II 6-26

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

Oracle University and (Oracle Corporation) use only.

RMAN

RMAN

2011Oracle

Oracle Database Backup and Recovery Users Guide

Oracle Database 11g II 7-2

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RESTORE

RECOVER

RMAN> SQL 'ALTER TABLESPACE inv_tbs OFFLINE IMMEDIATE';


RMAN> RESTORE TABLESPACE inv_tbs;
RMAN> RECOVER TABLESPACE inv_tbs;
RMAN> SQL 'ALTER TABLESPACE inv_tbs ONLINE';

Oracle Enterprise Manager


RMAN

2011Oracle

RMAN RESTORE RECOVER

SCN SCN
RESTORE {DATABASE | TABLESPACE name [,name]... | DATAFILE name
[,name] }...
RESTORE
RMAN

RECOVER {DATABASE | TABLESPACE name [,name]... | DATAFILE name


[,name] }...
RECOVER

Oracle Enterprise Manager


AvailabilityBackup/Recovery/
Perform Recovery
Oracle Database 11g II 7-3

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN RESTORE RECOVER

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN RESTORE RECOVER

Oracle Database 11g II 7-4

SYSTEM
UNDO

2011Oracle

ARCHIVELOG
ARCHIVELOG SYSTEM UNDO

Oracle Enterprise Manager


1. AvailabilityPerform Recovery
2. DatafilesRecovery Scope
Restore datafilesOperation Type
3.
4.
5.
6. RMAN
ARCHIVELOG

Oracle Database 11g II 7-5

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

ARCHIVELOG

SYSTEM
UNDO SYSAUX
1.
SHUTDOWN ABORT
2.
3.
4.

2011Oracle

ARCHIVELOG
SYSTEM UNDO
Oracle Enterprise Manager SYSAUX
MOUNT

1.
2.
3. MaintenancePerform Recovery
4. DatafilesRestore to current time

5.
6.
7. RMAN
8.

Oracle Database 11g II 7-6

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

ARCHIVELOG

RMAN

SCN

RMAN> RECOVER COPY OF


2> DATAFILE {n|'file_name'}

2011Oracle

RMAN RMAN

SCN RMAN
SCN

RMAN
RMAN RMAN
RMAN

Oracle Database 11g II 7-7

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.


RMAN> recover copy of database with tag 'daily_inc';
RMAN> backup incremental level 1 for recover of copy
2> with tag 'daily_inc' database;

RECOVER

BACKUP

2011Oracle

1 RECOVER BACKUP

2 RECOVER 1
BACKUP
3 RECOVER BACKUP
4

Oracle Database 11g II 7-8

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

1.
2. SWITCH TO ...
COPY

5.

3.

6.
7. SWITCH TO ...
COPY

4.

8.

9.

SQL> SWITCH DATAFILE 'filename' TO COPY;

2011Oracle

1.
2. SWITCH TO ... COPY
3.
4.

5. BACKUP AS COPY
6.
7. SWITCH TO COPY 5
8.
9.

Oracle Database 11g II 7-9

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

SET NEWNAME
RUN SET NEWNAME

RUN
{ ALLOCATE CHANNEL dev1 DEVICE TYPE DISK;
ALLOCATE CHANNEL dev2 DEVICE TYPE sbt;
SQL "ALTER TABLESPACE users OFFLINE IMMEDIATE";
SET NEWNAME FOR DATAFILE '/disk1/oradata/prod/users01.dbf'
TO '/disk2/users01.dbf';
RESTORE TABLESPACE users;
SWITCH DATAFILE ALL;
RECOVER TABLESPACE users;
SQL "ALTER TABLESPACE users ONLINE";
}

RUN DUPLICATERESTORE
SWITCH
2011Oracle

SET NEWNAME
SET NEWNAME RUN
SET NEWNAME
RESTORE users01.dbf /disk2/users01.dbf
SWITCH

SET NEWNAME
Oracle Database 11gR2 (11.2)

SET NEWNAME
1. SET NEWNAME FOR DATAFILE SET NEWNAME FOR TEMPFILE
2. SET NEWNAME FOR TABLESPACE
3. SET NEWNAME FOR DATABASE

Oracle Database 11g II 7-10

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

%b

**

%f

%I

DBID

%N

%U

data-D-%d_id-%I_TS-%N_FNO-%f

RUN
{ SET NEWNAME FOR DATAFILE 1 TO '/oradata1/system01.dbf';
SET NEWNAME FOR DATAFILE 2 TO '/oradata2/sysaux01.dbf';
SET NEWNAME FOR DATAFILE 3 TO '/oradata3/undotbs01.dbf';
SET NEWNAME FOR DATAFILE 4 TO '/oradata4/users01.dbf';
SET NEWNAME FOR TABLESPACE example TO '/oradata5/%b';
DUPLICATE TARGET DATABASE TO dupldb; }

2011Oracle

SET NEWNAME
SET NEWNAME
%b%f %U%I %N
SET NEWNAME FOR TABLESPACE SET NEWNAME

Oracle Database 11g II 7-11

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

SET NEWNAME

NOARCHIVELOG

2011Oracle

NOARCHIVELOG
NOARCHIVELOG

NOARCHIVELOG

RESTORE RECOVER Oracle Enterprise


Manager
1.
2. MaintenancePerform Recovery
3. Whole Database

Oracle Database 11g II 7-12

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

NOARCHIVELOG

SQL> CREATE RESTORE POINT before_mods;

SQL> CREATE RESTORE POINT end_q1 AS OF SCN 100;

2011Oracle

SCN

BEFORE_MODS
SCN 100

CONTROL_FILE_RECORD_KEEP_TIME
PRESERVE

V$RESTORE_POINT SCN

Oracle Database 11g II 7-13

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.


1. SCN
2. NLS
3.
4. SET UNTILRESTORE RECOVER
RUN
5. READONLY

6. RESETLOGS

2011Oracle

ARCHIVELOG
1. SCN
3:00 2:59

2. (NLS) RMAN

$ export NLS_LANG = american_america.us7ascii


$ export NLS_DATE_FORMAT = "yyyy-mm-dd:hh24:mi:ss"

3.
RMAN> shutdown immediate
RMAN> startup mount

Oracle Database 11g II 7-14

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RUN
{
SET UNTIL TIME '2007-08-14:21:59:00';
RESTORE DATABASE;
RECOVER DATABASE;
}

5. / READ
ONLY
RMAN> SQL 'ALTER DATABASE OPEN READ ONLY';

6. RESETLOGS
RMAN> ALTER DATABASE OPEN RESETLOGS;

Oracle Database 11g II 7-15

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

4. RUN RECOVER RESTORE RUN


UNTIL SCN
RESTORE SCN
RUN

RECOVER
RESETLOGS

2011Oracle

RMAN
RMAN

Oracle Database 11g II 7-16

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

FROM MEMORY

SQL> CREATE PFILE [= 'pfile_name' ]


FROM { { SPFILE [= 'spfile_name'] } | MEMORY } ;

SQL> CREATE SPFILE [= 'spfile_name' ]


FROM { { PFILE [= 'pfile_name' ] } | MEMORY } ;

2011Oracle

FROM MEMORY
(PFILE) (SPFILE)
RAC
alert.log Oracle Database 11g
alert.log
PFILEPFILE SPFILE
alert.log PFILE
COMPATIBLE 11.0.0.0

Oracle Database 11g II 7-17

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN> STARTUP FORCE NOMOUNT;


RMAN> RESTORE SPFILE FROM AUTOBACKUP;
RMAN> STARTUP FORCE;
Recovery
Manager
(RMAN)

2011Oracle

FROM MEMORY

DBID RESTORE SPFILE FROM AUTOBACKUP


SPFILE
RESTORE SPFILE TO <file_name> FROM AUTOBACKUP

RMAN> run {
2> restore spfile from autobackup
3> recovery area = '<flash recovery area destination>'
4> db_name = '<db_name>';
5> }

Oracle Database 11g II 7-18

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Recovery
Manager
(RMAN)

RMAN>
RMAN>
RMAN>
RMAN>
RMAN>

STARTUP NOMOUNT;
RESTORE CONTROLFILE FROM AUTOBACKUP;
ALTER DATABASE MOUNT;
RECOVER DATABASE;
ALTER DATABASE OPEN RESETLOGS;

2011Oracle

RMAN

NOMOUNT

RESETLOGS

Oracle Database 11g II 7-19

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN>
RMAN>
RMAN>
RMAN>

SHUTDOWN ABORT;
STARTUP NOMOUNT;
SET DBID 1090770270;
RESTORE CONTROLFILE FROM AUTOBACKUP;

RMAN RMAN
CONTROL_FILES
DBID
RESTORE CONTROLFILE
RMAN> RESTORE CONTROLFILE;

NOMOUNT RMAN
CONTROL_FILES
RESTORE CONTROLFILE ... TO <destination>

SPFILE
DBID RESTORE SPFILE FROM
AUTOBACKUP
RMAN

RESETLOGS

Oracle Database 11g II 7-20

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

NOMOUNT
RESTORE CONTROLFILE FROM AUTOBACKUP
(DBID)

NOARCHIVELOG

STARTUP FORCE NOMOUNT;


RESTORE CONTROLFILE;
ALTER DATABASE MOUNT;
RESTORE DATABASE;
RECOVER DATABASE NOREDO;
ALTER DATABASE OPEN RESETLOGS;

2011Oracle

NOARCHIVELOG
NOARCHIVELOG

RMAN 0 1
RECOVER DATABASE
NOREDO NOREDO RMAN
RMAN

NOREDO RECOVER DATABASE

Oracle Database 11g II 7-21

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

NOARCHIVELOG

RMAN>

2011Oracle

(DBID) DBID

RMAN
RMAN
DUPLICATE DBID
DUPLICATE
RMAN

Oracle Database 11g II 7-22

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

(DBID)

2011Oracle

RMAN
RMAN

Oracle Database 11g II 7-23

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.


1. ORACLE_SID
2. RMAN NOCATALOG
3. (DBID)
4. NOMOUNT
5.
6.
7.
8. NOMOUNT

2011Oracle

1. ORACLE_SID
$ setenv ORACLE_SID orcl

2. RMAN
$ rman TARGET /

3. (DBID) V$DATABASE DBID


DBID
RMAN> SET DBID 1090770270;

4. NOMOUNT
RMAN> STARTUP NOMOUNT

RMAN

startup failed: ORA-01078: failure in processing system


parameters

5.
RESTORE SPFILE TO PFILE '?/oradata/test/initorcl.ora' FROM
AUTOBACKUP;

Oracle Database 11g II 7-24

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.


6.
7. _DEST

8. NOMOUNT
RMAN> STARTUP NOMOUNT
> PFILE='?/oradata/test/initorcl.ora';

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

SHUTDOWN IMMEDIATE;

Oracle Database 11g II 7-25

9. RUN

10. RMAN
11. RMAN
12. RESETLOGS

2011Oracle

9. RUN
RUN
{
RESTORE CONTROLFILE FROM AUTOBACKUP;
ALTER DATABASE MOUNT;
}

10. V$DATAFILE
RMAN
a. SET
NEWNAME
b. SQL ALTER DATABASE RENAME FILE

c. SET UNTIL
d. SWITCH

Oracle Database 11g II 7-26

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.


RUN
{
SET NEWNAME FOR DATAFILE 1 TO '?/oradata/test/system01.dbf';
SET NEWNAME FOR DATAFILE 2 TO '?/oradata/test/undotbs01.dbf';
SET NEWNAME FOR DATAFILE 3 TO '?/oradata/test/sysaux.dbf';
SET NEWNAME FOR DATAFILE 4 TO '?/oradata/test/users01.dbf';
SET NEWNAME FOR DATAFILE 5 TO '?/oradata/test/example01.dbf';
SQL "ALTER DATABASE RENAME FILE
''/u01/app/oracle/oradata/orcl/redo01.log''
TO ''?/oradata/test/redo01.log'' ";
SQL "ALTER DATABASE RENAME FILE
''/u01/app/oracle/oradata/orcl/redo02.log''
TO ''?/oradata/test/redo02.log'' ";
SQL "ALTER DATABASE RENAME FILE
''/u01/app/oracle/oradata/orcl/redo03.log''
TO ''?/oradata/test/redo03.log'' ";
SET UNTIL SCN 4545727;
RESTORE DATABASE;
SWITCH DATAFILE ALL;
RECOVER DATABASE;
}

11.
12. RESETLOGS
RMAN> ALTER DATABASE OPEN RESETLOGS;

Oracle Database 11g II 7-27

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle




Oracle Data Guard Oracle Data Guard
Concepts and Administration

Oracle Database 11g II 7-28

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RESETLOGS

2011Oracle

Oracle Database 11g II 7-29

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.


RECOVER
1.
2.
3. RMAN

2011Oracle

Oracle Database 11g II 7-30

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

1.

2.

2011Oracle

Oracle Database 11g II 7-31

Oracle University and (Oracle Corporation) use only.

RESTORE

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

Oracle Database 11g II 7-32

Oracle University and (Oracle Corporation) use only.

RMAN

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

Oracle Database 11g II 7-33

Oracle University and (Oracle Corporation) use only.

7 RMAN

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

Oracle University and (Oracle Corporation) use only.

RMAN

RMAN

I/O RMAN

RMAN

RMAN MAXPIECESIZE
FILESPERSETMAXOPENFILES

RMAN BACKUP DURATION

2011Oracle

Oracle Database 11g II 8-2

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

MML

MML

MML

2011Oracle

CONFIGURE PARALLELISM 1
RMAN

RMAN> RUN {
2>
ALLOCATE CHANNEL c1 DEVICE TYPE sbt;
3>
ALLOCATE CHANNEL c2 DEVICE TYPE sbt;
4>
ALLOCATE CHANNEL c3 DEVICE TYPE sbt;
5>
BACKUP
6>
INCREMENTAL LEVEL = 0
7>
(DATAFILE 1,4,5 CHANNEL c1)
8>
(DATAFILE 2,3,9 CHANNEL c2)
9>
(DATAFILE 6,7,8 CHANNEL c3);
10>
SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT';
11> }

BACKUP DEVICE TYPE sbt DATAFILE '/home/oracle/system01.dbf';


BACKUP DEVICE TYPE sbt DATAFILE 1;

Oracle Database 11g II 8-3

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

PARALLELISM 1

1 9

- 14 5 1
- 23 9 2
- 67 8 3
FILESPERSET

Oracle Database 11g II 8-4

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

SQL>
SQL>
SQL>
SQL>
2
3
4

V$SESSION V$PROCESS
RMAN
SET COMMAND ID

COLUMN CLIENT_INFO FORMAT a30


COLUMN SID FORMAT 999
COLUMN SPID FORMAT 9999
SELECT s.sid, p.spid, s.client_info
FROM v$process p, v$session s
WHERE p.addr = s.paddr
AND CLIENT_INFO LIKE 'rman%';

2011Oracle

RMAN
RMAN V$SESSION
V$PROCESSV$PROCESS SPID ID UNIX
SPID ID Windows SPID ID
RMAN RMAN
RMAN
SQL>
SQL>
SQL>
SQL>
2
3
4
SID
---15
13

COLUMN CLIENT_INFO FORMAT a30


COLUMN SID FORMAT 999
COLUMN SPID FORMAT 9999
SELECT s.sid, p.spid, s.client_info
FROM v$process p, v$session s
WHERE p.addr = s.paddr
AND CLIENT_INFO LIKE 'rman%';
SPID
CLIENT_INFO
------------ -----------------------------2714
rman channel=ORA_SBT_TAPE_1
2715
rman channel=ORA_SBT_TAPE_2

Oracle Database 11g II 8-5

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

RMAN
RMAN SET COMMAND ID

RUN
{
SET COMMAND ID TO 'sess1';
BACKUP DATABASE;
}

2 ID sess2
RUN
{
SET COMMAND ID TO 'sess2';
BACKUP DATABASE;
}

2. SQL*Plus RMAN V$SESSION


V$PROCESS
SELECT SID, SPID, CLIENT_INFO
FROM V$PROCESS p, V$SESSION s
WHERE p.ADDR = s.PADDR
AND CLIENT_INFO LIKE '%id=sess%';

RMAN SET COMMAND ID CLIENT_INFO

id=command_id,rman channel=channel_id

SID
---11
15
14
9

SPID
-----------8358
8638
8374
8642

CLIENT_INFO
-----------------------------id=sess1
id=sess2
id=sess1,rman channel=c1
id=sess2,rman channel=c1

Oracle Database 11g II 8-6

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

1. ID 1

V$SESSION_LONGOPS

SQL>
2
3
4
5
6
7

SELECT OPNAME, CONTEXT, SOFAR, TOTALWORK,


ROUND(SOFAR/TOTALWORK*100,2) "%_COMPLETE"
FROM V$SESSION_LONGOPS
WHERE OPNAME LIKE 'RMAN%'
AND OPNAME NOT LIKE '%aggregate%'
AND TOTALWORK != 0
AND SOFAR <> TOTALWORK;

SID SERIAL# CONTEXT


SOFAR TOTALWORK %_COMPLETE
--- ------- ------- ------- --------- ---------13
75
1
9470
15360
61.65
12
81
1
15871
28160
56.36

2011Oracle

RMAN
V$SESSION_LONGOPS RMAN
V$SESSION_LONGOPS
RMAN

STATISTICS_LEVEL TYPICAL ALL


V$SESSION_LONGOPS
V$SESSION_LONGOPS RMAN
OPNAME RMAN:datafile copy
RMAN:full datafile backup RMAN:full datafile restore
CONTEXT 2
1
SOFAR

Oracle Database 11g II 8-7

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN
TOTALWORK
0 RMAN

Oracle Database 11g II 8-8

RMAN

RMAN

RMAN

Oracle Server
sbtio.log

2011Oracle

RMAN
RMAN RMAN RMAN
RMAN RMAN-nnnn
LOG shell
RMAN DEBUG TRACE

RMAN
Oracle Oracle Server ORA-600 ORA-3113
ORA-7445 RMAN
USER_DUMP_DEST
sbtio.log
USER_DUMP_DEST Oracle Server RMAN

Oracle Database 11g II 8-9

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

DEBUG
PL/SQL
RMAN

DEBUG RMAN run

DEBUG

$ rman target / catalog rman/rman debug trace trace.log

2011Oracle

DEBUG
DEBUG RMAN SQL
PL/SQL 3
DEBUG 4
RMAN> run {
debug on;
allocate channel c1 type disk;
backup datafile 3;
debug off;
backup datafile 4; }

DEBUG
0.5
$ rman target / catalog rman/rman debug trace sample.log
RMAN> backup database;
RMAN> host "ls l sample.log";
-rw-r--r-1 user02
dba
576270 Apr 6 10:38 sample.log
host command complete

Oracle Database 11g II 8-10

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

DEBUG

Additional information

RMAN-03009

RMAN-00571:
RMAN-00569:
RMAN-00571:
RMAN-03009:

===========================================
======= ERROR MESSAGE STACK FOLLOWS =======
===========================================
failure of backup command on c1 channel at
09/04/2001 13:18:19
ORA-19506: failed to create sequential file,
name="07d36ecp_1_1", parms=""
ORA-27007: failed to open file
SVR4 Error: 2: No such file or directory
Additional information: 7005
Additional information: 1
ORA-19511: Error from media manager layer,error text:

2011Oracle

RMAN
RMAN RMAN

Additional information

RMAN

RMAN-03002 RMAN-03009 RMAN-03009


RMAN-03002 ID RMAN
RMAN-00558

Oracle Database 11g II 8-11

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

RMAN BACKUP RESTORE



RMAN

2011Oracle

RMAN
RMAN


RMAN RMAN
RMAN /
(I/O)RMAN I/O
RMAN
RMAN I/O
I/O
I/O (SIO) I/O (AIO)
RMAN I/O I/O

Oracle Database 11g II 8-12

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

<= 4

1 MB
16 MB

4 < <= 8

512 KB 16 MB

> 8

RMAN 128 KB

512 KB

1 MB
2011Oracle

RMAN
RMAN I/O RMAN RMAN
RMAN
BACKUP FILESPERSET
CONFIGURE CHANNEL ALLOCATE CHANNEL MAXOPENFILES
RMAN
FILESPERSET 3
MAXOPENFILES 8 2FILESPERSET
2MAXOPENFILES
RMAN

1 MB
DBWR_IO_SLAVES PGA
FILESPERSET 8

Oracle Database 11g II 8-13

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

1 MB
1 MB

1 MB
1 MB

1 MB
1 MB

1 MB
1 MB

1 MB
1 MB

1 MB
1 MB

1 MB
1 MB

1 MB
1 MB

FILESPERSET = 4
MAXOPENFILES = 4

2011Oracle

MAXOPENFILES 4
FILESPERSET 4 4
4 MB

4 MB 1 4 = 16 MB
MAXOPENFILES

Oracle Database 11g II 8-14

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

SGABACKUP_TAPE_IO_SLAVES
TRUE

PGA BACKUP_TAPE_IO_SLAVES FALSE

256 KB 256 KB
256 KB 256 KB

2011Oracle

Oracle Server
Oracle Server (SBT)
256 KB

256 KB

256 KB 4 1 = 1,024 KB
RMAN (SGA) (PGA)
I/O BACKUP_TAPE_IO_SLAVES TRUE
LARGE_POOL_SIZE RMAN
FALSERMAN PGA I/O
LARGE_POOL_SIZE SGA
RMAN I/O
Oracle BACKUP_TAPE_IO_SLAVES TRUE
RMAN

Oracle Database 11g II 8-15

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

I/O
1

0100100
0100100

2011Oracle

I/O I/O
RMAN I/O I/O
I/O I/O
I/O I/O I/O
I/O BACKUP_TAPE_IO_SLAVES
TRUE I/O I/O
I/O
1.
2. Oracle

3.
4.

Oracle Database 11g II 8-16

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

I/O I/O

I/O
1

0100100
0100100

0100100

2011Oracle

I/O I/O
I/OOracle
BACKUP_TAPE_IO_SLAVES TRUE
I/O Oracle I/O I/O
DBWR_IO_SLAVES I/O
Oracle DBWR_IO_SLAVES I/O
I/O

1.
2.

3.

Oracle Database 11g II 8-17

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

I/O I/O

V$BACKUP_SYNC_IO
V$BACKUP_ASYNC_IO

I/O

2011Oracle

RMAN

I/O BACKUP_DISK_IO_SLAVES TRUE


I/O V$BACKUP_ASYNC_IO

Oracle Database 11g II 8-18

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

V$BACKUP_ASYNC_IO I/O

LONG_WAITS IO_COUNT

IO_COUNT I/O
LONG_WAITS/
I/O

SHORT_WAIT_TIME_TOTAL
LONG_WAIT_TIME_TOTAL

2011Oracle

I/O
V$BACKUP_ASYNC_IO I/OLONG_WAITS
I/O SHORT_WAITS /
I/O I/O
I/O I/O
V$BACKUP_ASYNC_IO LONG_WAITS
IO_COUNT

Oracle Database 11g II 8-19

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

I/O

I/O
V$BACKUP_SYNC_IO
DISCRETE_BYTES_PER_SECOND I/O

2011Oracle

I/O
I/O I/O
Oracle I/O I/O
I/O I/O
V$BACKUP_SYNC_IO
V$BACKUP_SYNC_IO I/O

Oracle Database 11g II 8-20

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

I/O

CONFIGURE CHANNEL ALLOCATE CHANNEL

RMAN

I/O

SBT

2011Oracle

CONFIGURE CHANNEL ALLOCATE CHANNEL

MAXPIECESIZE RMAN
RMAN
RATE RMAN RMAN
(OLTP)
3 MB RATE=1500K
MAXOPENFILES
8RMAN MAXOPENFILES
RMAN

Oracle Database 11g II 8-21

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.


SBT

ALLOCATE CHANNEL c1 DEVICE TYPE sbt;


ALLOCATE CHANNEL c2 DEVICE TYPE sbt;
ALLOCATE CHANNEL c3 DEVICE TYPE sbt;
BACKUP (DATAFILE 1,2,5 CHANNEL c1)
(DATAFILE 4,6 CHANNEL c2)
(DATAFILE 3,7,8 CHANNEL c3);
BACKUP DATABASE NOT BACKED UP;
}

Oracle Database 11g II 8-22

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RUN
{

MAXPIECESIZE

FILESPERSET RMAN

MAXOPENFILES

BACKUP DURATION

2011Oracle

BACKUP
MAXPIECESIZE
FILESPERSET
RMAN 50
FILESPERSET=5 10

MAXOPENFILES ASM 1
2
ASM
MAXOPENFILES
BACKUP BACKUP DURATION

MINIMIZE TIME
MINIMIZE LOAD

Oracle Database 11g II 8-23

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

BACKUP

RMAN
1. RATE
2. I/O DBWR_IO_SLAVES
3. LARGE_POOL_SIZE
4. RMAN
5. V$

2011Oracle

RMAN

1. RATE RATE RMAN


(K) (M)
(G) RMAN
ALLOCATE CHANNEL
CONFIGURE CHANNEL RATE
2. I/O DBWR_IO_SLAVES I/O
DBWR_IO_SLAVES DBWR_IO_SLAVES
I/O
I/O I/O SGA I/O

DBWR_IO_SLAVES
PROCESSES
3. LARGE_POOL_SIZE
4. RMAN
5. V$
Oracle Database 11g II 8-24

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

LARGE_POOL_SIZEOracle Server

LARGE_POOL_SIZE

Oracle Server
I/O

ksfqxcre: failure to allocate shared memory means sync


I/O will be used whenever async I/O to file not
supported natively

2011Oracle

LARGE_POOL_SIZE
5 KB

Oracle

LARGE_POOL_SIZE V$SGASTAT.POOL
LARGE_POOL_SIZE

#_of_allocated_channels * (16 MB + (4*size_of_tape_buffer ))

0 LARGE_POOL_SIZE 16 MB
RMAN BLKSIZE
256 KB 256 KB
LARGE_POOL_SIZE 18 MB BLKSIZE 512 KB
LARGE_POOL_SIZE 20 MB
DBWR_IO_SLAVES > 0
BACKUP_TAPE_IO_SLAVES = TRUE

Oracle Database 11g II 8-25

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

LARGE_POOL_SIZE

BACKUP... VALIDATE
I/O

2011Oracle

RMAN
RMAN
BACKUP... VALIDATE I/O
BACKUP VALIDATE
BACKUP VALIDATE
I/O BACKUP VALIDATE

RMAN

RMAN
RMAN
RMAN

RMAN

Oracle Database 11g II 8-26

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

RMAN

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Oracle Database 11g II 8-27

RMAN
1. CONFIGURE PARALLELISM
1

2.
3.

2011Oracle

Oracle Database 11g II 8-28

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2.

2011Oracle

Oracle Database 11g II 8-29

Oracle University and (Oracle Corporation) use only.

RMAN
1.

RMAN

I/O RMAN

RMAN

RMAN MAXPIECESIZE
FILESPERSETMAXOPENFILES

RMAN BACKUP DURATION

2011Oracle

Oracle Database 11g II 8-30

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

EM RMAN

2011Oracle

Oracle Database 11g II 8-31

Oracle University and (Oracle Corporation) use only.

8 RMAN

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

Oracle Database 11g II 9-2

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

ADR

EM GUI

RMAN


RAC

2011Oracle

Oracle

Oracle Database 11g II 9-3

Oracle University and (Oracle Corporation) use only.

>

Availability > Perform Recover> Advise and


Recover
Support WorkbenchProblemsActive
IncidentsChecker Findings
> Launch Recovery Advisor
Database Instance Health>
Incidents ORA 1578 >Support Workbench
Problems Detail > Data Recovery Advisor
Database Instance Health>Related Links
Support Workbench>Checker Findings
Launch Recovery Advisor
Related LinksAdvisor Central>Advisors
Data Recovery Advisor
Related LinksAdvisor Central>Checkers
Details>Run DetailLaunch
Recovery Advisor
RMAN
rman target / nocatalog
rman> list failure all;

Oracle Real Application Clusters


(RAC)

Oracle Database 11g II 9-4

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Oracle Enterprise Manager (EM) Database Control Grid Control


Database Instance


1.

2.
3.

4.
5.

DBA

2011Oracle

Oracle Database 11g

1.
(ADR)
2.

3.

4.
5. Oracle
VALIDATE

Oracle Database 11g II 9-5

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

VALIDATE DATABASE
Oracle Enterprise Manager
Availability> Perform RecoveryPerform Recovery

Oracle Database 11g II 9-6

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

I/O
I/O

2011Oracle

Oracle Database 11g II 9-7

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

LIST FAILURE

ADVISE FAILURE

REPAIR FAILURE

RMAN ADVISE

CHANGE FAILURE

2011Oracle

RMAN
LIST FAILURE

ADVISE FAILURE
ADR
CRITICAL HIGH
REPAIR FAILURE RMAN ADVISE FAILURE
ADVISE FAILURE
REPAIR FAILURE ADVISE FAILURE

CHANGE FAILURE HIGH


LOW

Oracle Database 11g II 9-8

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN

RMAN LIST FAILURE

LIST FAILURE
[ ALL | CRITICAL | HIGH | LOW | CLOSED |
failnum[,failnum,] ]
[ EXCLUDE FAILURE failnum[,failnum,] ]
[ DETAIL ]

2011Oracle

RMAN LIST FAILURE


STARTED MOUNTED LIST FAILURE
LIST FAILURE

LIST
FAILURE
failnum
ALL
CRITICAL CRITICAL OPEN

HIGH HIGH OPEN

LOW LOW OPEN

Oracle Database 11g II 9-9

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.


CLOSED
DETAIL
DETAIL
Oracle Database Backup and Recovery Reference

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

EXCLUDE FAILURE

Oracle Database 11g II 9-10

RMAN ADVISE FAILURE

ADR

. . .
Repair script:
/u01/app/oracle/diag/rdbms/orcl/orcl/hm/reco_2979
128860.hm
RMAN>

2011Oracle

RMAN ADVISE FAILURE ADVISE FAILURE

(ADR) CRITICAL
HIGH LIST FAILURE ADR
CRITICAL HIGH
WARNING

RMAN

(OS)

ADVISE FAILURE
[ ALL | CRITICAL | HIGH | LOW | failnum[,failnum,] ]
[ EXCLUDE FAILURE failnum [,failnum,] ]

Oracle Database 11g II 9-11

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN REPAIR FAILURE

ADVISE FAILURE

REPAIR FAILURE
[USING ADVISE OPTION integer]
[ { {NOPROMPT | PREVIEW}}...]

2011Oracle

RMAN ADVISE FAILURE


ADVISE FAILURE
REPAIR FAILURE ADVISE FAILURE

USING ADVISE OPTION integer


ADVISE FAILURE

REPAIR PREVIEW
PREVIEW RMAN
NOPROMPT

Oracle Database 11g II 9-12

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN CHANGE FAILURE

CRITICAL

RMAN> change failure 5 priority low;


List of Database Failures
=========================
Failure ID Priority Status
Time Detected Summary
---------- -------- --------- ------------- ------5
HIGH
OPEN
20-DEC-06
one or more
datafiles are missing
Do you really want to change the above failures (enter YES or
NO)? yes
changed 1 failures to LOW priority

2011Oracle

CHANGE FAILURE

CHANGE FAILURE
{ ALL | CRITICAL | HIGH | LOW | failnum[,failnum,] }
[ EXCLUDE FAILURE failnum[,failnum,] ]
{ PRIORITY {CRITICAL | HIGH | LOW} |
CLOSE }
[ NOPROMPT ]

HIGH LOW LOW HIGH CRITICAL


HIGH LOW
LIST FAILURE HIGH
LOW

Oracle Database 11g II 9-13

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

V$

V$IR_FAILURE
LIST FAILURE

V$IR_MANUAL_CHECKLIST
ADVISE FAILURE

V$IR_REPAIRADVISE FAILURE

V$IR_FAILURE_SET

2011Oracle

Oracle Database
Reference

Oracle Database 11g II 9-14

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.


RMAN VALIDATE DATABASE

ADR

2011Oracle

RMAN VALIDATE

RMAN VALIDATE DATABASE


VALIDATE BACKUPSET
ADR
LIST FAILURE
VALIDATE
VALIDATE
CHECK LOGICAL

VALIDATE

Oracle Database 11g II 9-15

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

>


DBA
DBA

2011Oracle

Oracle
Oracle DB
Oracle Oracle DB

Oracle Database 11g II 9-16

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

ADR

ORA-01578 "ORACLE data block corrupted


(file # %s, block # %s)"

alert.log

2011Oracle

ORA-01578
ORA-01578 ORA-01578

I/O
ORA-01578 ORA-01110

Oracle Database 11g II 9-17

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

ORA-01578

2011Oracle

ANALYZE

I/O
I/O

Oracle Database 11g II 9-18

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

...
I/O

...

...

EM > Server> Initialization Parameters


2011Oracle

DB_ULTRA_SAFE
DB_BLOCK_CHECKING
FALSEFULL
DB_BLOCK_CHECKSUM
I/O
TYPICALTYPICAL
DB_LOST_WRITE_PROTECT I/O

TYPICAL
TYPICAL
DB_ULTRA_SAFE
Oracle Database 11g

Oracle Database 11g II 9-19

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

DB_ULTRA_SAFE

OFF

DATA_ONLY DATA_AND_INDEX

DB_BLOCK_CHECKING

OFF
FALSE

MEDIUM

FULL TRUE

DB_BLOCK_CHECKSUM

TYPICAL

FULL

FULL

DB_LOST_WRITE_PROTECT

TYPICAL

TYPICAL

TYPICAL

2011Oracle

DB_ULTRA_SAFE
OFF
CPU
10% 20% CPU
DB_ULTRA_SAFE DATA_ONLY DB_BLOCK_CHECKING
MEDIUM
UPDATE INSERT Oracle RAC

DB_ULTRA_SAFE DATA_AND_INDEX DB_BLOCK_CHECKING


FULL

DB_ULTRA_SAFE DATA_ONLY DATA_AND_INDEX


DB_BLOCK_CHECKSUM FULLDB_LOST_WRITE_PROTECT
TYPICAL

Oracle Database 11g II 9-20

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

(MTTR)

RMAN RECOVER...BLOCK
0

V$DATABASE_BLOCK_CORRUPTION

2011Oracle

RMAN RECOVER...BLOCK
RMAN 0
RMAN

V$DATABASE_BLOCK_CORRUPTION RMAN ANALYZE


dbvSQL
/


BACKUP
RESTORERECOVER VALIDATE CHECK LOGICAL

Oracle Database 11g II 9-21

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

ARCHIVELOG

RMAN

2011Oracle

RECOVER ... BLOCK


ARCHIVELOG

0
RMAN

RMAN RMAN 1

RMAN

RMAN

Oracle Database 11g II 9-22

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RMAN RECOVER...BLOCK

RECOVER DATAFILE 6 BLOCK 3; Recover a single block


RECOVER
DATAFILE 2 BLOCK 43
DATAFILE 2 BLOCK 79
DATAFILE 6 BLOCK 183;
RECOVER CORRUPTION LIST;

Recover multiple blocks


in multiple data files

Recover all blocks logged in


V$DATABASE_BLOCK_CORRUPTION

2011Oracle

LIST FAILUREVALIDATE BACKUP ... VALIDATE


V$DATABASE_BLOCK_CORRUPTION

V$DIAG_INFO
SQL ANALYZE TABLE ANALYZE INDEX
DBVERIFY

ORA-01578:
ORA-01110:
ORA-01578:
ORA-01110:

ORACLE data block corrupted (file # 7, block # 3)


data file 7: '/oracle/oradata/orcl/tools01.dbf'
ORACLE data block corrupted (file # 2, block # 235)
data file 2: '/oracle/oradata/orcl/undotbs01.dbf'

RMAN RECOVER ... BLOCK

RECOVER
DATAFILE 7 BLOCK 3
DATAFILE 2 BLOCK 235;

Oracle Database 11g II 9-23

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

RECOVER...BLOCK

> ADR

DBA

DBA

SR

Bug

DBA

EM

EM
/

DBA

2011Oracle

Oracle

1. Oracle Enterprise Manager (EM)


2. DBA EM Alert
3. DBA
4. DBA Oracle My Oracle Support
Oracle DBA

Oracle Database 11g II 9-24

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

BACKGROUND_DUMP_DEST
CORE_DUMP_DEST
USER_DUMP_DEST

$ORACLE_BASE
$ORACLE_HOME/log

ADR

diag
rdbms
DB

ADR

alert

cdump incpkg incident

incdir_1

ADRCI

log.xml

SID

hm

trace

incdir_n

alert_SID.log

V$DIAG_INFO

2011Oracle

(ADR)
ADR

Oracle Database 11g R1 (ASM) (CRS)


Oracle ADR
ADR ASM Real Application
Clusters ASM ADR
ADR
Oracle
ADR ADR DIAGNOSTIC_DEST
DIAGNOSTIC_DEST
ORACLE_BASE DIAGNOSTIC_DEST $ORACLE_BASE
ORACLE_BASE DIAGNOSTIC_DEST
$ORACLE_HOME/log

Oracle Database 11g II 9-25

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

DIAGNOSTIC_DEST

ADRCI ADR

ADRCI

$ adrci
ADRCI: Release 11.1.0.5.0 - On Sat Jul 7 08:01:40 2007
Copyright (c) 1982, 2007, Oracle. All rights reserved.
ADR base = "/u01/app/oracle"
ADRCI> show incident
ADR Home = /u01/app/oracle/product/11.1.0/db_1/log/diag/rdbms/orcl/orcl:
**************************************************************************
INCIDENT_ID PROBLEM_KEY
CREATE_TIME
----------- ------------------------------------ -----------------------1681
ORA-600_dbgris01:1,_addr=0xa9876541 17-JAN-07 09.17.44.843125
1682
ORA-600_dbgris01:12,_addr=0xa9876542 18-JAN-07 09.18.59.434775
2 incident info records fetched

2011Oracle

ADR (ADRCI)
ADRCI ADRCI
(ADR)
zip Oracle
ADRCI ADRCI ADRCI
SQL*Plus SQL PL/SQL
ADR ADRCI ADR
ADR
Oracle Enterprise Manager
ASM
ADRCI
ADRCI ADR

ADRCI Oracle Database Utilities

Oracle Database 11g II 9-26

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

ADR (ADRCI)

SQL> SELECT * FROM V$DIAG_INFO;


NAME
------------------Diag Enabled
ADR Base
ADR Home
Diag Trace
Diag Alert
Diag Incident
Diag Cdump
Health Monitor
Default Trace File
Active Problem Count
Active Incident Count

VALUE
------------------------------------------------TRUE
/u01/app/oracle
/u01/app/oracle/diag/rdbms/orcl/orcl
/u01/app/oracle/diag/rdbms/orcl/orcl/trace
/u01/app/oracle/diag/rdbms/orcl/orcl/alert
/u01/app/oracle/diag/rdbms/orcl/orcl/incident
/u01/app/oracle/diag/rdbms/orcl/orcl/cdump
/u01/app/oracle/diag/rdbms/orcl/orcl/hm
/u01/app/oracle/diag/.../trace/orcl_ora_11424.trc
3
8

2011Oracle

V$DIAG_INFO
V$DIAG_INFO ADR
ADR BaseADR
ADR Home ADR
Diag Trace/
Diag AlertXML
Diag Incident
Diag Cdump
Health Monitor
Default Trace FileSQL

Oracle Database 11g II 9-27

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

V$DIAG_INFO

ADR

USER_DUMP_DEST

ADR_HOME/trace

BACKGROUND_DUMP_DEST

ADR_HOME/trace

BACKGROUND_DUMP_DEST

ADR_HOME/alert
ADR_HOME/trace

CORE_DUMP_DEST

ADR_HOME/cdump

USER|BACKGROUND_DUMP_DEST

ADR_HOME/incident/incdir_n

2011Oracle

Oracle Database 10g Oracle Database 11g

Oracle Database 11g


ADR_HOME/trace
trace
Oracle
Database 11g
SQL

ADR_HOME /u01/app/oracle/diag/rdbms/orcl/orcl
orcl ADR_HOME

Oracle Database 11g II 9-28

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

ADR
>

V$HM_RUN
DBMS_HM

ADRCI

EM

hm

EM

DBA

M
_H
MS
B
D

ADR

V$HM_CHECK

2011Oracle

Oracle DB

DBA DBMS_HM
PL/SQL Oracle Enterprise Manager
V$HM_CHECK

DB OPEN
DB
NOMOUNT

XML ADR V$HM_RUNDBMS_HMADRCI


Oracle Enterprise Manager

Oracle Database 11g II 9-29

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

SQL> exec dbms_hm.run_check('Database Dictionary Check',


'mycheck',0,'TABLE_NAME=tab$');
SQL> set long 100000
SQL> select dbms_hm.get_run_report('mycheck') from dual;
DBMS_HM.GET_RUN_REPORT('mycheck')
-------------------------------------------------------------------------------<?xml version="1.0" encoding="US-ASCII"?>
<HM-REPORT REPORT_ID="mycheck"><TITLE>HM Report: mycheck</TITLE>
<RUN_INFO>
<CHECK_NAME>Database Dictionary Check</CHECK_NAME>
<RUN_ID>21</RUN_ID><RUN_NAME>mycheck</RUN_NAME>
<RUN_MODE>MANUAL</RUN_MODE><RUN_STATUS>COMPLETED</RUN_STATUS>
</RUN_INFO>
<RUN_PARAMETERS><RUN_PARAMETER>TABLE_NAME=tab$</RUN_PARAMETER> </RUN_PARAMETERS>
<RUN-FINDINGS><FINDING>
<FINDING_NAME>Dictionary Inconsistency</FINDING_NAME><FINDING_ID>22</FINDING_ID>
<FINDING_TYPE>FAILURE</FINDING_TYPE><FINDING_STATUS>OPEN</FINDING_STATUS>
<FINDING_PRIORITY>CRITICAL</FINDING_PRIORITY>
<FINDING_CREATION_TIME></FINDING_CREATION_TIME>
<FINDING_MESSAGE>invalid column number 7 on Object tab$ Failed</FINDING_MESSAGE>
<FINDING_MESSAGE>Damaged Object SH.JFVTEST is referenced </FINDING_MESSAGE>

2011Oracle

PL/SQL
DBMS_HM.RUN_CHECK RUN_CHECK
V$HM_CHECK
V$HM_CHECK_PARAM
TAB$
MYCHECK
DBMS_HM.GET_RUN_REPORT V$HM_RUN
V$HM_FINDING V$HM_RECOMMENDATION TAB$
TAB$

GET_RUN_REPORT ADR HM XML


HMREPORT_mycheck.hm
DBMS_HM Oracle Database PL/SQL Packages and Types
Reference

Oracle Database 11g II 9-30

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

PL/SQL

adrci>>show hm_run

---------------------------------------------------------RUN_ID
11081
RUN_NAME
HM_RUN_11081
CHECK_NAME
Database Cross Check
NAME_ID
2
MODE
2
START_TIME
2007-04-13 03:20:31.161396 -07:00
RESUME_TIME
END_TIME
2007-04-13 03:20:37.903984 -07:00
MODIFIED_TIME
2007-04-17 01:16:37.106344 -07:00
TIMEOUT
0
FLAGS
0
STATUS
5
SRC_INCIDENT_ID
0
NUM_INCIDENTS
0
ERR_NUMBER
0
REPORT_FILE

adrci>>create report hm_run HM_RUN_11081


Adrci>>show report hm_run HM_RUN_11081

2011Oracle

ADRCI HM
ADRCI
ORACLE_HOME
adrci
ADR
SHOW HOMES ADR SET HOMEPATH
ADR
SHOW HM_RUN ADR V$HM_RUN
RUN_NAME
REPORT_FILE
CREATE REPORT HM_RUN
SHOW REPORT HM_RUN

Oracle Database 11g II 9-31

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

ADRCI HM

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

1.

2.

2011Oracle

Oracle Database 11g II 9-32

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

1.

2.

2011Oracle

Oracle Database 11g II 9-33

Oracle University and (Oracle Corporation) use only.

ADVISE FAILURE

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

1.

2.

2011Oracle

Oracle Database 11g II 9-34

Oracle University and (Oracle Corporation) use only.

ADR

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2.

3.

4.

5.

6.

7.

2011Oracle

23457

Oracle Database 11g II 9-35

Oracle University and (Oracle Corporation) use only.

1.

RMAN

2011Oracle

Oracle Database 11g II 9-36

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

Oracle Database 11g II 9-37

Oracle University and (Oracle Corporation) use only.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

Oracle Database 11g II 10-2

Oracle University and (Oracle Corporation) use only.

> -
-
-
-

WHERE

2011Oracle

Oracle DB


INSERTUPDATE DELETE

Oracle Database 11g II 10-3

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

DML

2011Oracle

V$TRANSACTION

DML

DML DML
Oracle

Oracle Database 11g II 10-4

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.


15

15
SELECT

2011Oracle

RETENTION GUARANTEE SQL


Oracle Enterprise Manager
SQL> ALTER TABLESPACE undotbs1 RETENTION GUARANTEE;

SQL> ALTER TABLESPACE undotbs1 RETENTION NOGUARANTEE;

Oracle Enterprise Manager Automatic Undo


ManagementGeneral/Undo
Retention Settings/

Oracle Database 11g II 10-5

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

UNDO_MANAGEMENT='AUTO'
UNDO_TABLESPACE='UNDOTBS1'
UNDO_RETENTION=900

2011Oracle

1
2 V$UNDO_STAT
Oracle

Oracle

Oracle DB

Oracle DB
UNDO_RETENTION

Oracle Database 11g II 10-6

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

V$UNDOSTAT.TUNED_UNDORETENTION
UNDO_RETENTION
Oracle DB
RETENTION GUARANTEE

Oracle Database 11g II 10-7

11:00

11:10

2011Oracle




SQL

Oracle Database 11g II 10-8

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

-
> -
-
-


employees

employees

T1

T2

SELECT employee_id, salary FROM employees


AS OF TIMESTAMP <T1>
WHERE employee_id = 200

2011Oracle

SELECT AS OF

TIMESTAMP SCN AS OF

Oracle Database 11g II 10-9

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

employees

employees

salary = 4,400

salary = 4,840

11:00

employees
salary = 4,400

11:10

UPDATE employees
SET salary =
(SELECT salary FROM employees
AS OF TIMESTAMP TO_TIMESTAMP
('2005-05-04 11:00:00', 'yyyy-mm-dd hh24:mi:ss')
WHERE employee_id = 200)
WHERE employee_id = 200

2011Oracle

Oracle Database 11g II 10-10

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Tx0

Tx1
employees

Tx2
employees

employees

200

t1

t2

SELECT versions_xid, salary FROM employees


VERSIONS BETWEEN TIMESTAMP <t1> and <t2>
WHERE employee_id = 200;
Tx0

Tx1

Tx2

2011Oracle

(SCN)
VERSIONS SCN

LogMiner

VERSIONS_XID

Oracle Database 11g II 10-11

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

VERSIONS



VERSIONS DDL

2011Oracle

VERSIONS



VERSIONS VERSIONS
SELECT VERSIONS DDL

Oracle Database 11g II 10-12

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

1.

2.

2011Oracle

Oracle Database 11g II 10-13

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2.

3.

2011Oracle

Oracle Database 11g II 10-14

Oracle University and (Oracle Corporation) use only.

1.

DML

>

2011Oracle

Oracle Database 11g II 10-15

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

-
-
-
-

FLASHBACK ANY TABLE


FLASHBACK

SELECTINSERTDELETE
ALTER

2011Oracle

FLASHBACK TABLE
FLASHBACK ANY TABLE SELECTINSERT
DELETE ALTER
Oracle Enterprise Manager

Oracle Database 11g II 10-16

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

ALTER TABLE employees ENABLE ROW MOVEMENT;

2011Oracle

Oracle Server

Oracle Enterprise Manager


1. SchemaDatabase Objects
TablesGo
2. View Table
3. EditEdit Table
4. OptionsEnable Row Movement

5. Enable Row MovementYes


Apply

Oracle Database 11g II 10-17

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

FLASHBACK TABLE hr.departments TO TIMESTAMP


TO_TIMESTAMP('2007-04-05 21:00:00',
'YYYY-MM-DD HH24:MI:SS');
2011Oracle

Oracle Enterprise Manager


1. AvailabilityBackup/Recovery/
Perform Recovery
2. Object Level RecoveryObject Type
Tables
3. Flashback existing tablesOperation Type
RecoverPerform Object Level Recovery: Point-in-time
:
4. Flashback to a timestampFlashback to a known SCN
SCN SCNNext
5. Add TablesNext
6. Dependency Options
CascadeNext

7. Perform Object Level Recovery: Review:


SubmitConfirmation
Oracle Database 11g II 10-18

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

AdministrationSchemaTables

Oracle Database 11g II 10-19

FLASHBACK TABLE
DML


DDL

2011Oracle

FLASHBACK TABLE


(DML)

FLASHBACK TABLE

FLASHBACK TABLE
(DDL)
(DDL)
DDL

Oracle Database 11g II 10-20

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2.

3.

4.

2011Oracle

124

Oracle Database 11g II 10-21

Oracle University and (Oracle Corporation) use only.

1.


FLASHBACK_TRANSACTION_QUERY

DBA

DML

SQL

2011Oracle

FLASHBACK_TRANSACTION_QUERY SQL

Oracle Database 11g II 10-22

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

>

-
-
-
-

2011Oracle

Oracle Enterprise Manager


Perform Object Level
Recovery: Choose SCN: SCNFlashback Version
Query ResultTransaction ID ID

JOBS JOB_ID = 'AD_PRES'


JOBS ID
JOBS EMPLOYEES

Oracle Database 11g II 10-23

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Oracle Enterprise Manager

DDL

DDL

2011Oracle

DDL
DDL

ID
FLASHBACK_TRANSACTION_QUERY
OPERATION UNKNOWN

Oracle Database 11g II 10-24

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

Oracle DB

Oracle Enterprise Manager PL/SQL

Oracle Database 11g II 10-25

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

HR HR
REGIONS SYSDBA SQL*Plus
alter
alter
grant
grant

database add supplemental


database add supplemental
execute on dbms_flashback
select any transaction to

log data;
log data (primary key) columns;
to hr;
hr;

Oracle Database 11g II 10-26

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Oracle Enterprise Manager

EM NOCASCADE
DBMS_FLASHBACK.TRANSACTION_BACKOUT

PL/SQL

2011Oracle

SELECT
FLASHBACK DML

DDL
LogMiner
Oracle Database 11g

Oracle Database 11g II 10-27

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

1.
2.
3.
1.
2.
3.
4.

4.

2011Oracle

connect hr
Enter password: oracle_4U <<< not displayed
INSERT INTO hr.regions VALUES (5,'Pole');
COMMIT;
UPDATE hr.regions SET region_name='Poles' WHERE region_id = 5;
UPDATE hr.regions SET region_name='North and South Poles' WHERE
region_id = 5;
COMMIT;
INSERT INTO hr.countries VALUES ('TT','Test Country',5);
COMMIT;
connect sys/<password> as sysdba
ALTER SYSTEM ARCHIVE LOG CURRENT;

Oracle Database 11g II 10-28

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

Oracle Enterprise Manager Table HR.REGIONSActions


Flashback TransactionGo
Flashback Transaction:
Perform Query:

Oracle Enterprise Manager DBMS_FLASHBACK.TRANSACTION_BACKOUT


Oracle Database PL/SQL Packages and Types Reference
ID
CREATE TYPE XID_ARRAY AS VARRAY(100) OF RAW(8);
CREATE OR REPLACE PROCEDURE TRANSACTION_BACKOUT(
numberOfXIDs NUMBER, -- number of transactions passed as input
xids XID_ARRAY, -- the list of transaction ids
options NUMBER default NOCASCADE, -- back out dependent
txn timeHint TIMESTAMP default MINTIME -- time hint on the txn
start
);

Oracle Database 11g II 10-29

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

TRANSACTION_BACKOUT
(WAW)


WAW
/

NONCONFLICT_ONLY NOCASCADE_FORCE T1
R1R2 R3T2 R1R3 R4
R1 R1 T2 T1
WAW NONCONFLICT_ONLY R2 R3 R2
R3 R1 NOCASCADE_FORCE
R1R2 R3

Oracle Database 11g II 10-30

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

NOCASCADE DBMS_FLASHBACK.TRANSACTION_BACKOUT

Nonconflict Only

Nocascade Force

DML
Cascade

Oracle Database 11g II 10-31

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

DBA_FLASHBACK_TXN_STATE
DBA_FLASHBACK_TXN_REPORT

2011Oracle

EM
DBA_FLASHBACK_TXN_STATE

DBA_FLASHBACK_TXN_REPORT

Oracle Database Reference

Oracle Database 11g II 10-32

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

EM

Jim
EMPLOYEES

1.
2.
3.

2011Oracle

Oracle Database 11g II 10-33

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

Oracle Database 11g II 10-34

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

2011Oracle

Oracle Database 11g II 10-35

Oracle University and (Oracle Corporation) use only.

10

Oracle University and (Oracle Corporation) use only.

These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.

Anda mungkin juga menyukai