This is a cheat sheet for Oracle 12C R2 workshop Part II
Will conver those topics:
- Storage space
- Undo
- Moving Data
- Backup and Recovery
Manage storage space
|
|
|
|
Undo
Two UNDO modes: SHARED versus LOCAL
- There is only one shared UNDO tablespace (in CDB root).
- There can be a - local UNDO tablespace in each PDB.
|
|
Enable Local Undo Mode
|
|
Enable Temp Undo
|
|
Moving Data
Directory
|
|
expdp/impdp
|
|
sqlldr
|
|
External Table
|
|
Create external table
|
|
Backup & Recovery
Checkpoint
Responsible
- Updating data file headers with checkpoint info
- Updating control files with checkpoint info
- Signaling DBWn at full checkpoints
Redo log and Log Writer (LGWR)
Trigger
- At commit
- When on-third full
- Every 3 sec
- Before DBWn write
- Before clean shutdowns
Automatic Instance or Crash Recovery
Is caused by attempts to open a database whose files are not synchronized on shutdown
Uses information stored in redo log groups to synchronize files
Involves two distinct operations:
- Rolling forward: Redo log changes (both committed and uncommitted) are applied to data files.
- Rolling back: Changes that are made but not committed are returned to their original state.
Backup Type
- Level 0. FULL
- Level 1. Incremental
- Cumulative
- Differential
Complete Recovery
Brings the database or tablespace up to the present, including all committed data changes made to the point in time when the recovery was requested
- Restored data files
- Changes applied (redo logs)
- Data files containning committed and uncommitted trans
- Dndo applied
- Recovered data files
Pint-in-Time Recovery Process
- Restored data files from as far back as necessary
- Changes applied to point in time (PIT). (Redo logs)
- Data files containing committed and un committed trans up to PIT
- Database opened
- Undo applied
- PIT-recovered data files
List control files
|
|
Create a Control File
|
|
|
|
|
|
Fast Recovery Area (FRA)
|
|
Redo Log
|
|
ARCHIVELOG Mode
|
|
Backing up the Control File
The control file and server parameter file (SPFILE) are backup automatically by default
Manually backup it as below
|
|
Whole DB backup
|
|
Recovery
|
|
|
|
Monitor DB
|
|