Backup recovery oracle Phuocbeo blog – [PDF Document]
-
Oracle Backup and Recover 101
Osborne Press
ISBN 0-07-219461-8
First Printing
Personal Note from the Authors
Thanks for your purchase of our book Oracle Backup & Recovery 101. In our attempt
to provide the best book we could to guide you to a solid understanding of backup and
recovery concepts and instructions, we painstakingly edited each chapter several times at
many stages of development. Unfortunately, despite our efforts and those of the
publisher, several errors made it into print. With each printing, we will identify any errors
and post them in this document. If you find an error found in your copy that have not
been listed in this document, please email us at [email protected]. We
appreciate your input.
The authors,
Kenny Smith & Stephan Haisley
Errata Listing
In this document, we identify content errors that you may have in your copy of the book.
Formatting, minor typographical and presentation errors are not included in this errata
listing. In many cases in this listing we are including the entire sentence, displaying the
-
current text that may be found in your book. We use a strike through font to show the
words wed like to replace. We use a red color to denote the words we like to add. If a
paragraph is has major changes, we show the paragraph before and the revised paragraph
in full.This will make it easier for you to see how we intended the text to read in the
book.
Introduction
Page xix – paragraph 5
By configuring database archiving of all redo log files, you can recover the database
completely or to a point in time.
Page xx – paragraph 1
Lastly, youll incompletely recover the database while using an open database backup.
Page xx – paragraph 6
All database transactions are logged to files. You can mine those files for the SQL
commands contained within them.
Page xxi – paragraph 1
LogMiner provides the means to extract the SQL commands within your log files. You
can retrieve the transactional statements from the redo log files, which can then be re-
applied to a database. During this chapter, you will analyze the contents of redo logs.
Using the transactions statements retrieved, youll be able to explore how to make use of
the SQL by applying it to the database.
Page xxi – paragraph 2
These seven chapters will also assist an old time DBA to migrate to a new skill
set from the old tried-and-true user managed techniques. Most of the tasks discussed in
Part Two can be accomplished quickly and easily by RMAN. Therefore, you can easily
-
contrast how you perform a specific task via user-managed method with the equivalent
server-managed method.
Chapter 1
Page 7 – paragraph 6
This way, the picture looks as it did before Sid accessed changed the picture frame.
Page 12 – paragraph 7
(This paragraph belongs outside the gray box).
After being introduced to Sids family house, you can see that he has
structures for all family procedures. Like this family operation, an Oracle
database has places, processes, and procedures. With this family analogy in
mind, Ill now briefly describe Oracle database structures, processes, and
operations that pertain to Oracle Backup and Recovery. Maybe youll
recognize some similarities to Sids family.
Page 13 – paragraph 3
This area of memory that is allocated when the instance is started and is split up into
three main sections:
Page 15 – paragraph 1
It represents a consistent committed version of the database
Page 17 – paragraph 4
They are called online because they must be online and available for the database to use.
-
Page 18 – paragraph 2
Change the note to
Nologging and Redo
You can turn off the logging of data block changes for certain operations by
setting the NOLOGGING attribute for a table, partition, index, or tablespace. Normal
SQL will create redo on a NOLOGGING object. Operations that will not create normal
redo for changes include:
– Direct load using SQL*Loader
– Direct-load INSERT
– CREATE TABLE … AS SELECT
– CREATE INDEX
– ALTER TABLE … MOVE or SPLIT PARTITION
– ALTER INDEX … SPLIT or REBUILD PARTITION
– ALTER INDEX … REBUILD
These operations still generate redo records, but they are classed as ‘invalidation records’
and are very small compared to standard data block redo records. Because redo is not
being generated from these data changes, the blocks affected must be invalidated should
redo be applied to them. This means that once a NOLOGGING operation has been
performed on objects, particularly tables, a fresh backup must be made of the datafiles
containing them. If this is not done and an old backup is restored with the invalidation
redo records being applied to the database, the next time you try and access the object
you will get block corruption errors. When you prevent normal redo from being written,
you trade better performance for data recoverability.
Page 24-25 Bullets
Change the order of these bullets and add some text.
Creates operation codes and data required to undo the block change into an undo
segment (rollback segment). This also creates redo vectors before making the
undo segment block changes.
Records the redo records to the redo log buffer.
-
Page 25 Gray box
Replace the gray box with this text.
(s)The Life of a Database Transaction
A user named Jim changes his home phone in the Employee Application from
111-222-3333 to 111-222-4444. He makes his change via a form in a browser. What
happens to his phone number information? Say the employee table has a column named
phone and the employee table is in a tablespace named Users. The Users tablespace is
made up of a file named user.dbf.
When Jim submits his change, the block containing his employee row is fetched
from datafile user.dbf and read into the buffer cache. Before the changed phone number
is placed in the data block in memory, a redo record gets written to log buffer. The redo
record notes the block change from the old state to the new state. Next, undo information
gets written to a rollback segment named RBS (in case Jim changes his mind and so other
users can see his old phone number until he commits his change). After the redo and the
undo is created, the data block containing Jim’s row is changed. When Jim commits his
change, a commit record is written to the log buffer. The log buffer is then flushed to the
current online redo log. The undo blocks in the rollback segment are also freed.
While Jim clicks on his sports web page to check the scores, the online redo log
fills up. The database begins writing to the next empty redo log. If the data block
containing Jim’s phone number change has not been written out to disk due to lack of
space in the buffer cache it will be written out during the checkpoint. The archiver begins
to copy the online redo log containing Jims transaction details. Once the archiver is
finished, Jims new phone number exists in two locations a database block in a file
called user.dbf and in an archive log file in the archive destination.
Page 27 Bottom bullets
CKPT updates the control files and datafile headers with checkpoint details.
The checkpoint gets logged in the alert log file.
-
Page 28 paragraph 1
When the database is shut down, various tasks occur depending on the shutdown
method:
Page 29 paragraph 1
Log switch Logan switches notebooks to hold picture negatives. An Oracle database
stops writing to an online redo log file and begins writing to another.
Chapter 2
Page 40 paragraph 2
This must be done because after an incomplete recovery, you do not need any of the redo
after this time.
Page 41 paragraph 1
production database or the tablespaces
Page 46 paragraph 6
possibly use extra recovery
Page 52 Question 4
The correct answer is only D. The A should be removed.
Chapter 3
Page 55 Paragraph 5
During this chapter, you will install Oracle software, create two databases, .
Page 60 Task 2
This Java program is named the Oracle Universal Installer.
1. Install Oracle Enterprise Version 8.1.7. Your software version option may have
different numbers in the last two digits, but make sure the first three digits are 8.1.7.
-
2. For a Linux install, enter /app/oracle/product/8.1.7 in the Path field for the
ORACLE_HOME directory.
3. For a Windows NT in the Oracle Home Name field, type 817. In the Path field, type
D:\app\oracle\product\8.1.7. Oracle on Windows NT has named Oracle Homes; Linux
does not.
Page 64 Task 1
LINUX> $ORACLE_HOME/bin/dbassist &
WINNT> %ORACLE_HOME%\bin\launch.exe %ORACLE_HOME%\assistants\dbca DBAssist.cl
Page 67 Exercise 3.3
The amount of total time is 55. (Not 50)
Page 77 Middle of page
SQL> execute DBMS_JOB.INTERVAL (1,null,null,’sysdate+1′); –Every day SQL> execute DBMS_JOB.INTERVAL (1,null,null,’sysdate+1/24′); –Every Hour SQL> execute DBMS_JOB.INTERVAL (1,null,null,’sysdate+1/(24*60)’); –Every Minute
Chapter 4
Page 86 Figure 4-1