Recovery Catalog Data Dictionary Views There are a number of views created when the recovery catalog is created that you canuse to write reporting scripts and the like though Oracle prov
Trang 1STARTUP MOUNT;
SET UNTIL LOGSEQ 6 THREAD 1;
ALLOCATE CHANNEL d1 TYPE DISK;
EXIT;
The RESET DATABASE command can also be used to reset the incarnation of adatabase, so that a previous incarnation’s backup can be recovered Again, this is onlypossible if you are using a recovery catalog An example is shown in Listing 13.28
Listing 13.28: RMAN Database Incarnation Reset
SHUTDOWN IMMEDIATERESET DATABASE TO INCARNATION 1;
RUN{ALLOCATE CHANNEL d1 TYPE DISK;
EXIT;
In this example, all of the available archived redo logs assigned to incarnation 1will be recovered, and the database will be opened to the point at which incarnation
1 ceased to exist By issuing the RESETLOGS command, you create a new incarnation
Storing RMAN Scripts
Another feature of the recovery catalog is its ability to store RMAN scripts that can becalled from RMAN To store scripts in the recovery catalog, you use the CREATESCRIPT command, assigning each script a unique name that identifies it Typically,
Trang 2you will assign the script a name that identifies its purpose, such as backup_prod_db.
Here is an example:
CREATE SCRIPT backup_prod_db{
ALLOCATE CHANNEL d1 TYPE DISK;
BACKUP FULL (DATABASEFORMAT “d:\oracle\admin\ora817\backup\ora817.full.%u”);
SQL “ALTER SYSTEM ARCHIVE LOG CURRENT”;
BACKUP CURRENT CONTROLFILEFORMAT “d:\oracle\admin\ora817\backup\ora817.crtl.%u”;
BACKUP ARCHIVELOG ALLDELETE INPUT
FORMAT “d:\oracle\admin\ora817\backup\ora817.arch.%u”;
RELEASE CHANNEL d1;
}
NOTE When you use a script, you do not need to include a RUN command in it This
is because when you EXECUTE a script, it is executed within the confines of a RUN command
The EXECUTE SCRIPT command, which is a job command, allows you to executethe script Here is an example:
RUN{EXECUTE SCRIPT backup_prod_db;}
ALLOCATE CHANNEL disk1 TYPE DISK;
BACKUP FULL (DATABASEFORMAT “d:\oracle\admin\ora817\backup\ora817.full.%u”);
SQL “ALTER SYSTEM ARCHIVE LOG CURRENT”;
BACKUP CURRENT CONTROLFILEFORMAT “d:\oracle\admin\ora817\backup\ora817.crtl.%u”;
BACKUP ARCHIVELOG ALLDELETE INPUT
Oracle Database Administration
P A R T
II
Trang 3PRINT SCRIPT backup_prod_db;
The DELETE SCRIPT command removes the script:
DELETE SCRIPT backup_prod_db;
Maintaining the Recovery Catalog
Now that you have created the recovery catalog, you need to maintain the records in
it In this section, we will first discuss the recovery catalog views that you can use tocheck the records of the recovery catalog Next, we explain how to perform cross-checking to make sure that physical datafile statuses are properly recorded in therecovery catalog Finally, we will cover how to purge old recovery catalog records
Recovery Catalog Data Dictionary Views
There are a number of views created when the recovery catalog is created that you canuse to write reporting scripts and the like (though Oracle provides its own reportingthrough the LIST and REPORT commands) Most of these views derive their informa-tion from the recovery catalog Many of them have corollary views that derive thesame information from the database control file These views have the same nameexcept for their prefixes: RC_ for the recovery catalog views and V$ for the control fileviews For example, if you want to find the view in the recovery catalog that is likeV$ARCHIVED_LOG, you would look for RC_ARCHIVED_LOG Table 13.12 lists therecovery catalog views, a brief description, and the corollary control file view (if oneexists)
TABLE 13.12: RMAN RECOVERY CATALOG VIEWS
RC_BACKUP_CONTROLFILE Provides information on control files
that are contained in backup setsProvides historical information onarchived redo logs
Trang 4TABLE 13.12: RMAN RECOVERY CATALOG VIEWS (CONTINUED)
RC_BACKUP_CORRUPTION Provides block corruption information V$BACKUP_CORRUPTION
RC_DATABASE_INCARNATION Provides information on all database
incarnations registered in the recovery catalog
RC_OFFLINE_RANGE Lists recovery catalog information on V$OFFLINE_RANGE
the offline ranges for datafiles
Lists recovery catalog information ononline redo log history
Lists recovery catalog information ondatafile copies on disk
Lists recovery catalog information onall datafiles registered in the recoverycatalog
Lists recovery catalog information ondatabases registered with the recoverycatalog
Lists recovery catalog information oncorrupt blocks in datafile copies
Provides recovery catalog resynchinformation, but Oracle recommendsthat you use the RC_RESYNC viewinstead
Lists recovery catalog information onbackup sets for all incarnations of thedatabase
Lists recovery catalog information onarchived redo logs
Lists recovery catalog information onbackup set pieces
Lists recovery catalog information onbackup sets
Oracle Database Administration
P A R T
II
Trang 5TABLE 13.12: RMAN RECOVERY CATALOG VIEWS (CONTINUED)
RC_REDO_LOG Provides information about online
redo logs for all incarnations of the database stored in the recovery catalogRC_REDO_THREAD Provides information about online redo
log threads for all incarnations of the database stored in the recovery catalogRC_RESYNC Provides information on resynch
operations between a target database and the recovery catalog
RC_STORED_SCRIPT Provides information on scripts stored in
the recovery catalogRC_STORED_SCRIPT_LINE Provides detail on each line of each
script stored in the recovery catalog
Cross-Checking Backup Sets
You might wonder what happens if a tape becomes unavailable or is overwritten forsome reason The RMAN CROSSCHECK command can be used to check all backupscurrently on tape and compare (cross-check) them with the cataloged backups Thestatus of the backups will be marked accordingly Any backup not found will be markedwith an EXPIRED status, for later removal If, on the other hand, the backup set has
an EXPIRED status, but it actually exists on the backup media, its status will be set toAVAILABLE Table 13.13 describes the parameters for the CROSSCHECK command
Lists recovery catalog information onall tablespaces, including droppedtablespaces and those from old incarnations
Lists recovery catalog information ondatafile backups made while usingthe proxy copy function
Lists recovery catalog information oncontrol file copies made using theproxy copy function
Trang 6TABLE 13.13: CROSSCHECK COMMAND PARAMETERS
Parameter description
of listObjList Restricts the types of objects operated on by the command to
those specified (See Table 13.15 later in this chapter.)
TAG <tag_name> Defines a tag for a backup set to be cross-checked
completedTimeSpec Defines a time range to run the CROSSCHECK command over
The options are AFTER = {date string} to define when the backup was completed, BETWEEN {date string} and {date string} to define
a time range between backup completions, and BEFORE = {date
string} to define a time range before the backup was complete
NOTE Prior to Oracle 8.1.7, the CROSSCHECK command required the recovery catalog
In 8.1.7, this is no longer the case
Listing 13.29 shows an example of using the CROSSCHECK command
Listing 13.29: RMAN Backup Set Cross-check
E:\oracle\oradata>rman target sys/robert catalog repo_own/repo_own@rmandb
Recovery Manager: Release 8.1.7.0.0 - ProductionRMAN-06005: connected to target database: ORA817 (DBID=1598904557)RMAN-06008: connected to recovery catalog database
RMAN> ALLOCATE CHANNEL FOR MAINTENANCE TYPE DISK;
RMAN-03022: compiling command: allocateRMAN-03023: executing command: allocateRMAN-08030: allocated channel: deleteRMAN-08500: channel delete: sid=8 devtype=DISK
RMAN> CROSSCHECK BACKUP;
RMAN-03022: compiling command: XCHECKRMAN-03023: executing command: XCHECKRMAN-08074: crosschecked backup piece: found to be ‘EXPIRED’
Oracle Database Administration
P A R T
II
Trang 7RMAN-08517: backup piecehandle=D:\ORACLE\ADMIN\ORA817\BACKUP\ORA817.ARCH.31CU1I
QB recid=93 stamp=434162508RMAN-08074: crosschecked backup piece: found to be ‘EXPIRED’
RMAN-08517: backup piecehandle=D:\ORACLE\ADMIN\ORA817\BACKUP\ORA817.ARCH.32CU1I
QJ recid=94 stamp=434162516RMAN-08074: crosschecked backup piece: found to be ‘AVAILABLE’
RMAN-08517: backup piecehandle=D:\ORACLE\ADMIN\ORA817\BACKUP\ORA817.FULL.33CU364C recid=95 stamp=434215057
RMAN-08074: crosschecked backup piece: found to be ‘AVAILABLE’
RMAN-08517: backup piecehandle=D:\ORACLE\ADMIN\ORA817\BACKUP\ORA817.CRTL.34CU367P recid=96 stamp=434215164
RMAN-08074: crosschecked backup piece: found to be ‘AVAILABLE’
RMAN-08517: backup piecehandle=D:\ORACLE\ADMIN\ORA817\BACKUP\ORA817.ARCH.35CU368A recid=97 stamp=434215180
RMAN-03023: executing command: partial resyncRMAN-08003: starting partial resync of recovery catalogRMAN-08005: partial resync complete
RMAN> RELEASE CHANNEL;
RMAN-03022: compiling command: releaseRMAN-03023: executing command: releaseRMAN-08031: released channel: delete
As an alternative, you can issue the CROSSCHECK command using a date range, as
in this example:
CROSSCHECK BACKUP COMPLETED AFTER ‘SYSDATE - 30’;
Purging Old Recovery Catalog Records
We all need to take out the trash from time to time, and this applies to maintainingthe recovery catalog as well as your household Without some reoccurring mainte-nance, the recovery catalog will grow and grow The CROSSCHECK command marksbackups that are no longer available with an EXPIRED status, but this command doesnot remove them from the recovery catalog The DELETE EXPIRED BACKUP command
Trang 8is the one that handles this chore This command will remove all records in the ery catalog associated with expired backups.
recov-NOTE Prior to Oracle 8.1.7, the DELETE EXPIRED command required the recovery log In 8.1.7, this is no longer the case
cata-Listing 13.30 shows an example of using the DELETE EXPIRED command
Listing 13.30: RMAN Recovery Catalog Record Deletion
RUN{ALLOCATE CHANNEL FOR DELETE disk1 TYPE DISK;
CROSSCHECK BACKUP OF TABLESPACE user;
DELETE EXPIRED BACKUP OF TABLESPACE user;
RELEASE CHANNEL disk1;
}
In this example, we first allocate a channel, but this time we use the FOR DELETEsyntax, which indicates to RMAN that we are likely going to be removing some physi-cal backup pieces The CROSSCHECK command will mark as expired all tablespacebackups of the USER tablespace that no longer have physical backup sets The DELETEEXPIRED BACKUP command will then physically remove those backups from RMAN
Housecleaning at its best!
Although the CHANGE command allows you to mark backup items with aDELETED status, currently, there is no RMAN command that allows you to removethese DELETED records from RMAN Fortunately, Oracle has provided the
prgrmanc.sqlscript, which will remove all records that have a DELETED status fromthe recovery catalog This script can be found in the $ORACLE_HOME/rdbms/admindirectory of your Oracle software installation
Generating Reports and Lists
DBAs need information, and RMAN is poised to provide that information RMANfacilitates reporting of backup sets, image copies, and many other facets of the backupand recovery landscape through the use of the REPORT and LIST commands In thissection, we will look at each of these types of RMAN information output
Oracle Database Administration
P A R T
II
Trang 9Producing Backup Reports
The REPORT command provides information on the state of the database with regard
to backups With the REPORT command, for example, you can determine whichdatafiles have not been backed up in a certain number of days You can also generatereports on database datafiles that need to be backed up because UNRECOVERABLEoperations have been performed on them since the last backup
Most output from the REPORT command can be run without a recovery catalog,but there are few exceptions (use of the AT clause parameters, described shortly)
The NEED BACKUP Option
The NEED BACKUP {report criteria} parameter lists all datafiles of the target database
that require a backup (If a file has not been backed up, it will not appear on thereport.) The following report criteria are valid:
• INCREMENTAL {n} sets a maximum number of backups that should be required
for full recovery If this number is exceeded, a level 0 incremental backup isrequired
• DAYS {n} defines the maximum number of days of redo log file application that
any datafile should require Thus, if this were set to 5, any datafile that wasbacked up more than 5 days ago would appear on the report
• REDUNDANCY {n} defines a minimum number of backups or datafiles copies
that must exist for a datafile If this number of copies does not exist, the datafilewill appear on the report
Let’s say that you want a list of all the datafiles in the database that have not beenbacked up in two days Here is the REPORT command and the resulting output thatshows the desired information:
RMAN> REPORT NEED BACKUP DAYS 2;
RMAN-03022: compiling command: reportReport of files whose recovery needs more than 2 days of archived logsFile Days Name
Trang 10The report shows the datafiles that are in need of backup because it would takemore than two days of archived redo logs to recover them This report provides thefile number, the actual number of days’ worth of archived redo logs that would berequired to recover the datafile, and the names of the datafiles themselves.
As another example, suppose that you have decided that you need a minimum ofthree backups of every database datafile to feel that you have a sufficiently redundantbackup strategy These backups don’t need to be at the same time—you just wantthree different backups (you can apply the archived redo logs, of course) So, youmight produce this report:
RMAN> REPORT NEED BACKUP REDUNDANCY 3;
RMAN-03022: compiling command: reportReport of files with less than 3 redundant backupsFile #bkps Name
mini-on the report
The UNRECOVERABLE Option
Perhaps you want to know if any UNRECOVERABLE actions have occurred that mightnecessitate a backup of a datafile You can get this information with the REPORTUNRECOVERABLE parameter:
RMAN> REPORT UNRECOVERABLERMAN-03022: compiling command: reportReport of files that need backup due to unrecoverable operationsFile Type of Backup Required Name
-
-3 full or incremental D:\ORACLE\ORADATA\ORA817\USERS01.DBF
From this report, you see that the USERS01.DBF datafile is in need of either a full orincremental backup This is because you have performed some UNRECOVERABLE
Oracle Database Administration
P A R T
II
Trang 11operation on it Since an UNRECOVERABLE operation does not generate redo, there is
no way to recover that operation with archived redo logs Thus, you need to makesure that you back up this tablespace, or you might lose the objects in it that you cre-ated as UNRECOVERABLE
Report Object Definition
The reportObject clause allows you to define the datafiles that are included in the
report The following are valid parameters:
• DATAFILE {datafileSpec} causes RMAN to report on the datafiles listed You can
list the entire datafile name or use the absolute datafile number
• TABLESPACE {tablespace_name} causes RMAN to report on the datafiles of the tablespaces listed in the tablespace_name parameter.
• DATABASE causes RMAN to report on all datafiles of the current target database
• SKIP TABLESPACE {tablespace_name} causes RMAN to skip the datafiles of the specified tablespaces listed in the tablespace_name parameter.
The OBSOLETE Option
The OBSOLETE parameter lists backups and datafiles that are no longer required andcan be removed It takes the following optional parameters:
• REDUNDANCY {n} defines how many copies of backups must exist in order for a
backup to be considered obsolete For example, a REDUNDANCY of 3 indicatesthat three backups must exist before any backup set can be considered obsolete.REDUNDANCY defaults to a value of 1
• The UNTIL clause defines time constraints for which a backup can be ered obsolete
consid-• ORPHAN defines backups as obsolete because they belong to a previous tion of the database
incarna-The SCHEMA Option and AT Clause
The SCHEMA parameter reports on all datafiles of the target database, including thefile number, name, and size of the tablespace that the datafiles belong to
The AT clause allows you to specify a snapshot point in time that you wish theSCHEMA report to reflect Thus, you can have RMAN provide you with a report of thedatabase datafiles at some specific period of time Use of this parameter requires therecovery catalog The following are valid parameters for this clause:
• AT TIME {date string} reports on the database schema as it looked at a
specific time
Trang 12• AT SCN {n} reports on the database schema as it looked at a specific SCN.
• AT LOGSEQ {n} reports on the database schema as it looked at a specific log
sequence number
The DEVICE TYPE Option
The DEVICE TYPE {device} parameter restricts the report to a specific device For
example, to see information about disk backups, use the command REPORT DEVICETYPE DISK
Producing Lists
Lists are another method of reporting RMAN information Lists provide specific mation on backups, rather than on database datafiles Thus, if you want to knowwhen a specific backup took place, use a LIST report
infor-The LIST command can be used, for the most part, without the recovery catalog(exceptions are noted in Table 13.14) Table 13.14 summarizes the parameters of theLIST command
TABLE 13.14: LIST COMMAND PARAMETERS
INCARNATION Provides information about the incarnations of the target database,
including each incarnation primary key (which is the incarnation keyused to reset the database incarnation if required.) Optionally, you
can add the parameter OF DATABASE {database name} This
com-mand requires the use of a recovery catalog
COPY Provides information about RMAN datafile image copies, archived
redo logs, and image copies of archived redo logs
BACKUP Provides information about RMAN backups, backup sets, and their
related backup pieces Each backup set and backup piece has aunique key associated with it in the report You can use this key withthe CHANGE and DELETE EXPIRED BACKUPSET commands
listObjList Defines the object types to be reported on (see Table 13.15)
completedTimeSpec Defines a range of time for which the reported backup or image
copy should have completed its operation The options are AFTER =
{date string} to define when the backup was completed, BETWEEN {date string} and {date string} to define a time range between backup completions, and BEFORE = {date string} to define a time
range before the backup was complete
Oracle Database Administration
P A R T
II
Trang 13TABLE 13.14: LIST COMMAND PARAMETERS (CONTINUED)
TAG = {tag_name} Restricts the report to those datafiles or datafile copies that contain
the listed tag name
RECOVERABLE Causes the resulting output to be restricted to only those backups
that are candidates for restore operations Thus, backups takenbefore a RESETLOGS operation, for example, are not listed unless thefiles were read-only Also, incremental backups without a basebackup are not listed
DEVICE TYPE Causes the report to be restricted to backups made through specific
{deviceSpecifier} devices (i.e., DISK)
LIKE {string pattern) Allows you to restrict datafile copy reporting by using a filename
matching pattern The Oracle matching patterns ‘%’ and ‘_’ areaccepted
The listObjList parameter is used in the LIST command to define the object that is
to be reported on and in some cases a range of time to report on the specific object
Table 13.15 describes the parameters of the listObjList parameter.
TABLE 13.15: LIST OBJECT LIST PARAMETERS
DATAFILE Defines the datafile, either by name or by absolute file number One
<datafile name list> or more datafiles can be listed
TABLESPACE Defines one or more tablespaces this clause is to act on
<tablespace_name>
archivelogRecord Specifies a range of archive logs for the command to act on
database Specifies to check backup sets or image copies of the current
data-base Optionally, the SKIP TABLESPACE argument causes the check toskip specific tablespaces
controlfile Specifies the current control file
The LIST command can tell you a great deal about the backups on your system.Let’s look at a few examples
Trang 14Listing Archive Log Backups
Suppose that you want to see all archive log backups in the last seven days You wouldissue the following command from RMAN and get the resulting output (the outputformat is slightly modified to fit this page):
RMAN> LIST BACKUP OF ARCHIVELOG FROM TIME ‘SYSDATE - 7’;
RMAN-03022: compiling command: list
List of Backup SetsKey Recid Stamp LV Set Stamp Set Count Completion Time - - - - - -
94 94 434162516 0 434162515 98 04-JUL-01
List of Backup PiecesKey Pc# Cp# Status Completion Time Piece Name - - - - - -
94 1 1 EXPIRED 04-JUL-01 D:\ORACLE\ADMIN\ORA817\BACKUP\
ORA817.ARCH.32CU1IQJ
List of Archived Logs IncludedThrd Seq Low SCN Next SCN Low Time Next Time - - - - -
1 12 423987 423989 04-JUL-01 04-JUL-01
List of Backup SetsKey Recid Stamp LV Set Stamp Set Count Completion Time - - - - - -
97 97 434215181 0 434215178 101 04-JUL-01
List of Backup PiecesKey Pc# Cp# Status Completion Time Piece Name - - - - - -
97 1 1 AVAILABLE 04-JUL-01 D:\ORACLE\ADMIN\ORA817\BACKUP\
ORA817.ARCH.35CU368A
Oracle Database Administration
P A R T
II
Trang 15List of Archived Logs IncludedThrd Seq Low SCN Next SCN Low Time Next Time - - - - -
back-Listing Recoverable Backups
Next, suppose that you want information on the backups in the database that are stillrecoverable You would issue this command and get the following output (the outputformat is slightly modified to fit this page):
RMAN> LIST BACKUP OF DATABASE RECOVERABLE;
RMAN-03022: compiling command: list
List of Backup SetsKey Recid Stamp LV Set Stamp Set Count Completion Time - - - - - -
95 95 434215135 0 434215052 99 04-JUL-01
List of Backup PiecesKey Pc# Cp# Status Completion Time Piece Name - - - - - -
95 1 1 AVAILABLE 04-JUL-01 D:\ORACLE\ADMIN\ORA817\BACKUP\
ORA817.FULL.33CU364C
List of Datafiles IncludedFile Name LV Type Ckp SCN Ckp Time - - -
1 D:\ORACLE\ORADATA\ORA817\SYSTEM01.DBF 0 Full 444015 04-JUL-01
2 D:\ORACLE\ORADATA\ORA817\RBS01.DBF 0 Full 444015 04-JUL-01
3 D:\ORACLE\ORADATA\ORA817\USERS01.DBF 0 Full 444015 04-JUL-01
4 D:\ORACLE\ORADATA\ORA817\TEMP01.DBF 0 Full 444015 04-JUL-01
Trang 165 D:\ORACLE\ORADATA\ORA817\TOOLS01.DBF 0 Full 444015 04-JUL-01
6 D:\ORACLE\ORADATA\ORA817\INDX01.DBF 0 Full 444015 04-JUL-01
List of Backup SetsKey Recid Stamp LV Set Stamp Set Count Completion Time - - - - - -
98 98 434757821 0 434757805 102 10-JUL-01
List of Backup PiecesKey Pc# Cp# Status Completion Time Piece Name - - - - - -
98 1 1 AVAILABLE 10-JUL-01 D:\ORACLE\ADMIN\ORA817\BACKUP\
ORA817.TBS.36CUJO5D
List of Datafiles IncludedFile Name LV Type Ckp SCN Ckp Time - - -
2 D:\ORACLE\ORADATA\ORA817\RBS01.DBF 0 Full 464073 10-JUL-01
3 D:\ORACLE\ORADATA\ORA817\USERS01.DBF 0 Full 464073 10-JUL-01
5 D:\ORACLE\ORADATA\ORA817\TOOLS01.DBF 0 Full 464073 10-JUL-01
Here, you see that you have two recoverable backup sets The first backup set withkey number 95 contains full backups of five database datafiles in one backup piece
The second backup, which is key 98, contains backups of three database datafiles, whichare also full backups This output also shows the physical filenames of the backuppieces involved in the backup, the date of the backup, and the level of the backup forincremental backups
Getting Incarnation Information
You may need to see some basic database incarnation information, especially if youare faced with recovering a database with a backup taken before the RESETLOGS com-mand was issued In this case, you might issue this command:
RMAN> LIST INCARNATION OF DATABASE;
RMAN-03022: compiling command: listRMAN-03025: performing implicit partial resync of recovery catalogRMAN-03023: executing command: partial resync
RMAN-08003: starting partial resync of recovery catalogRMAN-08005: partial resync complete
Oracle Database Administration
P A R T
II
Trang 17List of Database Incarnations
DB Key Inc Key DB Name DB ID CUR Reset SCN Reset Time - - - - - - -
1 138 UNKNOWN 1598904557 NO 423906 03-JUL-01
1 2 ORA817 1598904557 YES 423949 03-JUL-01
This report shows that the database has had two incarnations in its RMAN lifetime.Notice that the DBID remains the same The DB key also stays the same Only theincarnation key (INC KEY) changes Thus, it is a combination of the DB key and theincarnation key that makes each line in this report unique Also of interest is the resetSCN If you ever want to try to recover past the RESETLOGS command, you will needthe reset SCN (See Chapter 10 for more on recovering past RESETLOGS.)
Trang 19T Oracle8i is LogMiner, which provides the tools to retrieve the information in
redo logs
This chapter begins with an introduction to LogMiner We will then show you how
to set up LogMiner and use it to mine redo logs
Introducing LogMiner
LogMiner is a powerful add-on feature to the Oracle database that lets you “mine” theinformation in redo logs LogMiner is embodied in two PL/SQL packages and someviews
As you’ve learned, redo logs contain a record of almost every transaction andchange that occurs in the database The information contained within the redo logscan be used for a number of database management tasks, including the following:
• Security review and auditing
spe-• You can analyze redo logs that belong to one database in a completely separatedatabase
• The SQL to undo or redo the transaction is provided when the redo log ismined
Trang 20Oracle Database Administration
• LogMiner cannot be used with Oracle7 (or earlier) database redo logs LogMinercan be used with redo logs from an Oracle8 database, but it runs only on Oracle8idatabases
• The database that you are mining and the database doing the ANALYZE processmust have the same character set, database block size, and hardware platform
• Operations on the following objects are currently not supported by LogMiner:
• Index-organized tables
• Clustered tables and indexes
• Nonscalar datatypes (types created with the CREATE TYPE command)
These steps are described in the following sections
Establishing a UTL_FILE_DIR Entry
The UTL_FILE_DIR entry in the database parameter file defines a directory where cle can open, close, read, and write physical files using the UTL_FILE package Here is
Ora-an example of the UTL_FILE_DIR setting in the init.ora file:
UTL_FILE_DIR=”e:\oracle\oracle_output”
LogMiner uses the UTL_FILE package to write out a dictionary file, described next