SlideShare a Scribd company logo
Oracle9i Database Administrator: Implementation and Administration 1
Chapter 5
The Redo Log Files
Oracle9i Database Administrator: Implementation and Administration 2
Objectives
 Learn to describe redo log files,
groups, and members
 Manage redo log groups and
members
Oracle9i Database Administrator: Implementation and Administration 3
Introduction to Online
Redo Log Files
Online redo log files store details as
the database is used including:
 Checkpoints
 Data Changes (DML)
 Structural changes (DDL)
 Data file changes
Oracle9i Database Administrator: Implementation and Administration 4
Oracle9i Architecture: A Typical Server
Oracle9i Database Administrator: Implementation and Administration 5
Introduction to Online
Redo Log Files
Components:
•Redo log group
•Online redo log
file or member
•Archived redo
log file
•ARCn
Oracle9i Database Administrator: Implementation and Administration 6
Introduction to Online
Redo Log Files
Components:
•Redo log buffer
•LGWR
•CKPT
Oracle9i Database Administrator: Implementation and Administration 7
Introduction to Online
Redo Log Files
File 1 is written to
File A by the
ARCn process
after the log
switch is
complete
Oracle9i Database Administrator: Implementation and Administration 8
Introduction to Online
Redo Log Files
File 1 and File 3
are written to by
the LGWR
process
simultaneously
until both are full
Oracle9i Database Administrator: Implementation and Administration 9
The Purpose of Redo Log Files
Redo log files aid in recovery from short term
data loss such as brief power outage:
 Store changes that may not be written to the
data files yet
 Store checkpoints to allow recovery to
resynchronize data files with correct changes
 Cannot completely handle recovery from
major loss such as an entire data file
Oracle9i Database Administrator: Implementation and Administration 10
The Purpose of Redo Log Files
Recovery procedures (overview):
Prior to failure:
 Perform full database backup regularly
 Run database in ARCHIVELOG mode
After failure:
 Restore from full backup
 Apply archived redo log files (oldest to newest)
 Apply online redo log file
Oracle9i Database Administrator: Implementation and Administration 11
The Structure of Redo Log Files
Redo log buffer is flushed to the redo log
file when:
 A transaction COMMITS
 The redo log buffer becomes 1/3 full
 The redo log buffer contains >1 M of
updated records
 A checkpoint occurs
Oracle9i Database Administrator: Implementation and Administration 12
The Structure of Redo Log Files
Redo log file components:
 Redo record (also called redo entry)
 Relates to one data block
 Made up of one or more change vectors
Oracle9i Database Administrator: Implementation and Administration 13
Managing Redo Log Files
The COMMIT
command tells
the database to
log the
changes to the
redo log file
Oracle9i Database Administrator: Implementation and Administration 14
Log Switches and Checkpoints
 To manually signal a log switch:
ALTER SYSTEM SWITCH LOGFILE;
 A log switch triggers a checkpoint
 Checkpoint is a signal to write all dirty
buffers to the appropriate files
 Checkpoint increments the System
Change Number (SCN)
Oracle9i Database Administrator: Implementation and Administration 15
Log Switches and Checkpoints
How the SCN is used:
 SCN is recorded in the redo log buffer
 SCN is recorded in the header of each
data file that was written to
 During recovery, SCN of each datafile is
compared to the SCN in the redo log file
 If a match, the data file is up to date
 If redo log file has higher SCN, changes are
reapplied to the data file from the redo log file
Oracle9i Database Administrator: Implementation and Administration 16
Multiplexing and Other
Maintenance
 Multiplexed redo log files requires multiple
members in each group
 A log group continues to function as long as
it has at least one good member
 If all members of the current group become
damaged, the database forces a log switch
 The database shuts down immediately if a
log switch fails
Oracle9i Database Administrator: Implementation and Administration 17
Adding a Member to a Group
 Add members to groups while the database is
running
 Do not specify SIZE because new members
are automatically assigned the same size as
other members in the group
 Command syntax:
ALTER DATABASE ADD LOGFILE MEMBER '<X:xxx><filename>'
TO GROUP <n>;
Oracle9i Database Administrator: Implementation and Administration 18
Adding a New Group
 Add a new group while the database is
running
 Specify SIZE and group number
 List all members to be created with the
group (must be at least one)
 Command syntax:
ALTER DATABASE ADD LOGFILE GROUP <n>
( '<X:xxx><filename>', '<X:xxx><filename>')
SIZE <n>;
Oracle9i Database Administrator: Implementation and Administration 19
Renaming or Moving
a Redo Log File
 Must be done while the group is not
ACTIVE
 Steps:
1. Shut down the database:
SHUTDOWN IMMEDIATE
2. Rename or relocate files using the operating
system
3. Mount the database
STARTUP MOUNT
Oracle9i Database Administrator: Implementation and Administration 20
Renaming or Moving
a Redo Log File
 Steps (continued):
4. Inform database of changed file name:
ALTER DATABASE
RENAME FILE '<X:xxx><oldfilename1>',
'<X:xxx><oldfilename2>'
TO '<X:xxx><newfilename1>',
'<X:xxx><newfilename2>';
5. Open the database:
ALTER DATABASE OPEN;
Oracle9i Database Administrator: Implementation and Administration 21
Dropping Redo Log Members
or Groups
Reasons for dropping members or
groups:
 Bad disk, so must recreate member
 Tuning recommendation calls for
reducing members or groups
 Corrupted members can be deleted
and replaced later
Oracle9i Database Administrator: Implementation and Administration 22
Dropping Redo Log Members
or Groups
 Rules when dropping redo log members:
 Each group must have at least one member
 The group affected must not be ACTIVE and (if in
ARCHIVELOG mode) must be archived
 Rule when dropping groups:
 Database requires at least two groups
 The group affected must not be ACTIVE and (if in
ARCHIVELOG mode) must be archived
Oracle9i Database Administrator: Implementation and Administration 23
Dropping Redo Log Members or
Groups
Steps to drop redo log member:
1. Query V$LOG to confirm that group is
inactive
2. Drop redo log member:
ALTER DATABASE DROP LOGFILE MEMBER
'<X:xxx><filename>';
3. Delete associated file in the operating
system
Oracle9i Database Administrator: Implementation and Administration 24
Dropping Redo Log Members or
Groups
Steps to drop redo log group:
1. Query V$LOG to confirm that group is
inactive: SELECT * FROM V$LOG;
2. Drop redo log group:
ALTER DATABASE DROP LOGFILE GROUP <n>;
3. Delete associated file(s) in the operating
system
Oracle9i Database Administrator: Implementation and Administration 25
Dropping Redo Log Members or
Groups
Additional notes:
 If group is ACTIVE, force log switch:
ALTER SYSTEM SWITCH LOGFILE;
 If group still active, force checkpoint:
ALTER SYSTEM CHECKPOINT;
 An alternative to dropping a corrupt group and
recreating the members:
ALTER DATABASE CLEAR UNARCHIVED LOGFILE GROUP <n>;
Oracle9i Database Administrator: Implementation and Administration 26
Archiving a Redo Log Group
Advantages of archiving redo log groups:
 Point-in-time recovery to a point earlier
than online redo log files contain
 The ability to query archived log files with
LogMiner
 The ability to set up and maintain a
standby database
Oracle9i Database Administrator: Implementation and Administration 27
Finding Redo Log Information in
Data Dictionary Views
States of a redo log group:
 UNUSED
 CURRENT
 ACTIVE
 CLEARING
 CLEARING_CURRENT
 INACTIVE
Oracle9i Database Administrator: Implementation and Administration 28
Viewing Control File Data
Oracle9i Database Administrator: Implementation and Administration 29
Chapter Summary
 Redo log files primarily contain information on
database changes
 A database has at least two redo log groups
 A redo log group has at least one member
 Redo log files support automatic recovery
from minor failures
 A redo log group with multiple files is
multiplexed
Oracle9i Database Administrator: Implementation and Administration 30
Chapter Summary
 The SCN is incremented at a checkpoint
 Maintenance you can do with redo log files
and groups:
 Add a new file (member) to a group
 Add a new group
 Rename or relocate a member
 Drop a member
 Drop a group
 Clear a group
Oracle9i Database Administrator: Implementation and Administration 31
Chapter Summary
 Placing a database in ARCHIVELOG
mode causes redo log files to be
archived after a log switch
 Many initialization parameters set the
behavior of the archiving function
 The V$LOG and V$LOGFILES dynamic
performance views display information
about redo log groups and members

More Related Content

Similar to chap05-info366.ppt

Capitulo 01 Dba 2
Capitulo 01 Dba 2Capitulo 01 Dba 2
Capitulo 01 Dba 2Julio Pari
 
Ensuring Data Protection Using Oracle Flashback Features - Presentation
Ensuring Data Protection Using Oracle Flashback Features - PresentationEnsuring Data Protection Using Oracle Flashback Features - Presentation
Ensuring Data Protection Using Oracle Flashback Features - Presentation
Pini Dibask
 
Oracle database hot backup and recovery
Oracle database hot backup and recoveryOracle database hot backup and recovery
Oracle database hot backup and recovery
Arun Sharma
 
[Altibase] 13 backup and recovery
[Altibase] 13 backup and recovery[Altibase] 13 backup and recovery
[Altibase] 13 backup and recovery
altistory
 
Missing redo logs in oracle
Missing redo logs in oracleMissing redo logs in oracle
Missing redo logs in oracle
Bolisetty Srinivas
 
ORACLE CORE DBA ONLINE TRAINING
ORACLE CORE DBA ONLINE TRAININGORACLE CORE DBA ONLINE TRAINING
ORACLE CORE DBA ONLINE TRAINING
training3
 
Oracle core dba online training
Oracle core dba online trainingOracle core dba online training
Oracle core dba online training
Santhosh Reddy
 
ORACLE CORE DBA ONLINE TRAINING
ORACLE CORE DBA ONLINE TRAININGORACLE CORE DBA ONLINE TRAINING
ORACLE CORE DBA ONLINE TRAINING
sapcrmtraining
 
Les 02 Config Rec
Les 02 Config RecLes 02 Config Rec
Les 02 Config Rec
vivaankumar
 
Oracle Instance Architecture.ppt
Oracle Instance Architecture.pptOracle Instance Architecture.ppt
Oracle Instance Architecture.ppt
HODCA1
 
Oracle Architecture
Oracle ArchitectureOracle Architecture
Oracle Architecture
Neeraj Singh
 
24 HOP edición Español - Sql server 2014 backup encryption - Percy Reyes
24 HOP edición Español - Sql server 2014 backup encryption - Percy Reyes24 HOP edición Español - Sql server 2014 backup encryption - Percy Reyes
24 HOP edición Español - Sql server 2014 backup encryption - Percy Reyes
SpanishPASSVC
 
Best New Features of Oracle Database 12c
Best New Features of Oracle Database 12cBest New Features of Oracle Database 12c
Best New Features of Oracle Database 12c
Pini Dibask
 
What is new on 12c for Backup and Recovery? Presentation
What is new on 12c for Backup and Recovery? PresentationWhat is new on 12c for Backup and Recovery? Presentation
What is new on 12c for Backup and Recovery? Presentation
Francisco Alvarez
 
Less01 Dba1
Less01 Dba1Less01 Dba1
Less01 Dba1
vivaankumar
 
Backup and Recovery Procedure
Backup and Recovery ProcedureBackup and Recovery Procedure
Backup and Recovery ProcedureAnar Godjaev
 
Leo's notes - Oracle DBA 2 Days
Leo's notes - Oracle DBA 2 DaysLeo's notes - Oracle DBA 2 Days
Leo's notes - Oracle DBA 2 Days
Léopold Gault
 

Similar to chap05-info366.ppt (20)

Capitulo 01 Dba 2
Capitulo 01 Dba 2Capitulo 01 Dba 2
Capitulo 01 Dba 2
 
Ensuring Data Protection Using Oracle Flashback Features - Presentation
Ensuring Data Protection Using Oracle Flashback Features - PresentationEnsuring Data Protection Using Oracle Flashback Features - Presentation
Ensuring Data Protection Using Oracle Flashback Features - Presentation
 
Oracle database hot backup and recovery
Oracle database hot backup and recoveryOracle database hot backup and recovery
Oracle database hot backup and recovery
 
[Altibase] 13 backup and recovery
[Altibase] 13 backup and recovery[Altibase] 13 backup and recovery
[Altibase] 13 backup and recovery
 
Oracle Database Administration 11g Course Content
Oracle Database Administration 11g Course ContentOracle Database Administration 11g Course Content
Oracle Database Administration 11g Course Content
 
Missing redo logs in oracle
Missing redo logs in oracleMissing redo logs in oracle
Missing redo logs in oracle
 
ORACLE CORE DBA ONLINE TRAINING
ORACLE CORE DBA ONLINE TRAININGORACLE CORE DBA ONLINE TRAINING
ORACLE CORE DBA ONLINE TRAINING
 
Oracle core dba online training
Oracle core dba online trainingOracle core dba online training
Oracle core dba online training
 
ORACLE CORE DBA ONLINE TRAINING
ORACLE CORE DBA ONLINE TRAININGORACLE CORE DBA ONLINE TRAINING
ORACLE CORE DBA ONLINE TRAINING
 
Creating database
Creating databaseCreating database
Creating database
 
Les 02 Config Rec
Les 02 Config RecLes 02 Config Rec
Les 02 Config Rec
 
Oracle Instance Architecture.ppt
Oracle Instance Architecture.pptOracle Instance Architecture.ppt
Oracle Instance Architecture.ppt
 
Oracle Architecture
Oracle ArchitectureOracle Architecture
Oracle Architecture
 
Less15 Backups
Less15 BackupsLess15 Backups
Less15 Backups
 
24 HOP edición Español - Sql server 2014 backup encryption - Percy Reyes
24 HOP edición Español - Sql server 2014 backup encryption - Percy Reyes24 HOP edición Español - Sql server 2014 backup encryption - Percy Reyes
24 HOP edición Español - Sql server 2014 backup encryption - Percy Reyes
 
Best New Features of Oracle Database 12c
Best New Features of Oracle Database 12cBest New Features of Oracle Database 12c
Best New Features of Oracle Database 12c
 
What is new on 12c for Backup and Recovery? Presentation
What is new on 12c for Backup and Recovery? PresentationWhat is new on 12c for Backup and Recovery? Presentation
What is new on 12c for Backup and Recovery? Presentation
 
Less01 Dba1
Less01 Dba1Less01 Dba1
Less01 Dba1
 
Backup and Recovery Procedure
Backup and Recovery ProcedureBackup and Recovery Procedure
Backup and Recovery Procedure
 
Leo's notes - Oracle DBA 2 Days
Leo's notes - Oracle DBA 2 DaysLeo's notes - Oracle DBA 2 Days
Leo's notes - Oracle DBA 2 Days
 

More from KalsoomTahir2

005813616.pdf
005813616.pdf005813616.pdf
005813616.pdf
KalsoomTahir2
 
009576860.pdf
009576860.pdf009576860.pdf
009576860.pdf
KalsoomTahir2
 
005813185.pdf
005813185.pdf005813185.pdf
005813185.pdf
KalsoomTahir2
 
HASH FUNCTIONS.pdf
HASH FUNCTIONS.pdfHASH FUNCTIONS.pdf
HASH FUNCTIONS.pdf
KalsoomTahir2
 
6. McCall's Model.pptx
6. McCall's Model.pptx6. McCall's Model.pptx
6. McCall's Model.pptx
KalsoomTahir2
 
ch02-Database System Concepts and Architecture.ppt
ch02-Database System Concepts and Architecture.pptch02-Database System Concepts and Architecture.ppt
ch02-Database System Concepts and Architecture.ppt
KalsoomTahir2
 
9223301.ppt
9223301.ppt9223301.ppt
9223301.ppt
KalsoomTahir2
 
11885558.ppt
11885558.ppt11885558.ppt
11885558.ppt
KalsoomTahir2
 
Indexing.ppt
Indexing.pptIndexing.ppt
Indexing.ppt
KalsoomTahir2
 
1650607.ppt
1650607.ppt1650607.ppt
1650607.ppt
KalsoomTahir2
 
005281271.pdf
005281271.pdf005281271.pdf
005281271.pdf
KalsoomTahir2
 
soa_and_jra.ppt
soa_and_jra.pptsoa_and_jra.ppt
soa_and_jra.ppt
KalsoomTahir2
 
ERP_Up_Down.ppt
ERP_Up_Down.pptERP_Up_Down.ppt
ERP_Up_Down.ppt
KalsoomTahir2
 
Topic1CourseIntroduction.ppt
Topic1CourseIntroduction.pptTopic1CourseIntroduction.ppt
Topic1CourseIntroduction.ppt
KalsoomTahir2
 
Lecture 19 - Dynamic Web - JAVA - Part 1.ppt
Lecture 19 - Dynamic Web - JAVA - Part 1.pptLecture 19 - Dynamic Web - JAVA - Part 1.ppt
Lecture 19 - Dynamic Web - JAVA - Part 1.ppt
KalsoomTahir2
 
CommercialSystemsBahman.ppt
CommercialSystemsBahman.pptCommercialSystemsBahman.ppt
CommercialSystemsBahman.ppt
KalsoomTahir2
 
EJBDetailsFeb25.ppt
EJBDetailsFeb25.pptEJBDetailsFeb25.ppt
EJBDetailsFeb25.ppt
KalsoomTahir2
 
jan28EAI.ppt
jan28EAI.pptjan28EAI.ppt
jan28EAI.ppt
KalsoomTahir2
 
005428052.pdf
005428052.pdf005428052.pdf
005428052.pdf
KalsoomTahir2
 

More from KalsoomTahir2 (20)

005813616.pdf
005813616.pdf005813616.pdf
005813616.pdf
 
009576860.pdf
009576860.pdf009576860.pdf
009576860.pdf
 
005813185.pdf
005813185.pdf005813185.pdf
005813185.pdf
 
HASH FUNCTIONS.pdf
HASH FUNCTIONS.pdfHASH FUNCTIONS.pdf
HASH FUNCTIONS.pdf
 
6. McCall's Model.pptx
6. McCall's Model.pptx6. McCall's Model.pptx
6. McCall's Model.pptx
 
ch02-Database System Concepts and Architecture.ppt
ch02-Database System Concepts and Architecture.pptch02-Database System Concepts and Architecture.ppt
ch02-Database System Concepts and Architecture.ppt
 
9223301.ppt
9223301.ppt9223301.ppt
9223301.ppt
 
11885558.ppt
11885558.ppt11885558.ppt
11885558.ppt
 
Indexing.ppt
Indexing.pptIndexing.ppt
Indexing.ppt
 
1650607.ppt
1650607.ppt1650607.ppt
1650607.ppt
 
005281271.pdf
005281271.pdf005281271.pdf
005281271.pdf
 
soa_and_jra.ppt
soa_and_jra.pptsoa_and_jra.ppt
soa_and_jra.ppt
 
ERP_Up_Down.ppt
ERP_Up_Down.pptERP_Up_Down.ppt
ERP_Up_Down.ppt
 
Topic1CourseIntroduction.ppt
Topic1CourseIntroduction.pptTopic1CourseIntroduction.ppt
Topic1CourseIntroduction.ppt
 
Lecture 19 - Dynamic Web - JAVA - Part 1.ppt
Lecture 19 - Dynamic Web - JAVA - Part 1.pptLecture 19 - Dynamic Web - JAVA - Part 1.ppt
Lecture 19 - Dynamic Web - JAVA - Part 1.ppt
 
CommercialSystemsBahman.ppt
CommercialSystemsBahman.pptCommercialSystemsBahman.ppt
CommercialSystemsBahman.ppt
 
EJBDetailsFeb25.ppt
EJBDetailsFeb25.pptEJBDetailsFeb25.ppt
EJBDetailsFeb25.ppt
 
jan28EAI.ppt
jan28EAI.pptjan28EAI.ppt
jan28EAI.ppt
 
005428052.pdf
005428052.pdf005428052.pdf
005428052.pdf
 
jini-1.ppt
jini-1.pptjini-1.ppt
jini-1.ppt
 

Recently uploaded

How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
Col Mukteshwar Prasad
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
bennyroshan06
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
AzmatAli747758
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
Excellence Foundation for South Sudan
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
Fundacja Rozwoju Społeczeństwa Przedsiębiorczego
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 

Recently uploaded (20)

How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 

chap05-info366.ppt

  • 1. Oracle9i Database Administrator: Implementation and Administration 1 Chapter 5 The Redo Log Files
  • 2. Oracle9i Database Administrator: Implementation and Administration 2 Objectives  Learn to describe redo log files, groups, and members  Manage redo log groups and members
  • 3. Oracle9i Database Administrator: Implementation and Administration 3 Introduction to Online Redo Log Files Online redo log files store details as the database is used including:  Checkpoints  Data Changes (DML)  Structural changes (DDL)  Data file changes
  • 4. Oracle9i Database Administrator: Implementation and Administration 4 Oracle9i Architecture: A Typical Server
  • 5. Oracle9i Database Administrator: Implementation and Administration 5 Introduction to Online Redo Log Files Components: •Redo log group •Online redo log file or member •Archived redo log file •ARCn
  • 6. Oracle9i Database Administrator: Implementation and Administration 6 Introduction to Online Redo Log Files Components: •Redo log buffer •LGWR •CKPT
  • 7. Oracle9i Database Administrator: Implementation and Administration 7 Introduction to Online Redo Log Files File 1 is written to File A by the ARCn process after the log switch is complete
  • 8. Oracle9i Database Administrator: Implementation and Administration 8 Introduction to Online Redo Log Files File 1 and File 3 are written to by the LGWR process simultaneously until both are full
  • 9. Oracle9i Database Administrator: Implementation and Administration 9 The Purpose of Redo Log Files Redo log files aid in recovery from short term data loss such as brief power outage:  Store changes that may not be written to the data files yet  Store checkpoints to allow recovery to resynchronize data files with correct changes  Cannot completely handle recovery from major loss such as an entire data file
  • 10. Oracle9i Database Administrator: Implementation and Administration 10 The Purpose of Redo Log Files Recovery procedures (overview): Prior to failure:  Perform full database backup regularly  Run database in ARCHIVELOG mode After failure:  Restore from full backup  Apply archived redo log files (oldest to newest)  Apply online redo log file
  • 11. Oracle9i Database Administrator: Implementation and Administration 11 The Structure of Redo Log Files Redo log buffer is flushed to the redo log file when:  A transaction COMMITS  The redo log buffer becomes 1/3 full  The redo log buffer contains >1 M of updated records  A checkpoint occurs
  • 12. Oracle9i Database Administrator: Implementation and Administration 12 The Structure of Redo Log Files Redo log file components:  Redo record (also called redo entry)  Relates to one data block  Made up of one or more change vectors
  • 13. Oracle9i Database Administrator: Implementation and Administration 13 Managing Redo Log Files The COMMIT command tells the database to log the changes to the redo log file
  • 14. Oracle9i Database Administrator: Implementation and Administration 14 Log Switches and Checkpoints  To manually signal a log switch: ALTER SYSTEM SWITCH LOGFILE;  A log switch triggers a checkpoint  Checkpoint is a signal to write all dirty buffers to the appropriate files  Checkpoint increments the System Change Number (SCN)
  • 15. Oracle9i Database Administrator: Implementation and Administration 15 Log Switches and Checkpoints How the SCN is used:  SCN is recorded in the redo log buffer  SCN is recorded in the header of each data file that was written to  During recovery, SCN of each datafile is compared to the SCN in the redo log file  If a match, the data file is up to date  If redo log file has higher SCN, changes are reapplied to the data file from the redo log file
  • 16. Oracle9i Database Administrator: Implementation and Administration 16 Multiplexing and Other Maintenance  Multiplexed redo log files requires multiple members in each group  A log group continues to function as long as it has at least one good member  If all members of the current group become damaged, the database forces a log switch  The database shuts down immediately if a log switch fails
  • 17. Oracle9i Database Administrator: Implementation and Administration 17 Adding a Member to a Group  Add members to groups while the database is running  Do not specify SIZE because new members are automatically assigned the same size as other members in the group  Command syntax: ALTER DATABASE ADD LOGFILE MEMBER '<X:xxx><filename>' TO GROUP <n>;
  • 18. Oracle9i Database Administrator: Implementation and Administration 18 Adding a New Group  Add a new group while the database is running  Specify SIZE and group number  List all members to be created with the group (must be at least one)  Command syntax: ALTER DATABASE ADD LOGFILE GROUP <n> ( '<X:xxx><filename>', '<X:xxx><filename>') SIZE <n>;
  • 19. Oracle9i Database Administrator: Implementation and Administration 19 Renaming or Moving a Redo Log File  Must be done while the group is not ACTIVE  Steps: 1. Shut down the database: SHUTDOWN IMMEDIATE 2. Rename or relocate files using the operating system 3. Mount the database STARTUP MOUNT
  • 20. Oracle9i Database Administrator: Implementation and Administration 20 Renaming or Moving a Redo Log File  Steps (continued): 4. Inform database of changed file name: ALTER DATABASE RENAME FILE '<X:xxx><oldfilename1>', '<X:xxx><oldfilename2>' TO '<X:xxx><newfilename1>', '<X:xxx><newfilename2>'; 5. Open the database: ALTER DATABASE OPEN;
  • 21. Oracle9i Database Administrator: Implementation and Administration 21 Dropping Redo Log Members or Groups Reasons for dropping members or groups:  Bad disk, so must recreate member  Tuning recommendation calls for reducing members or groups  Corrupted members can be deleted and replaced later
  • 22. Oracle9i Database Administrator: Implementation and Administration 22 Dropping Redo Log Members or Groups  Rules when dropping redo log members:  Each group must have at least one member  The group affected must not be ACTIVE and (if in ARCHIVELOG mode) must be archived  Rule when dropping groups:  Database requires at least two groups  The group affected must not be ACTIVE and (if in ARCHIVELOG mode) must be archived
  • 23. Oracle9i Database Administrator: Implementation and Administration 23 Dropping Redo Log Members or Groups Steps to drop redo log member: 1. Query V$LOG to confirm that group is inactive 2. Drop redo log member: ALTER DATABASE DROP LOGFILE MEMBER '<X:xxx><filename>'; 3. Delete associated file in the operating system
  • 24. Oracle9i Database Administrator: Implementation and Administration 24 Dropping Redo Log Members or Groups Steps to drop redo log group: 1. Query V$LOG to confirm that group is inactive: SELECT * FROM V$LOG; 2. Drop redo log group: ALTER DATABASE DROP LOGFILE GROUP <n>; 3. Delete associated file(s) in the operating system
  • 25. Oracle9i Database Administrator: Implementation and Administration 25 Dropping Redo Log Members or Groups Additional notes:  If group is ACTIVE, force log switch: ALTER SYSTEM SWITCH LOGFILE;  If group still active, force checkpoint: ALTER SYSTEM CHECKPOINT;  An alternative to dropping a corrupt group and recreating the members: ALTER DATABASE CLEAR UNARCHIVED LOGFILE GROUP <n>;
  • 26. Oracle9i Database Administrator: Implementation and Administration 26 Archiving a Redo Log Group Advantages of archiving redo log groups:  Point-in-time recovery to a point earlier than online redo log files contain  The ability to query archived log files with LogMiner  The ability to set up and maintain a standby database
  • 27. Oracle9i Database Administrator: Implementation and Administration 27 Finding Redo Log Information in Data Dictionary Views States of a redo log group:  UNUSED  CURRENT  ACTIVE  CLEARING  CLEARING_CURRENT  INACTIVE
  • 28. Oracle9i Database Administrator: Implementation and Administration 28 Viewing Control File Data
  • 29. Oracle9i Database Administrator: Implementation and Administration 29 Chapter Summary  Redo log files primarily contain information on database changes  A database has at least two redo log groups  A redo log group has at least one member  Redo log files support automatic recovery from minor failures  A redo log group with multiple files is multiplexed
  • 30. Oracle9i Database Administrator: Implementation and Administration 30 Chapter Summary  The SCN is incremented at a checkpoint  Maintenance you can do with redo log files and groups:  Add a new file (member) to a group  Add a new group  Rename or relocate a member  Drop a member  Drop a group  Clear a group
  • 31. Oracle9i Database Administrator: Implementation and Administration 31 Chapter Summary  Placing a database in ARCHIVELOG mode causes redo log files to be archived after a log switch  Many initialization parameters set the behavior of the archiving function  The V$LOG and V$LOGFILES dynamic performance views display information about redo log groups and members