Albert van der Sel Antapex Technologies B.V. version 0.12 30/09/2008
Important: This is a
, and is by no means
at least some basics
ore (and recover) an
This manual is suitable for Oracle 9i, 10g, and 11g. Ofcourse, there are differe
nces between tho respect to backup and recovery, the differences are actually no
t too big . But please be aware interresting features that are not mentioned in
this document.
What is in this file? This sheet explains some basic features on the subject of
"how to create backups". The second sheet, "Examples_and_Notes", shows some exam
ples of rman backup and recovery scripts. The third sheet, "Dictionary_views_tar
get_db", will show you which dictionary views (of the Tar The fourth sheet, "Som
eDisasterRecoveryScenarios", will show you some important problems from wh
1. What to backup? What should you include in a database backup?
The Oracle literature distinguishes two types of backups you can make of an Orac
le database: 1. Physical backup: 2. Logical backup:
That is a copy of all relevant database files to tape(s) or backup This is a ful
l or partial export of the contents of the database (e indexes, procedures etc..
) to one or more file(s).
So what type of backup should you choose? Actually, most dba's do both types of
backups, whereas is regarded as the most important backup, that is, it s the backup
you probably will use in case The logical backup is then probably scheduled less
frequently and can be used as some sort of "l way for an easy restore of an obj
ect (like a table).
Let's first take a look at what exactly should be backupped frequently. We will
use an example o Oracle database, let's call it "PLANNING", which, in this examp
le, contains of a small number of The whole organization of the Oracle Software,
and the actual database, could be as in the follo We can distinguish 3 "areas"
so to speak: I Software (Static stuff) This is just the Oracle Software. Those f
iles are "static" and remains the same unless you to plan to do an upgrade, or i
nstall a patch.
Location of Oracle Software ( ORACLE_HOME ) This is where the software (binaries
, libraries etc..) lives. for example in the location: /opt/ora10g/product/10g/
- big tree of - subdirectories
But, in a default installation, also some logs can be found here, for example th
e "listener.log", but those logs are not directly critical for the operat of the
database.
In our example, the Oracle software was installed in /opt/ora10g/product/10g but
evidently, this could also have been another path, like e.g. /home/oracle or /u
01/ II Databasefiles (Will change constantly while the database is open)
Example locations of the database files
/u01/oradata/planning/planning_data01.dbf /u02/oradata/planning/planning_indx01.
dbf /u03/oradata/planning/users.dbf /u03/oradata/planning/system.dbf /u03/oradat
a/planning/sysaux.dbf /u03/oradata/planning/temp.dbf /u03/oradata/planning/undo.
dbf /u04/oradata/planning/redo01.dbf, redo02.dbf, redo03.dbf /u05/oradata/planni
ng/control01.dbf, control02.dbf, control03.dbf These are the "real" database fil
es. Here all modifications to all tables and indexes (and other objects) are col
lected. III Admin/Log directories ("Fairly" static stuff)
Administrative Logfiles and the socalled "parameter file" are usually stored in
a directory like for example: /dbms/oracle/admin This directory usually contains
several subdirs like "dump", "udump", "cdump", "audit" which contains several l
ogfiles, like the main log file "alert.log" where all important events (and orac
le errors) are logged. It can contain also the directory "pfile" where the param
eter file "init.ora" or "spfile.ora" can be located. Such a parameterfile contai
ns all kinds of settings for the Oracle instance (like how much memory it may us
e, or how many processes can be concurrent at a time). Evidently, also this path
could be somewhere else like /home/oracle/admin or some other filesystem or dir
ectory of your choice.
So when we talk about a "backup the database", we talk about creating a copy of
the files in se the true databasefiles, that is, "where the data lives". However
trivial that former statement may be, its important to know what exactly you ne
ed to bac if you want to backup the true database data. Note: What is a tablespa
ce?
In this document, we sometimes come across the concept of "tablespace". A databa
se consists of a number of files, like our planning database shown in II. But or
acle also uses the logical concept of "tablespace". A tablespace has no meaning
to the OS, because the OS only knows of files. But in Oracle, you could create a
tablespace consisting of 1 or more files. The purpose of a tablespace is at lea
st twofold: performance gain, and neat administration. 1. Possible performance g
ain:
Suppose you have a large database with large tables. It would have been nice if
you could store a large table over multiple files, over multiple file This could
benefit performance. So, suppose I create the tablespace "PLANNING_DATA", and I
want to let it have two files: CREATE TABLESPACE PLANNING_DATA DATAFILE '/u01/o
radata/planning/planning_data01.dbf' DATAFILE '/u02/oradata/planning/planning_da
ta02.dbf' EXTENT MANAGEMENT LOCAL; SIZE 1000M, SIZE 1000M,
That would work. Note that the tablespace consists of two files, over two separa
te filessystems Now I could create a table, for example EMPLOYEES, and let it "l
ive" in tablespace PLANNING_DATA CREATE TABLE EMPLOYEES ( employee_id number, em
ployee__name varchar(50) ) TABLESPACE PLANNING_DATA;
Now I know for sure on which files the table will be on. Additionally, if the ta
ble gets very la I could benefit from "parallel IO" because of the two independe
nt filesystems (assuming those ar Now, since in my example database, I only have
one physical file "planning_data01.dbf", I have used the following CREATE TABLE
SPACE command: CREATE TABLESPACE PLANNING_DATA DATAFILE '/u01/oradata/planning/p
lanning_data01.dbf' EXTENT MANAGEMENT LOCAL; 2. Neat Administration: SIZE 1000M
The dba can create multiple tablespaces, maybe not only for performance reasons,
but also for Ad Would it not be great if you, for example, separate your tables
and indexes on separate tablespa Also, maybe there are several "schema's" (user
account) in your database, and you would create a if you separate those objects
in their own tablespaces.
2. Tools and commands you use to backup a database.
We already have seen that Oracle itself, makes a distinction between a physical
backup and a log In a moment, you will see that there is also a difference in a
socalled "open" backup, that is, while the database is open, and a socalled "clo
sed" backup, where the database is shutdown. You will see that the Oracle suppli
ed utility "RMAN" is THE tool to backup a database. However, the following tools
and commands can be used to backup an Oracle database: Tool
exp (Oracle supplied expdb (Oracle supplied rman (Oracle supplied OS commands li
ke cp, tar, cpio etc.. third party tools that rman utility) utility) utility)
type of backup
logical logical physical physical physical
use
Now you may have seen on, for example a unix system, that the sysadmin is using
Tivoli TSM (or o for filesystem backups. Those types of tools may ALSO have been
configured with the add-on product TDPO, so that (open) can be backupped as wel
l. So it might look to you as if the above table is not complete ! That's not tr
ue. Almost all of those professional backup software suites, that are configured
for making Oracle backups as w uses the Oracle's RMAN utility "under water", so
it's not immediately obvious that really rman is creating the Oracle backups.
Now we give some examples in creating a backup of a database. Do NOT take these
as "live" or "us because we still NEED to excplain the difference between a data
base in archive mode and in non-a
So, creating backups could be similar as in the following examples: (do not take
s these for as " If you need to see examples that can be used for real, please s
ee section 4. I: Physical backup using OS commands like cp or tar:
Suppose the Planning database is shutdown. This means that no process is acting
on the databasef of "cold" files at this time. This is very important, otherwise
we COULD NOT use the commands as As an example we could give the following comm
and sequence: # # # # # # cp cp cp cp cp cp /u01/oradata/planning/planning_data0
1.dbf /backup/planning /u02/oradata/planning/planning_indx01.dbf /backup/plannin
g /u03/oradata/planning/users.dbf /backup/planning /u03/oradata/planning/system.
dbf /backup/planning /u03/oradata/planning/sysaux.dbf /backup/planning /u03/orad
ata/planning/temp.dbf /backup/planning
# cp # cp # cp
/u03/oradata/planning/undo.dbf /backup/planning /u04/oradata/planning/redo0* /ba
ckup/planning /05/oradata/planning/control* /backup/planning
or backup the files to tape with for example tar: # # # # # tar tar tar tar tar
-cvf -cvf -cvf -cvf -cvf /A589 /u01/oradata /dev/rmt1.1 /u02/oradata /dev/rmt1.1
/u03/oradata /dev/rmt1.1 /u04/oradata /dev/rmt1.1 /u05/oradata Or something lik
e this on your unix and tape device: # # # # # tar tar tar tar tar -cvf -rvf -rv
f -rvf -rvf /dev/rmt/0hc /dev/rmt/0hc /dev/rmt/0hc /dev/rmt/0hc /dev/rmt/0hc
/u01/orada /u02/orada /u03/orada /u04/orada /u05/orada
The exact form of the tar commands, depends ofcourse how your tapedrive or class
is called..
Now, if the database was indeed down, this was a valid backup. If the database w
as open, and thu this backup was not valid, because the shared databases files a
re accessed by potentially many processes, possibly modifying blocks while the d
atabase backup was running.
Notes: 1. On some unixes, rmt1.1 is the non-rewinding class of the tapedrive on
rmt1, in contrast with Be very sure to know what is your non-rewinding device, o
r you will only have the last file o 2. The commands above could have been in mu
ch smarter format like "cp with using ranges with bra 2. Logical backup using "e
xp" and "expdp" utilities:
Suppose the Planning database is open. Now, that s actually a requirement if we want
to use the We will create a logical backup, that is, all objects (tables, index
es, procedures and all other will be put nicely in one (or more) files. This fil
e can be used if we want to restore the whole only some objects (like some table
s or so). Here are some examples: This is a full database backup: # exp system/m
anager@planning file=planning_06062008.dmp full=y log=planning_06062008.log This
is a backup of just one table, namely the table "JOHN.SALES": # exp system/mana
ger file=sales.dmp tables=JOHN.SALES This is a backup of all objects in one sche
ma (useraccount in the database. In this example, we # exp system/manager file=h
arry.dmp owner=HARRY
Note: The "system/manager@planning" part in upper commands should be read as "ac
count/password@connect whereas "system" is one of the standard administrative su
perusers in the database. Actually, every Oracle database has two very important
superusers, namely "sys" and "system", wh has all possible powers in the databa
se. But you can make perfect full dabase exports using syst
Although the "exp" utility is available in 9i,10g, and 11g, as from version 10g,
Oracle strongly to use the "expdp" utility instead (but many dba's still use th
e exp utility).
As an example of the expdb utility: # expdp scott/tiger@db10g tables=EMP,DEPT di
rectory=TEST_DIR dumpfile=EMP_DEPT.dmp logfile=expdp 3. Making a backup using th
e RMAN utility:
The rman utility
hat are availabl
oduced as in the
executable from
is quite good. In any case much better than the other options t
Once correctly "configured", a full database backup could be pr
following exampl while the database is open: Just call the rman
the prompt: # rman The rman prompt appears:
RMAN> Now, in this example, you could type the following commands: RMAN> run { 2
> backup database plus archivelog; 3> delete noprompt obsolete; 4> }
If you don't understand the upper command, that's allright, because we still nee
d to explain rma And that will be done in section 4.
The advantages (although its probably not obvious) is that rman will figure out
where to store b keep a repository of all recent backups, and it will compress b
ackups (saving space on disk or t
As promised before, in section 4 we will explain exactly how to make correct bac
kups, and how to
3. Database in Archive log or non Archive log.
Before we go into the real specifics of backup and restore, we need to know what
the differences a database that s in "archive mode", and a database that s not in archi
ve mode. Before we explain that, here is a general dba rule: Production database
s should really run in archive mode. If not, you might risk loss of data.. Test
/ development databases might be in non archive mode.
If we take a look at our sample database, planning, we only have a few files. Bu
t Oracle databas or thousends of files. Our "planning" database consists of the
following files: planning_data01.dbf planning_index01.dbf system.dbf undo.dbf te
mp.dbf sysaux.dbf redo01.dbf redo02.dbf redo03.dbf control01.ctl control02.ctl c
ontrol03.ctl
file, created by the dba, and ment to contain the application table file, create
d by the dba, and ment to contain indexes (of the appli "standard file" and cont
ains the dictionary (metadata) "standard file" and contains undo data for transa
ctional consistenc "standard file", contains only temporary data from querys tha
t prod "standard file", contains stuff we do not consider in this note. Co redo
logfile redo logfile redo logfile control file control file control file
So, the .dbf files, are the files with data. (actually, Oracle does not mind wha
t file extension is in place) Some files are just "there", just after you have c
reated a database: these are "standard files" or the undo tablespace, which cont
ains the "former" values of tabledata if users do DML (insert, In our sample dat
abase, the by the dba created files "planning_data01.dbf" and "planning_index0 a
re specifically created to contain all the application tables and indexes.
Now what are the redo*.dbf files for? In our sample, we have three of those file
s, but there cou That's the choice of the dba. By the name of these files, you m
ight even have guessed there purpose: they are "logs" to make t of transactions
possible in case of a malfunction (crash) of some sort.
Here is how a transaction works: A user does an insert, or update, or delete sta
tement on table(s). These changes are captured in in RAM (logbuffer), and once t
he user commits his or her transaction, those changes are immediat the current r
edolog, for example redo03.log. Why not write directly to the real database file
s, like the planning files?
That is because professional databases uses "write ahead" logs that captures cha
nges. Ofcourse, the changed data will also be written to the true database file
(very) shortly after the capture in the current redolog.
Why is that organized in that way? Actually, we have two "writes" of changes: Fi
rst a process (l immediately in the current redolog, then shortly after that, an
other process (db writer) writes to the actual databasefiles. This is more fails
afe than that the db writer was the only process writing changes. Ofcourse, th m
ore overhead this way.
Suppose a crash occurs. The current redolog has all commited changes captured.Wh
en the database a process called "recovery and rollback" takes place, which mean
s that all uncommited changes wi all committed changes (which were not yet writt
en to the databasefiles) will be redone (redone).
Now, in our example we have three redologs. They are used one after the other, t
hat is, if redo0 the system will use redo02.dbf. If that one gets full also, the
system will use redo03.dbf. What happens if redo03.dbf gets full also? The syst
em has no other choice than to return to redo and starts using that one again! S
o, the use of the logs is somewhat "circular", that is: use th one after the oth
er, and if all are used, return to the first redolog and start using that one a
redo01.dbf use this one
redo02.dbf then use this one redo03.dbf then use this one
if redo03.dbf is full then use redo01 again
Note: So please note that the database is using one redolog at the time. (If you
follow Oracle's you would have multiplexed the redologs, so that every logfile
has a mirror on another filesyste
Suppose our planning database is still in non archive mode. If we place it in ar
chive mode, Orac different behaviour with regards to the redologs. This is what
happens in archive mode: if the s to re-use a certain redolog, it will FIRST MAK
E A COPY OF THAT FILE AND STORE THAT COPY IN SOME This location, where the "arch
ived" redologs are stored, is usually called "archive log destinat which is ofco
urse just some filesystem or directory on your host machine. So, we still have o
ur three Online redologfiles (redo01.dbf, redo02.dbf, redo03.dbf) but because ar
e created at some "archive log destination", we build a history of all changes t
hat occurred o Sure this means some extra Administrative maintenance. Somebody n
eeds to take care of those arch because after weeks or months, those archives ca
n fill up your disk(s). The archived redologs plays an important role in recover
y of the database.
Now, we do not ask from you to understand the script below. Its an RMAN script,
and notice that archived redologs, and after backup, it deletes them, thereby im
plementing some automatic mainte run { allocate channel t1 type 'sbt_tape' parms
allocate channel t2 type 'sbt_tape' parms backup full database ; backup (spfile
) (current controlfile) ; sql 'alter system archive log current'; backup archive
log all delete input ; release channel t1; release channel t2; }
'ENV=(tdpo_optfile=/usr/tivoli/tsm/clie 'ENV=(tdpo_optfile=/usr/tivoli/tsm/clie
(Actually, it will copy complete block(s) to the online redologs if such a block
is being modifi your OS command is running against that particular file). And w
hen you are ready using your OS command, you signal Oracle to place the tablespa
ces in their "normal" mode again, by using the SQL command "ALTER TABLESPACE <ta
ble_space_name> END BAC So how do you use OS commands at an open Oracle database
(that is running in archive mode)? As an example, we show how to do this for ou
r PLANNING database. For easy reference, we show again on which filesystems the
database files resides: File: /u01/oradata/planning/planning_data01.dbf /u02/ora
data/planning/planning_indx01.dbf /u03/oradata/planning/users.dbf /u03/oradata/p
lanning/system.dbf /u03/oradata/planning/sysaux.dbf /u03/oradata/planning/temp.d
bf /u03/oradata/planning/undo.dbf /u04/oradata/planning/redo01.dbf, redo02.dbf,
redo03.dbf /u05/oradata/planning/control01.dbf, control02.dbf, control03.dbf
So, to create the backup of the Oracle PLANNING database while its running, goes
as shown below. But beware that the script is not yet complete! SQL> SQL> SQL>
SQL> SQL> SQL> alter alter alter alter alter alter tablespace tablespace tablesp
ace tablespace tablespace tablespace SYSTEM begin backup; PLANNING_DATA begin ba
ckup; PLANNING_INDEX begin backup; USERS begin backup; SYSAUX begin backup; UNDO
begin backup;
SQL> ! tar -cvf /dev/rmt/0hc /u01/oradata SQL> ! tar -rvf /dev/rmt/0hc /u02/orad
ata SQL> ! tar -rvf /dev/rmt/0hc /u03/oradata SQL> SQL> SQL> SQL> SQL> SQL> alte
r alter alter alter alter alter tablespace tablespace tablespace tablespace tabl
espace tablespace SYSTEM begin backup; PLANNING_DATA begin backup; PLANNING_INDE
X begin backup; USERS begin backup; SYSAUX begin backup; UNDO begin backup;
And if the archived redologs are in "/u06/archives", you add to your backup comm
ands: SQL> ! tar -rvf /dev/rmt/0hc /u06/archives Notes: 1. From the sqlplus util
ity you can issue OS commands by preceding them with the "!" character. 2. You c
an also exit sqlplus, do the OS commands, and enter sqlplus again. Since Oracle
10g, you can tell Oracle in one statement that you are going to use OS commands
to backup the tablespaces. Just take a look at the following listing, which has
the same effect as the script above: SQL> SQL> SQL> SQL> SQL> SQL> ALTER ! tar !
tar ! tar ALTER ! tar DATABASE BEGIN BACKUP; -cvf /dev/rmt/0hc /u01/oradata -rv
f /dev/rmt/0hc /u02/oradata -rvf /dev/rmt/0hc /u03/oradata DATABASE END BACKUP;
-rvf /dev/rmt/0hc /u06/archives
So you do not need the separate ALTER TABLESPACE commands in Oracle 10g/11g. Iss
ues with online redologs and control files: Now we are pretty close to a correct
and complete backup script, but what we see above
is still not complete! You will notice that I have left out the "/u04" and "/u05
" filesystems. Why? Is it not neccesarry to backup the redologs and controlfiles
? Yes, but again we have the open file issue. The "ALTER TABLESPACE.." or "ALTER
DATABASE.." commands make it possible to backup the files belonging to the tabl
espaces, but there's still an issue with the online redologs (which are not tabl
espaces). Actually, when we are backi there could be a lot of activity on the on
line redologs. So an OS command is not the way to backup those structures. So ho
w do we handle this then? As you know, the contents of the online logs is most v
aluable if we need to recover the database with the latest transactions. The sol
utions is TO ARCHIVE THE ONLINE LOGS with the right commands in our backup scrip
t. If we know of a way to archive, or copy, the current log to the archive desti
nation, we produce "a cold" file that we can easily backup with an OS command. T
his way, even if the current online log wasn't even "full", we have all the late
st transactions in our new archived redolog. Fortunately, we can archive the cur
rent online redolog with: SQL> alter system archive log current; So if we add th
at statement to our backup script, we have the transactions in the redologs cove
red as well.
Sofar we have the tablespaces covered and the contents of the redologs. What is
left are the con Also here we have an open file issue that cannot be easily hand
led with an OS command. Before we go furthur, we need to know what exactly a con
trol file is. Well, the real data (tables and indexes) are in the tablespaces. T
he controlfile only contains "metadata" of the database, such as which files bel
ong to the database as well as some historical data. Now you might argue that th
e SYSTEM tablespace contains the real metadata of the database. Sure the SYSTEM
tablespace contains every metadata, such as which files belongs to the database,
which tables and indexes and other objects are present, which user has rights o
n which objects etc.. But before the Instance (Oracle software) can find and ope
n the tablespaces, it needs a (small) file which contains "just enough" metadata
to get the database mounted. Indeed, the Instance only needs one controlfile. A
ll the others are just safety copies which the database will keep in sync. Norma
lly, the dba makes a choice on how many controlfiles he or she wants. In a defau
lt installa the number of controlfiles is usually three. If you want to backup t
he controlfile, you only need one copy.
Oracle recommendation: Use a minimum of two multiplexed or mirrored control file
s on separate di
We can use the following SQL command to create a backup of the controlfile: SQL>
ALTER DATABASE BACKUP CONTROLFILE TO '/u06/backup/cf.bak' REUSE; (Specify the R
EUSE option to make the new control file overwrite one that currently exists.) S
o, now we have arrived to a usable backupscript using OS commands to create a ba
ckup of our PLANNING database which is open and running: SQL> SQL> SQL> SQL> SQL
> SQL> SQL> SQL> SQL> alter ALTER ! tar ! tar ! tar ALTER ! tar ALTER ! Tar syst
em archive log current; DATABASE BEGIN BACKUP; -cvf /dev/rmt/0hc /u01/oradata -r
vf /dev/rmt/0hc /u02/oradata -rvf /dev/rmt/0hc /u03/oradata DATABASE END BACKUP;
-rvf /dev/rmt/0hc /u06/archives DATABASE BACKUP CONTROLFILE TO '/u06/backup/cf.
bak' REUSE; -rvf /dev/rmt/0hc/ /u06/backup
Or on your Unix, it might look like this:
we will limit ourselves here to prompt oriented sessions. RMAN has some importan
t advantages over OS commands: 1. Compression: your backups can be compressed. 2
. "Automatic" history of your backups, of which you can retreive lists and repor
ts. 3. Faster and slimmer backups because rman "knows" what to backup of files,
compared to the rather "crude" OS commands, which has a file as its granular met
ric. 4. If you want, with rman you can create full and incremental backups. 5. I
n case of a corrupt database block, rman can perform blockrecovery. So, the larg
er your database is, the more advantages you will have in using rman.
But be carefull. Every Oracle RDBMS version has bugs, of which fixes and patchse
ts will be relea Also, on your Oracle version, rman could have some nasty bugs.
It has happened before. Be sure t and check whether you need a fix or patchset.
5.1 Some notes about the RMAN architecture, and creating the catalog.
RMAN creates backups of your database. But you can use rman with multiple databa
ses, possibly on different host machines. Any way, whether you use rman to backu
p a single database, or many databases, rman needs a "repository" to store some
vital data like which backupsets are associated to which database, the pieces th
at belong to the sets, and all kinds of other usefull information. This reposito
ry is called the "rman catalog". You can use the following repositories: 1. The
target's database controlfile (belonging to the database which rman will backup)
or 2. A separate small database, especially created to store rman's metadata. A
ctually, only a separate rman tablespace and a user rman is required. So you cou
ld use an existing database for holding the rman repository. But if that databas
e is an important target database (to backup), then, ofcourse, its silly to use
that database.
Although you might not be happy to create a separate database, just for holding
rman's metadata, only a very small database is required with an rman tablespace
(which does not need to be larger than 100M). Ofcourse, if a database is used as
the rman catalog, much more historical data can be stored, in comparison to a c
ontrolfile. Now above we said that either the target's controlfile can be used,
or a separate database can be used as the rman catalog. Well, even if a catalog
database is present, the controlfiles of the targetdatabase(s) will always conta
in the latest rman backup information, so its actually to avoid using the contro
lfile as metadata for rman. Even stronger, the controlfile remains Authorative i
n the sense that this "latest info", and per will be transferred to the catalog.
That s called synchronizing the catalog. But the rman catalog database can hold muc
h more data, and more types of data, then the target's controlfile. In the contr
olfile, only the last backups are listed.
server session(s)
RMAN backupjobs / scripts
target database
target's controlfile
rman catalog which is a small Oracle database
Remark: should one backup that
(which you want to backup)
backup tapes or
A number of tables and views are installed in the database PRODRMAN, and those o
bjects live in the tablespace "rman". You can expect something like the followin
g to exist in the PRODRMAN database: SQL> select table_name, tablespace_name, ow
ner 2 from dba_tables where owner='RMAN'; TABLE_NAME TABLESPACE_NAME ----------------------------- -------------------------AL RMAN DATA BCB RMAN DATA BCF RMAN
DATA BDF RMAN DATA BP RMAN DATA BRL RMAN DATA BS RMAN DATA CCB RMAN DATA CCF RM
AN DATA CDF RMAN DATA CKP RMAN DATA CONFIG RMAN DATA DB RMAN DATA DBINC RMAN DAT
A DF RMAN DATA DFATT RMAN DATA OFFR RMAN DATA ORL RMAN DATA RCVER RMAN DATA RLH
RMAN DATA RR RMAN DATA RT RMAN DATA SCR RMAN DATA SCRL RMAN DATA TS RMAN DATA TS
ATT RMAN DATA XCF RMAN DATA XDF RMAN DATA
RMAN RMAN RMAN RMAN RMAN RMAN RMAN RMAN RMAN RMAN RMAN RMAN RMAN RMAN RMAN RMAN
RMAN RMAN RMAN RMAN RMAN RMAN RMAN RMAN RMAN RMAN RMAN RMAN
Those tables (and the views) have all specialized purposes to store the metadata
. Like for example, table DB, which listst all "registered" databases. You may o
fcourse query the tables and the views, but you can also retrieve all kinds of r
eports from the RMAN> prompt (which itself does query the tables and views). You
absolutely do not have to interface to those tables and views. Just use the rma
n executable to retrieve info and reports. As the last we register To do this, T
hat can be step we need to register the target database. In the following exampl
e the PLANNING database to the catalog. we have to connect to the target databas
e, AND to the catalog. done as follows: or RMAN> connect target /
$rman RMAN> connect system/password@PLANNING
connected to target database: PLANNING (DBID=899275577) (you see that rman now h
as retrieved the database id) RMAN> connect catalog rman/rman@PRODRMAN connected
to recovery catalog database RMAN> register database;
And after a little while, rman is ready storing some parameters (like the name a
nd dbid) in the In principle, we are ready to backup the target database. But it
s much better to set, or store, some default values in the catalog that has to d
o on how exactly we want to backup. Note: You can also connect to the target dat
abase and the catalog database in one command, with passing to the rman executab
le the right credentials, as in the following example: $ rman target SYS/oracle@
PLANNING catalog rman/rman@PRODRMAN
5.2
Setting defaults.
You are certainly not required to set defaults in rman, but some options in your
scripts that you normally always would set, can just as well be put as a config
urable setting. Suppose you would give the following series of commands: RMAN> c
onfigure retention policy to recovery window of 5 days; RMAN> configure default
device type to disk; RMAN> configure controlfile autobackup on;
With this series of command, you have told rman to keep all backups that are not
older than 5 da and that per default the backups will be stored to disk, and th
at at every backupjob, the contro must be automatically included. Note: You coul
d go now to the second sheet "Some_RMAN_Notes" and see if you inderstand all bac
kup and restore examples over there. Ofcourse, you are invited to finish this sh
eet first. The above list of rman commands, are very important. The first comman
d tells rman how long to keep backups available, before considering them as obso
lete. Some other examples of setting the retention policy: Ensure that RMAN reta
ins all backups needed to recover the database to any point in time in the RMAN>
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS; Retain three backups o
f each datafile: RMAN> CONFIGURE RETENTION POLICY TO REDUNDANCY 3; You can get a
list of all current setting by using the command: RMAN> show all;
RMAN configuration parameters are: CONFIGURE RETENTION POLICY TO REDUNDANCY 1; #
default CONFIGURE BACKUP OPTIMIZATION OFF; # default CONFIGURE DEFAULT DEVICE T
YPE TO DISK; # default CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default CONFIGURE
CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default CONFIGURE
DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default CONFIGURE DA
TAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default CONFIGURE ARCHIVELOG B
ACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default CONFIGURE MAXSETSIZE TO UNLIMI
TED; # default CONFIGURE ENCRYPTION FOR DATABASE OFF; # default CONFIGURE ENCRYP
TION ALGORITHM 'AES128'; # default CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;
# default CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'C:\ORA10G\PRODUCT\10.2.0\DB_1
\DATABASE\SNCFTEST10G.ORA';
5.3
Creating backups with rman.
Lets start with a basic backup script that really will make a complete (open) ba
ckup of an oracle database, plus all archived redologs. RMAN> run { 2> backup da
tabase plus archivelog; 3> delete noprompt obsolete; 4> }
From the prompt, type in those commands, and after the last "}", the script will
execute. So, from the RMAN> prompt, you can give singular commands, that is, on
e statement, like for exam RMAN> configure controlfile autobackup on; And you ca
n let rman run a script by starting with "run {" RMAN> run { statements }
followed by as series of statements.
If you take a look again at the above backupscript, you may wonder why there is
no specification to where you want to backup, because you might want to choose b
etween tape or disk. Well, you can configure that as a default as shown in secti
on 5.2. Secondly, we do not see a "channel" alocation in the script. A "channel"
is a Server session which will access the database, selects the data, and write
s the data to the backuplocation. RMAN comes preconfigured with one DISK channel
that you can use for backups to disk. So, if you backup to disk, you do not nee
d to specify a "channel". Now let us take a look at a second backup script, whic
h backups the database to tape(s). RMAN> run { 2> allocate channel t1 type 'sbt_
tape' parms 3> allocate channel t2 type 'sbt_tape' parms 4> backup full database
; 5> backup (spfile) (current controlfile) ; 6> 7> sql 'alter system archive lo
g current'; 8> 9> backup archivelog all delete input ; 10> 11> release channel t
1; 12> release channel t2; 13> }
'ENV=(tdpo_optfile=/usr/tivoli/tsm/client/oracle/b 'ENV=(tdpo_optfile=/usr/tivol
i/tsm/client/oracle/b
In this example, you see that two channels are created before the actual backupc
ommands are called. These channels will write to tape, because in the statement
you might see the "sbt_t identifier. This is "rman language" for "we will backup
to tape". Writing to disk, is easy for the Server session, because the Hosts Op
erating System "knows" how to write to disks. So there will never be "difficult"
parameters in the "allocate channel" command. In this case, the allocate channe
l command have the simple form of: allocate channel <channel_name> type disk; So
for example: allocate channel d1 type disk;
Writing to tapes cannot be done by the Server session without the help of specia
lized libaries. The tapedrive or taperobot can probably only be accessed by spec
ific third-party software. That s why in the channel allocation command, you will se
e parameters that referr to a certain configuration file, which will contain poi
nters on how to access the specilized librar
That s why you find in the allocate channel command parameters similar to this examp
le: allocate channel t1 type 'sbt_tape' parms
'ENV=(tdpo_optfile=/usr/tivoli/tsm/client/oracle/bin6
5.4 Changing the status of backups on disk or tape.
The following options in changing the status of backups will be discussed: CHANG
E KEEP / NO KEEP CHANGE AVAILABLE / UNAVAILABLE OBSOLETE BACKUPS CHANGE .. KEEP / NO
KEEP: Changing Retention Policy Status of RMAN Backups Maybe sometimes you want
to change the status of a certain backup, so that it no longer falls under the
rules of the RETENTION POLICY. Use CHANGE... KEEP or CHANGE... NOKEEP to specify
whether a backup should be subject to the configured retention policy or kept u
ntil a different date or even indefinitely.
The KEEP option exempts a backup from the current retention policy either indefi
nitely or until the specified UNTIL time. RMAN does not mark the files as obsole
te even if they would be conside obsolete under the retention policy. Such backu
ps are called long-term backups. CHANGE ... NOKEEP is used to undo the effects o
f CHANGE ... KEEP, so that the configured retention policy applies to the backup
. For example, the following command prevents RMAN from considering backupsets w
ith the tag 'year_end_2002' as obsolete under the retention policy: RMAN> CHANGE
BACKUPSET TAG year_end_2002 KEEP FOREVER NOLOGS; To allow backupsets with the t
ag year_end_2002 to be marked as obsolete based on the retention policy, use thi
s command: RMAN> CHANGE BACKUPSET TAG year_end_2002 NOKEEP;
If you want to prevent the use of a backup marked with KEEP in restore and recov
ery operations, then mark these backups as UNAVAILABLE. RMAN will not delete the
records for these backups from the RMAN repository, but will not try to use the
m in restore and recovery until they are ma AVAILABLE again. OBSOLETE BACKUPS. W
ith the REPORT OBSOLETE command, you can find the backupsets which are "after" t
he retention policy. Lets say that your retention policy window is 7 days. In th
at case, all backups that are older than 7 days are reported as obsolete. RMAN>
report obsolete;
RMAN retention policy will be applied to the command RMAN retention policy is se
t to recovery window of 1 days Report of obsolete backups and copies Type Key Co
mpletion Time Filename/Handle -------------------- ------ ------------------ ------------------Backup Set 24 28-JUN-08 Backup Piece 26 28-JUN-08 C:\ORACLE\FLAS
H_RECOVERY_AREA\TEST10G\BACKUPSET\2 0628T012918_46C1GZMK_.BKP Backup Set 25 28-J
UN-08 Backup Piece 27 28-JUN-08 C:\ORACLE\FLASH_RECOVERY_AREA\TEST10G\BACKUPSET\
2 0628T012918_46C1KQ3F_.BKP Backup Set 39 28-JUN-08 Backup Piece 43 28-JUN-08 C:
\ORACLE\FLASH_RECOVERY_AREA\TEST10G\BACKUPSET\2 0628T013052_46C1KY00_.BKP
# Show/Delete items not needed for point-in-time # recovery within the last week
report obsolete recovery window of 7 days; delete obsolete recovery window of 7
days; RMAN> REPORT OBSOLETE REDUNDANCY 2; RMAN> REPORT OBSOLETE RECOVERY WINDOW
OF 5 DAYS; RMAN displays backups that are obsolete according to those retention
policies, regardless of the actual configured retention policy.
# Show/Delete items with more than 2 newer copies available report obsolete redu
ndancy = 2 device type disk; delete obsolete redundancy = 2 device type disk; #
Show datafiles that connot currently be recovered report unrecoverable database;
report unrecoverable tablespace 'USERS';
usually stored in
udump", "cdump", "audit"
file "init.ora" or kinds of settings ow many processes
creating a copy of the files in section II, that is, know what exactly you need
to backup
tabase shown in II. blespace has no meaning to the OS,
ain, and neat administration.
multiple files, over multiple filesystems.
t to let it have two files:
s, over two separate filessystems /u01 and /u02. "live" in tablespace PLANNING_D
ATA:
ionally, if the table gets very large ent filesystems (assuming those are on sep
arate disks).
le "planning_data01.dbf",
rformance reasons, but also for Administration purposes. s and indexes on separa
te tablespaces? database, and you would create a neat administration
etween a physical backup and a logical backup of a database. socalled "open" bac
kup, that is, creating a backup ere the database is shutdown.
ool to backup a database. p an Oracle database:
sysadmin is using Tivoli TSM (or other backup suite)
d-on product TDPO, so that (open) Oracle databases
! That's not true. Almost all red for making Oracle backups as well, diately obv
ious that really rman
Do NOT take these as "live" or "usable" examples, abase in archive mode and in n
on-archive mode.
ples: (do not takes these for as "being usable"):
process is acting on the databasefiles. They are just a bunch e we COULD NOT use
the commands as shown in the examples.
# # # # #
tar tar tar tar tar
-cvf -rvf -rvf -rvf -rvf
/dev/rmt/0hc /dev/rmt/0hc /dev/rmt/0hc /dev/rmt/0hc /dev/rmt/0hc
/u01/oradata /u02/oradata /u03/oradata /u04/oradata /u05/oradata
tapedrive or class is called..
If the database was open, and thus in use, are accessed by potentially many
pedrive on rmt1, in contrast with "rmt1", which is rewinding you will only have
the last file on tape! ike "cp with using ranges with brackets []
requirement if we want to use the "exp" or "expdp" uitilites. indexes, procedure
s and all other fancy stuff) ed if we want to restore the whole database, or
y log=planning_06062008.log
the database. In this example, we backup all of Harry):
read as "account/password@connectstring" ers in the database. ers, namely "sys"
and "system", whereas the "sys" account ect full dabase exports using system or
sys.
from version 10g, Oracle strongly encourages all dba's he exp utility).
umpfile=EMP_DEPT.dmp logfile=expdpEMP_DEPT.log
he other options that are available to you. roduced as in the following example,
ot about time, but it s about a number quely identify any change in the database. s
a row in or from a table, this
ntified by" a certain SCN.
", then the checkpoint process will
in, the Oracle processes will check the SCN needed on one or more files. ery is
needed at startup.
(that is probably the account that also owns the software). em, its very likely
you need to export a variable ), like for example in the following way:
PLANNING database. to do that. What you could do is illustrated
$ sqlplus username/password (you already are connected or logged on)
have been logged on as an Orcale database r stop a database. database like in "c
onnect / as sysdba" n to the database as "sys". here is how to show you to stop
or start a database.
inished which could mean that you might wait always the best to use, because run
ning transactions s, in a consistent way. se, the fileheaders have not been upda
ted with
u can easily startup a database with if you need to explicitly startup a databas
e with a certain or default init_<sid>.ora
_path_to_parameterfile_init.ora"
database as well? Yes, an export or cold or hot backup with sufficient frequency
should be fine.
-created sequences of RMAN commands
e following steps:
, let's say, with a initial size of 100MB. tablespace "rman" "CREATE CATALOG" co
mmand).
autoextend on next 10M maxsize 500M
that is, the user rman:
to the right Database:
s to be in capital, maybe your database id uses small capital).
e "connect catalog" command, and pass along
_RECOVERY_AREA\TEST10G\BACKUPSET\2008_06_28\O1_MF_NNSNF_TAG2008
_RECOVERY_AREA\TEST10G\BACKUPSET\2008_06_28\O1_MF_ANNNN_TAG2008
_RECOVERY_AREA\TEST10G\BACKUPSET\2008_06_28\O1_MF_NCSNF_TAG2008
backup is no longer needed according that the CROSSCHECK command fails to find
ps. They only fall outside your backups. Make sure you really want this,
which backups or copies are available.
CKUP and BY FILE options of the LIST command
ention policies,
run { shutdown immediate; # use abort if this fails startup mount; restore datab
ase; recover database; alter database open; }
This will result in all datafiles being restored then recovered. RMAN will apply
archive logs as necessary until the recovery is complete. At that point the dat
abase is opened. If the tempfiles are still present you can issue a command like
like the following for each of t sql "ALTER TABLESPACE temp ADD TEMPFILE ''C:\O
racle\oradata\W2K2\temp01.dbf'' REUSE"; If the tempfiles are missing they must b
e recreated as follows: sql "ALTER TABLESPACE temp ADD TEMPFILE ''C:\Oracle\orad
ata\W2K2\temp01.dbf'' SIZE 100M AUTOEXTEND ON NEXT 64K";
>>>> Restore & Recover A Subset Of The Database
A subset of the database can be restored in a similar fashion: Suppose you have
placed tablespace users offline, and want to restore and recover this tablespac
run { allocate channel t1 type 'sbt_tape' parms allocate channel t2 type 'sbt_ta
pe' parms restore tablespace users; recover tablespace users; sql 'ALTER TABLESP
ACE users ONLINE'; }
'ENV=(tdpo_optfile=/usr/tivoli/tsm/client/oracle/bin6 'ENV=(tdpo_optfile=/usr/ti
voli/tsm/client/oracle/bin6
run { sql 'ALTER TABLESPACE users OFFLINE IMMEDIATE'; restore tablespace users;
recover tablespace users; sql 'ALTER TABLESPACE users ONLINE'; }
Recovering a Tablespace in an Open Database The following example takes tablespa
ce TBS_1 offline, restores and recovers it, then brings it b run { allocate chan
nel dev1 type 'sbt_tape'; sql "ALTER TABLESPACE tbs_1 OFFLINE IMMEDIATE"; restor
e tablespace tbs_1; recover tablespace tbs_1; sql "ALTER TABLESPACE tbs_1 ONLINE
"; }
Recovering Datafiles Restored to New Locations The following example allocates o
ne disk channel and one media management channel to use datafil on disk and back
ups on tape, and restores one of the datafiles in tablespace TBS_1 to a differen
run { allocate channel dev1 type disk; allocate channel dev2 type 'sbt_tape'; s
ql "ALTER TABLESPACE tbs_1 OFFLINE IMMEDIATE";
startup nomount; restore controlfile; alter database mount; From SQL*Plus as SYS
get the last archived SCN using: SQL> SELECT archivelog_change#-1 FROM v$databa
se; ARCHIVELOG_CHANGE#-1 -------------------1048438 1 row selected. SQL>Back in
RMAN do the following: run { set until scn 1048438; restore database; recover da
tabase; alter database open resetlogs; }
If the "until scn" were not set the following type of error would be produced on
ce a redo log wa RMAN-00571: ===================================================
======== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: =========================================================== RMAN-03
002: failure of recover command at 03/18/2003 09:33:19 RMAN-06045: media recover
y requesting unknown log: thread 1 scn 1048439 With the database open all missin
g tempfiles must be replaced: sql "ALTER TABLESPACE temp ADD TEMPFILE ''C:\Oracl
e\oradata\W2K2\temp01.dbf'' SIZE 100M AUTOEXTEND ON NEXT 64K"; Once the database
is fully recovered a new backup should be perfomed.
The recovered database will be registered in the catalog as a new incarnation. T
he current incar can be listed and altered using the following commands:
list incarnation; reset database to incarnation x;Lists And Reports RMAN has ext
ensive listing and reporting functionality allowing you to monitor you backups a
nd m the recovery catalog. >>>> Restoring a datafile to another location:
For example, if you restore datafile ?/oradata/trgt/tools01.dbf to its default l
ocation, then RM the file ?/oradata/trgt/tools01.dbf and overwrites any file tha
t it finds with the same filename If you run a SET NEWNAME command before you re
store a file, then RMAN creates a datafile copy with the name that you specify.
For example, assume that you run the following commands: SET NEWNAME FOR DATAFIL
E '?/oradata/trgt/tools01.dbf' TO '/tmp/tools01.dbf'; RESTORE DATAFILE '?/oradat
a/trgt/tools01.dbf';
In this case, RMAN creates a datafile copy of ?/oradata/trgt/tools01.dbf named /
tmp/tools01.dbf and records it in the repository. To change the name for datafil
e ?/oradata/trgt/tools01.dbf to /tmp/tools01.dbf in the control fi run a SWITCH
command so that RMAN considers the restored file as the current database file. F
or SWITCH DATAFILE '/tmp/tools01.dbf' TO DATAFILECOPY '?/oradata/trgt/tools01.db
f';
The SWITCH command is the RMAN equivalent of the SQL statement ALTER DATABASE RE
NAME FILE. >>>> Archive logs What is the purpose and are the differences of ALTER S
YSTEM ARCHIVE LOG CURRENT and ALTER SYSTEM ARCHIVE LOG ALL
# When the database is op
un the following SQL statement to force Oracle to switch out of the current log
and archive it as well as all other unarchived logs: ALTER SYSTEM ARCHIVE LOG CU
RRENT;
# When the database is mounted, open, or closed, you can run the following SQL s
tatement to forc to archive all noncurrent redo logs: ALTER SYSTEM ARCHIVE LOG A
LL;
A log switch does not mean that the redo is archived. When you execute "'alter s
ystem archive log current" you force that the current log to be archiv so it is
safe: you are sure to have all the needed archived logs. alter system archive lo
g all: This command will archive all filled redo logs but will not complete curr
ent log because it will not be full.
Section 2: Other notes on RMAN
About RMAN Backups: ---------------------------When you execute the BACKUP command in RMAN, you create one or more backup sets
or image copies. RMAN creates backup sets regardless of whether the destination
is disk or a media manager. >>>About Image Copies
An image copy is an exact copy of a single datafile, archived redo log file, or
control file. Image copies are not stored in an RMAN-specific format. They are i
dentical to the results of cop with operating system commands. RMAN can use imag
e copies during RMAN restore and recover operat and you can also use image copie
s with non-RMAN restore and recovery techniques.
To create image copies and have them recorded in the RMAN repository, run the RM
AN BACKUP AS COP (or, alternatively, configure the default backup type for disk
as image copies using CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COPY before perf
orming a backup). A database server session is used to create the copy, and the
server session also performs actio validating the blocks in the file and recordi
ng the image copy in the RMAN repository.
You can also use an operating system command such as the UNIX dd command to crea
te image copies, though these will not be validated, nor are they recorded in th
e RMAN repository. You can use th to add image copies created with native operat
ing system tools in the RMAN repository. >>>Using RMAN-Created Image Copies
If you run a RESTORE command, then by default RMAN restores a datafile or contro
l file to its or by copying an image copy backup to that location. Image copies
are chosen over backup sets becau extra overhead of reading through an entire ba
ckup set in search of files to be restored.
However, if you need to restore and recover a current datafile, and if you have
an image copy of available on disk, then you do not actually need to have RMAN c
opy the image copy back to its ol
You can instead have the database use the image copy in place, as a replacement
for the datafile The SWITCH command updates the RMAN repository indicate that th
e image copy should now be treate the current datafile. Issuing the SWITCH comma
nd in this case is equivalent to issuing the SQL s ALTER DATABASE RENAME FILE. Y
ou can then perform recovery on the copy. >>>User-Managed Image Copies
RMAN can use image copies created by mechanisms outside of RMAN, such as native
operating system or third-party utilities that leave image copies of files on di
sk. These copies are known as use or operating system copies.
The RMAN CATALOG command causes RMAN to inspect an existing image copy and enter
its metadata in Once cataloged, these files can be used like any other backup w
ith the RESTORE or SWITCH command
Some sites store their datafiles on mirrored disk volumes, which permit the crea
tion of image co a mirror. After you have broken the mirror, you can notify RMAN
of the existence of a new user-m thus making it a candidate for a backup operat
ion. You must notify RMAN when the copy is no long by using the CHANGE ... UNCAT
ALOG command. In this example, before resilvering the mirror (not i copies of th
e broken mirror), you must use a CHANGE ... UNCATALOG command to update the reco
very and indicate that this copy is no longer available. >>>Storage of Backups o
n Disk and Tape
RMAN can create backups
ve. If you speci DEVICE
file name space of the
ckup on any device that
Deletion of Archived Logs After Backups RMAN can delete one or all copies of arc
hived logs from disk after backing them up to backup set If you specify the DELE
TE INPUT option, then RMAN backs up exactly one copy of each specified lo and th
read from an archive destination to tape, and then deletes the specific file it
backed up the other copies on disk. If you specify the DELETE ALL INPUT option,
then RMAN backs up exactly specified log sequence number and thread, and then de
letes that log from all archive destination Note that there are special consider
ations related to deletion of archived redo logs in standby See Oracle Data Guar
d Concepts and Administration for details. >>>Backups of Backup Sets
The RMAN BACKUP BACKUPSET command backs up previously created backup sets. Only
backup sets that on device type DISK can be backed up, and they can be backed up
to any available device type. Note: RMAN issues an error if you attempt to run
BACKUP AS COPY BACKUPSET.
The BACKUP BACKUPSET command uses the default disk channel to copy backup sets f
rom disk to disk To back up from disk to tape, you must either configure or manu
ally allocate a non-disk channel.
Uses for Backups of Backup Sets The BACKUP BACKUPSET command is a useful way to
spread backups among multiple media. For example you can execute the following B
ACKUP command weekly as part of the production backup schedule: # makes backup s
ets on disk BACKUP DEVICE TYPE DISK AS BACKUPSET DATABASE PLUS ARCHIVELOG; BACKU
P DEVICE TYPE sbt BACKUPSET ALL; # copies backup sets on disk to tape
In this way, you ensure that all your backups exist on both disk and tape. You c
an also duplex b of backup sets, as in this example:
BACKUP COPIES 2 DEVICE TYPE sbt BACKUPSET ALL; (Again, control file autobackups
are never duplexed.)
You can also use BACKUP BACKUPSET to manage backup space allocation. For example
, to keep more r on disk and older backups only on tape, you can regularly run t
he following command: BACKUP DEVICE TYPE sbt BACKUPSET COMPLETED BEFORE 'SYSDATE
-7' DELETE INPUT;
This command backs up backup sets that were created more than a week ago from di
sk to tape, and them from disk. Note that DELETE INPUT here is equivalent to DEL
ETE ALL INPUT; RMAN deletes all existing copies of the backup set. If you duplex
ed a backup to four locations, then RMAN deletes all four copies of the pieces i
n the backup set. >>> Restoring Files with RMAN Use the RMAN RESTORE command to
restore the following types of files from disk or other media: =====Database (al
l datafiles) Tablespaces Control files Archived redo logs Server parameter files
Because a backup set is in a proprietary format, you cannot simply copy it as yo
u would a backup created with an operating system utility; you must use the RMAN
RESTORE command to extract its c In contrast, the database can use image copies
created by the RMAN BACKUP AS COPY command without additional processing.
RMAN automates the procedure for restoring files. You do not need to go into the
operating syste locate the backup that you want to use, and manually copy files
into the appropriate directories When you issue a RESTORE command, RMAN directs
a server session to restore the correct backups t =- the default location, over
writing the files with the same name currently there =- A new location, which yo
u can specify with the SET NEWNAME COMMAND
To restore a datafile, either mount the database or keep it open and take the da
tafile to be res When RMAN performs a restore, it creates the restored files as
datafile image copies and records in the repository. The following table describ
es the behavior of the RESTORE, SET NEWNAME, and S >>>Datafile Media Recovery wi
th RMAN The concept of datafile media recovery is the application of online or a
rchived redo logs or incremental backups to a restored datafile in order to upda
te it to the current time or some other specified time. Use the RMAN RECOVER com
mand to perform media recovery and apply logs or incremental backups automatical
ly.
RMAN Media Recovery: Basic Steps If possible, make the recovery catalog availabl
e to perform the media recovery. If it is not ava or if you do not maintain a re
covery catalog, then RMAN uses metadata from the target database c If both the c
ontrol file and recovery catalog are lost, then you can still recover the databa
se assuming that you have backups of the datafiles and at least one autobackup o
f the Control file. The generic steps for media recovery using RMAN are as follo
ws:
-Place the Database in the appropriate state: mounted or open. For Example, moun
t the Database when performing whole database recovery, or open the database whe
n performing online tablespace -To perform incomplete recovery, use the SET UNTI
L command to specify the time, SCN, or log sequence number at which recovery ter
minates. Alternatively, specify the UNTIL clause on the RESTORE and RECOVER comm
ands. -Restore the necessary files with the Restore command. -Recover the datafi
les with the Recover command. -Place the Database in its normal state. For Examp
le, open it or bring recovered Tablespaces onl RESTORE DATABASE;
Suppose you have a retention period defined in rman, like for example CONFIGURE
RETENTION POLICY TO REDUNDANCY 3 This means that 3 backups needs to be maintaine
d by rman, and other backups are considered "obso But those other backups beyond
retention, are not expired or otherwise not usable. If they are still present,
you can use them in a recovery. Besides this, it cannot be known beforehand how
the tape subsystem will deal with rman commands like "delete obsolete". The tape
subsystem has probably its own retention period, and you need much more details
about all systems involved, before you know whats going on.
Section 3: RMAN errors and troubleshooting:
Err 1: Missing archived redolog: ================================ Problem: If an
archived redo is missing, you might get a message similar like this:
RMAN-00571: =========================================================== RMAN-005
69: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: ====
======================================================= RMAN-03002: failure of b
ackup command at 03/05/2008 07:44:35 RMAN-06059: expected archived log not found
, lost of archived log compromises recoverability ORA-19625: error identifying f
ile /dbms/tdbaeduc/educroca/recovery/archive/arch_1_817_6171166 ORA-27037: unabl
e to obtain file status IBM AIX RISC System/6000 Error: 2: No such file or direc
tory Solution: If archived redo logs are (wrongly) deleted/moved/compressed from
disk without being backed up, this has happened, and will keep attempting to ba
ckup the missing archived redo logs. That will to fail altogether with an error
like: RMAN-06059: expected archived log not found, lost of archived log compromi
ses recoverability
If you can, you should bring back the missing archved redo logs to their origina
l location and n But if that is impossible, the workaround is to crosscheck archive
log all , like: rman <<e1 connect target / connect catalog username/password@catalog
run { allocate channel c1 type disk ; crosscheck archivelog all ; release chann
el c1 ; } e1 Or just go into rman and run the command: RMAN> crosscheck archivel
og all; You ll get output like this:
validation succeeded for archived log archive log filename=D:REDOARCHARCH_1038.D
BF recid=1017 st for every archived log as they are all checked on disk. That sh
ould be the catalog fixed, run an archivelog backup to make sure.
0 The program ran without error. In other words, the media manager is installed
and can accept a return the same data when requested.
non-0 The program encountered an error. Either the media manager is not installe
d or it is not config To use sbttest:
Make sure the program is installed, included in your system path, and linked wit
h Oracle by typi % sbttest If the program is operational, you should see a displ
ay of the online documentation. Execute the program, specifying any of the argum
ents described in the online documentation. For to create test file some_file.f
and write the output to sbtio.log: % sbttest some_file.f -trace sbtio.log
You can also test a backup of an existing datafile. For example, this command te
sts datafile tbs % sbttest tbs_33.f -dbname prod
Examine the output. If the program encounters an error, it provides messages des
cribing the fail For example, if Oracle cannot find the library, you see: libobk
.so could not be loaded. Check that it is installed properly, and that LD_ LIBRA
RY_PATH environment variable (or its equivalent on your platform) includes the d
irectory where this file can be found. Here is some additional information on th
e cause of this error: ld.so.1: sbttest: fatal: libobk.so: open failed: No such
file or directory
ERR 6: RMAN-12004 ================= Hi, I m facing this problem any pointers wil
l of great help.... 1 RMAN-00571: ==============================================
============= RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ==========
===== RMAN-00571: =========================================================== RM
AN-00579: the following error occurred at 12/16/2003 02:46:31 RMAN-10035: except
ion raised in RPC: RMAN-10031: ORA-19624 occurred during call to DBMS_BACKUP_RES
TORE.BACKUPPIECECREATE RMAN-03015: error occurred in stored script backup_db_ful
l RMAN-03015: error occurred in stored script backup_del_all_al RMAN-03007: retr
yable error occurred during execution of command: backup RMAN-12004: unhandled e
xception during command execution on channel t1 RMAN-10035: exception raised in
RPC: ORA-19506: failed to create sequential file, name="l0f93ro5_1_1", parms=""
ORA-27028: skgfqcre: sbtbackup returned error ORA-19511: Error received from med
ia manager layer, error text: sbtbackup: Failed to process backup file. RMAN-100
31: ORA-19624 occurred during call to DBMS_BACKUP_RESTORE.BACKUPPIECECREATE OR a
nother errorstack
RMAN-12004: unhandled exception during command execution on channel disk13 RMAN10035: exception raised in RPC: ORA-19502: write error on file "/db200_backup/ar
chive_log03
Applies to: Oracle Server - Enterprise Edition - Version: 10.1.0.5.0 This proble
m can occur on any platform. Symptoms Getting this error during the incremental
backups with rman: RMAN-00579: the following error occurred at 06/20/2007 04:12:
30 RMAN-03015: error occurred in stored script inc_wed RMAN-03007: retryable err
or occurred during execution of command: backup RMAN-12004: unhandled exception
during command execution on channel ORA_DISK_1 RMAN-10035: exception raised in R
PC: ORA-19502: write error on file jsikni42_1_1, blockno 6924289 (blocksize=512)
ORA-27072: skgfdisp: I/O error Linux Error: 2: No such file or directory Additi
onal information: 6924289 RMAN-10031: ORA-19624 occurred during call to DBMS_BAC
KUP_RESTORE. BACKUPPIECECREATE Cause The filesystem involved was out of space. S
olution Add space to the filesystem involved in your backup. ------------------------------------------------------------------------------ERR 7: ORA-27211 ================ Q: Continue to get ORA-27211 Failed to load me
dia management library A:
had a remarkably similar experience a few months ago with Legato NetWorker and p
erformed all of you listed with the same results. The problem turned out to be v
ery simple. The SA installed t of the Legato Networker client because it is a 64
-bit server. However, we were running a 32-bit Installing the 32-bit client solv
ed the problem. A:
Cause: User-supplied SBT_LIBRARY or libobk.so could not be loaded. Call to dlope
n for media libr See Additional information for error code. Action: Retry the co
mmand with proper media library. Or re-install Media management module for O A:
Exact Error Message ORA-27211: Failed to load Media Management Library on HP-UX
system Details: Overview:
The Oracle return code ORA-27211 implies a failure to load a shared object libra
ry into process Oracle Recovery Manager (RMAN) backups will fail with a message
"ORA-27211: Failed to load Media if the SBT_LIBRARY keyword is defined and point
s to an incorrect library name. The SBT_LIBRARY k in the PARMS clause of the ALL
OCATE CHANNEL statement in the RMAN script. This keyword is not va
and is new to Oracle 9i. If this value is set, it overrides the default search p
ath for the libo By default, SBT_LIBRARY is not set. Possible quick solution: Ch
eck permissions on libraries like listed in the PARMS of the allocate channel st
atement. Other Troubleshooting:
If an ORA-27211 error is seen for an Oracle RMAN backup, it is necessary to revi
ew the Oracle RM is either not set or is set correctly. If set, the filename sho
uld be libobk.sl for HP-UX 10, 11 but libobk.so for HP-UX 11.23 (ia64) clients.
Example of an invalid entry for HP-UX 11.23 (ia64) clients: PARMS='SBT_LIBRARY=/
usr/openv/netbackup/bin/libobk.sl' Example of a correct entry for HP-UX 11.23 (i
a64) clients: PARMS='SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so' Master Serv
er Log Files: Media Server Log Files: Client Log Files: The RMAN log file on the
client will show the following error message: RMAN-00571: =====================
====================== RMAN-00569: ======= ERROR MESSAGE STACK FOLLOWS ======= R
MAN-00571: =========================================== RMAN-03009: failure of al
locate command on ch00 channel at 05/21/2005 16:39:17 ORA-19554: error allocatin
g device, device type: SBT_TAPE, device name: ORA-27211: Failed to load Media Ma
nagement Library Additional information: 25 Resolution: n/a n/a
The Oracle return code ORA-27211 implies a failure to load a shared object libra
ry into process Oracle RMAN backups will fail with a message "ORA-27211: Failed
to load Media Management Library if the SBT_LIBRARY keyword is defined and point
s to an incorrect library name. To manually set the SBT_LIBRARY path, follow the
steps described below: 1. Modify the RMAN ALLOCATE CHANNEL statement in the bac
kup script to reference the HP-UX 11.23 PARMS='SBT_LIBRARY=/usr/openv/netbackup/
bin/libobk.so'
Note: This setting would be added to each ALLOCATE CHANNEL statement. A restart
of the Oracle in is not needed for this change to take affect. 2. Run a test bac
kup or wait for the next scheduled backup of the Oracle database
ERR8: More on DBMS_BACKUP_RESTORE: ================================== Note 1: Th
e dbms_backup_restore package is used as a PL/SQL command-line interface for rep
lacing native and it has very little documentation. The Oracle docs note how to
install and configure the dbms_backup_restore package:
RMAN-04004 ORA-03135 ORA-3136 >>>> In alertlog of the rman, we can find: WARNING
: inbound connection timed out (ORA-3136) Thu Mar 13 23:09:54 2008 >>>> In Net l
ogs sqlnet.log we can find: Warning: Errors detected in file /dbms/tdbaplay/ora1
0g/home/network/log/sqlnet.log
> *********************************************************************** > Fata
l NI connect error 12170. > > VERSION INFORMATION: > TNS for IBM/AIX RISC System
/6000: Version 10.2.0.3.0 - Production > TCP/IP NT Protocol Adapter for IBM/AIX
RISC System/6000: Version 10.2.0.3.0 > Oracle Bequeath NT Protocol Adapter for I
BM/AIX RISC System/6000: Version 10.2 > Time: 18-MAR-2008 23:01:43 > Tracing not
turned on. > Tns error struct: > ns main err code: 12535 > TNS-12535: TNS:opera
tion timed out > ns secondary err code: 12606 > nt main err code: 0 > nt seconda
ry err code: 0 > nt OS err code: 0 > Client address: (ADDRESS=(PROTOCOL=tcp)(HOS
T=57.232.4.123)(PORT=35844))
Note 1:
RMAN-00554: initialization of internal recovery manager package failed Is a gene
ral error code. You must turn your attention the the codes underneath this one.
For example: RMAN-00571: =======================================================
==== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMA
N-00571: =========================================================== RMAN-00554:
initialization of internal recovery manager package failed RMAN-06003: ORACLE e
rror from target database: ORA-00210: cannot open the specified control file ORA
-00202: control file: '/devel/dev02/dev10g/standbyctl.ctl' RMAN-00571: =========
================================================== RMAN-00569: =============== E
RROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================
================================== RMAN-00554: initialization of internal recove
ry manager package failed RMAN-04005: error from target database: ORA-01017: inv
alid username/password;
ERR: RMAN-20242: specification does not match any archive log in the recovery ca
talog ==========================================================================
========= Starting backup at 17-MAY-08 released channel: t1 released channel: t2
RMAN-00571: ===========================================================
regards
Note 4:
The RMAN error number would be helpful, but this is a common problem - RMAN-2024
2 - and is addre Either the name specification (the one you entered) is wrong, o
r you could be using mismatched v between RMAN and the database (don't know sinc
e you didn't provide any version details).
Note 5:
Q: Hi there! We are having problems with an Oracle backup. The compiling of the
backup command fails with the error message: RMAN-20242: specification does not
match any archivelog in the recovery catalog But RMAN is only supposed to backup
any archived logs that are there and then insert them in the catalog... Did any
body experience anything similar? This is 8.1.7 on HP-UX with Legato Networker T
hanks, A:
If i ask rman to backup archivelogs that are more than 2days old and there are n
one, thats not a That is when i see it the most, now most companies will force a
log switch after a set amount of time during the day so in DR, you dont lose da
ys worth of redo that might still be hanging in a redo log if it gets lost.
Starting backup at 30-JUN-08 released channel: t1 released channel: t2 RMAN-0057
1: =========================================================== RMAN-00569: =====
========== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =============
============================================== RMAN-03002: failure of backup com
mand at 06/30/2008 23:30:45 RMAN-06004: ORACLE error from recovery catalog datab
ase: RMAN-20242: specification does not m RMAN> Recovery Manager complete. End a
rchiving : 23:30:51
Note 6:
Subject: RMAN-20242 specification does not match any archive log in the recovery
catalog Doc ID: Note:198718.1 Type: BULLETIN Last Revision Date: 03-DEC-2007 St
atus: PUBLISHED
on oracle parallel server and oracle parallel failsafe where archived logs exist
on all nodes local disks. Resolving RMAN-20242: specification does not match an
y archivelog in the recovery catalog ---------------------------------------------------------------------------------------Trying to run the following RMAN sc
ript result with RMAN-20242. RMAN> run { 2> allocate channel c1 type disk; 3> ba
ckup 4> archivelog like 'E:\oracle\oradata\prod\archive%'; 5> } RMAN-03022: RMAN
-03023: RMAN-08030: RMAN-08500: RMAN-03022: RMAN-03026: RMAN-08031: RMAN-00571:
RMAN-00569: RMAN-00571: RMAN-03002: RMAN-03013: RMAN-06004: on does not compilin
g command: executing command: allocated channel: channel c1: sid=17 allocate all
ocate c1 devtype=DISK
compiling command: backup error recovery releasing channel resources released ch
annel: c1 =========================================================== ==========
===== ERROR MESSAGE STACK FOLLOWS =============== ==============================
============================= failure during compilation of command command type
: backup ORACLE error from recovery catalog database: RMAN-20242: specificati ma
tch any archivelog in the recovery catalog
To resolve the above error, query v$archived_log to find out the archived log de
tails and note the format of the name column. SQL> select * from v$archived_log;
RECID STAMP ---------- ---------NAME ------------------------------------------------------------------------------THREAD# SEQUENCE# RESETLOGS_CHANGE# RESETLO
GS FIRST_CHANGE# FIRST_TIM ---------- ---------- ----------------- --------- ------------ --------NEXT_CHANGE# NEXT_TIME BLOCKS BLOCK_SIZE CREA REGI STA ARC DE
L COMPLETIO ------------ --------- ---------- ---------- ---- ---- --- --- --- -------1 419970034 E:\ORACLE\ORADATA\PROD\ARCHIVE\PRODT001S01524.ARC 1 1524 1 21
-JAN-01 599954 25-JAN-01 600067 25-JAN-01 103 512 FGRD FGRD NO YES YES 25-JAN-01
Notice the name is in upper case - 'E:\ORACLE\ORADATA\PROD\ARCHIVE\PRODT001S015
24.ARC'. Modify the script and run again. RMAN> run { 2> allocate channel c1 typ
e disk; 3> backup 4> archivelog like 'E:\ORACLE\ORADATA\PROD\ARCHIVE\PROD%' 5> d
elete input; 6> release channel c1; 7> } RMAN-03022: RMAN-03023: RMAN-08030: RMA
N-08500: compiling command: executing command: allocated channel: channel c1: si
d=17 allocate allocate c1 devtype=DISK
RMAN-03022: compiling command: backup
Some "BACKUP ARCHIVELOG" commands can result in no archive log being found leadi
ng to RMAN-6004 / RMAN-20242 errors when not expected. (Only an RMAN-20242 infor
mational message is expected) eg: RMAN> backup archivelog all delete input; RMAN
> backup archivelog UNTIL TIME 'sysdate'; ^ RMAN-6004 / RMAN-20242 is signalled
when it should just be an informational RMAN-20242 error. Workaround: Only speci
fy options for which archive log(s) exist. (May not be practical)
Note 9:
Subject: RMAN-20242, RMAN-6027: on CHANGE ARCHIVELOG...
Commands after Open Resetlogs
Doc ID: Note:94206.1 Type: PROBLEM Last Revision Date: 21-OCT-2005 Status: PUBLI
SHED Problem Description: -------------------RMAN-20242 or RMAN-6027 on CHANGE ARCH
IVELOG after opening target database with resetlogs. ... commands immediately
Obviously, you already reset the catalog database into a new incarnation number,
however, the Change command give the following errors: RMAN> allocate channel f
or delete type disk; RMAN-03022: RMAN-03023: RMAN-08030: RMAN-08500: compiling c
ommand: allocate executing command: allocate allocated channel: delete channel d
elete: sid=15 devtype=DISK
RMAN> change archivelog all validate; RMAN-03022: RMAN-03026: RMAN-00569: RMAN-0
3002: RMAN-03013: RMAN-06038: RMAN-20242: compiling command: change error recove
ry releasing channel resources ================error message stack follows======
========== failure during compilation of command command type: change recovery c
atalog package detected an error specification does not match any archivelog in
the recovery catalog
Solution Description: --------------------Perform log switch on target database.
That action will produce first entry in the AL
table of RMAN catalog for current data
base incarnation. Explanation: -----------RMAN catalog AL
table does not contain any a
rchivelog entry for a current database incarnation. You need to perform a log sw
itch on the target database, and then resync the catalog database. That action w
ill update the catalog
database AL
table with a first entry for the current incarnation. RMAN-20242: specific
ation does not match any archivelog in the recovery catalog error can be mislead
ing. In that particular case should be understood as null listing returned fr
Other articles.
Article 1
http://www.backupcentral.com/phpBB2/two-way-mirrors-of-external-mailing-lists-3/
ibm-tsm-13/how-d My DBAs and I are completely baffled. How do I get TDPO to send
controlfiles to SBT_TAPE instead of DISK? My setup: TSM server (Enterprise) 5.5
on AIX 5.2. TDPO 5.4.1 on Solaris 10/SPARC and Oracle 10gR2. RMAN settings: RMA
N> show all; RMAN configuration parameters are: CONFIGURE RETENTION POLICY TO RE
COVERY WINDOW OF 7 DAYS; CONFIGURE BACKUP OPTIMIZATION OFF; CONFIGURE DEFAULT DE
VICE TYPE TO 'SBT_TAPE'; CONFIGURE CONTROLFILE AUTOBACKUP ON; CONFIGURE CONTROLF
ILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # default CONFIGURE CONT
ROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default CONFIGURE DEVI
CE TYPE 'SBT_TAPE' PARALLELISM 3 BACKUP TYPE TO BACKUPSET; CONFIGURE DEVICE TYPE
DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default CONFIGURE DATAFILE BACKU
P COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default CONFIGURE DATAFILE BACKUP COPI
ES FOR DEVICE TYPE DISK TO 1; # default CONFIGURE ARCHIVELOG BACKUP COPIES FOR D
EVICE TYPE SBT_TAPE TO 1; # default CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVIC
E TYPE DISK TO 1; # default CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS ''; C
ONFIGURE MAXSETSIZE TO UNLIMITED; # default CONFIGURE ENCRYPTION FOR DATABASE OF
F; # default CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default CONFIGURE ARCHIV
ELOG DELETION POLICY TO NONE; # default CONFIGURE SNAPSHOT CONTROLFILE NAME TO '
/opt/oracle10/product/10.2.0/db_1/dbs/snapcf_mydb.f'; # How we backup -- RMAN co
mmands:
allocate channel t1 type 'SBT_TAPE' parms 'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/cli
ent/oracle/bin64
allocate channel t2 type 'SBT_TAPE' parms 'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/cli
ent/oracle/bin64
allocate channel t3 type 'SBT_TAPE' parms 'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/cli
ent/oracle/bin64 sql 'alter system archive log current'; backup incremental leve
l = ${LEVEL} filesperset 5 format "df_%d_%s_%p_%t.lv${LEVEL}" (database include
current controlfile); backup filesperset 20
On Thu, Apr 10, 2008 at 3:26 PM, Dan Foster <tronic183 < at > evilphb.org> wrote
: Quote: My setup: TSM server (Enterprise) 5.5 on AIX 5.2. TDPO 5.4.1 on Solaris
10/SPARC and Oracle 10gR2.
Do you really have TSM 5.5 running on AIX 5.2? I wondered if that would work, an
d kind of thought it would, but Tivoli sez u need AIX 5.3. Just wondering. Steve
-Stephen Stackwick Jacob & Sundstrom, Inc. 401 East Pratt St., Suite 2214 Balti
more, MD 21202-3003 (410) 539-1135 * (866) 539-1135 sstackwick < at > jasi.com B
ack to top Dan Foster Guest
Posted: Wed Apr 23, 2008 10:51 am
Post subject: How do I get TDPO to send controlfiles to SB
-------------------------------------------------------------------------------H
ot Diggety! Steve Stackwick was rumored to have written: Quote: On Thu, Apr 10,
2008 at 3:26 PM, Dan Foster <tronic183 < at > evilphb.org> wrote: Quote: My setu
p: TSM server (Enterprise) 5.5 on AIX 5.2. TDPO 5.4.1 on Solaris 10/SPARC and Or
acle 10gR2.
Do you really have TSM 5.5 running on AIX 5.2? I wondered if that would work, an
d kind of thought it would, but Tivoli sez u need AIX 5.3. Just wondering. There
's two kinds of 'work': - 'probably technically works but you're on your own' vs
. - '20 foot wall of flames will erupt if you attempt it' IBM's statement in thi
s particular case is more of the former, presumably partly to reduce costs in re
gression testing (amongst many other valid reasons). And, of course, if you hit
a bug with such a setup, they're unlikely to fix it or even give the time of the
day.
The $65,536 question: Why did I put 5.5 on AIX 5.2? Simple: I was a little too h
asty in reading the min requirements, a rare departure for my character. I alway
s, with that one glaring exception, stick to supported revs for everything. Why
not backout? A lengthy maint moratorium amongst other things in my environment m
ade it more practical to just stay put. With that said: # lslpp -l tivoli.tsm.se
rver.aix5.rte64 Fileset Level State Description --------------------------------------------------------------------------Path: /usr/lib/objrepos tivoli.tsm.se
rver.aix5.rte64 5.5.0.0 COMMITTED IBM Tivoli Storage Manager 64 bit Server Runti
me Path: /etc/objrepos tivoli.tsm.server.aix5.rte64 5.5.0.0 COMMITTED IBM Tivoli
Storage Manager 64 bit Server Runtime # oslevel 5.2.0.0 (It's actually at 5.2 M
L9 + some patches) I haven't seen any issues so far, though I would not recommen
d doing this to anyone except the truly desperate. It's by far better to stay su
pported for the server side. You can usually get away with downrev clients past
the officially supported revs, but server [and support] is too important to risk
for most folks. Then there's that TSM server revs may have some relation to dev
ice support of the underlying AIX OS, particularly for newer devices. In my case
, I hadn't changed anything else, so got by with that. I'm looking to bring the
server up to a newer AIX version soon to resolve this uncomfortable position. La
st, but not the least, I've also been duly thwacked by colleagues with multiple
copies of the old ADSM 3.1 printed manuals to serve as a reminder to be more car
eful and diligent in my reading. Sure deserved that. -Dan Back to top
Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1
Year Oldest Fir Backup Central Forums Forum Index -> IBM TSM All times are GMT
- 8 Hours Page 1 of 1 Article 2 http://dba-brent.blogspot.com/2007/06/issues-wit
h-rman-on-aix-using-tdp-for.html Issues with RMAN on AIX using TDP for Oracle
So our group has thankfully decided to go with RMAN for database backups, and yo
u know i'm first
Here's my setup at a high level: 10gR2 database (rmandb - snappy name huh? :) IB
M's TDP 5.3 for Oracle AIX 5.2 Steps: 1. 2. 3. 4. Once
My internal IT department setup my TSM domain, etc. Sysadmin installed the TDP f
ileset and then generated the password file for me I used the TSM Quick Start Gu
ide to get all of my config files and directories setup I used OEM GC R3 to set
the RMAN preferences, and to setup the Tape parameters: ENV=(TDPO_O all of this
was done and "$ tdpoconf SHOWENVironment" looked good, i went for my first test
I logged into RMAN, connected to target, and then ran a connection test: run { a
llocate channel oem_sbt_backup type 'sbt_tape' format '%U' parms 'ENV=(TDPO_OPTF
ILE=/usr/tivoli release channel oem_sbt_backup; } And it worked fine. Woot!
Next, I used the "Test Backup" button on the Backup Setting OEM page. It's a sim
ple test consist run { allocate channel oem_sbt_backup type 'sbt_tape' format '%
U' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli backup as BACKUPSET current controlfile
tag '05252007020711'; restore controlfile validate from tag '05252007020711'; re
lease channel oem_sbt_backup; } And... it fails with this lovely error output: R
MAN-00571: =========================================================== RMAN-0056
9: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =====
====================================================== RMAN-03009: failure of ba
ckup command on ORA_SBT_TAPE_1 channel at 05/22/2007 16:28:09 ORA-19506: failed
to create sequential file, name="0aiiceoi_1_2", parms="" ORA-27028: skgfqcre: sb
tbackup returned error ORA-19511: Error received from media manager layer, error
text: ANS0231E (RC2025) The management class name was not found. Nice huh?? Wha
t the heck is "ANS0231E (RC2025) The management class name was not found."?
If you think that's depressing, try entering "ANS0231E" into Google. There is le
ss than 30 resul After working with IS and IBM for 3 weeks (3 weeks!!!), we fina
lly worked our way up to a SEV-1 Wait for it...
My tdpo.opt file had no stanza for "TDPO_MGMT_CLASS_2" (or _3, or _4) because I
was only allocat
Here's the gotcha: I setup RMAN to do 'duplex' copies, e.g.: create 2 copies of
all datafiles an The problem is RMAN opens 2 channels when duplex is set!!!
Bottom Line: (I had IBM add this to their KB) If you receive the dreaded "ANS023
1E (RC2025) The management class name was not found." error, t This was a hard l
esson learned... :-) Article 3 http://adsm.org/forum/archive/index.php?t-4549.ht
ml
I am facing the following error with RMAN backup with TDP for oracle in one of t
he My cluster No My Env:
TDP for oracle with 5.2.1 TSM 5.3 with LANFREE Client AIX with Oracle 9iR2 I am
able to take the lanfree backup from cluster nodes. But I am getting the followi
ng error for with rman in one of the server. Error Details: RMAN> 2> 3> 4> 5> 6>
7> 8> 9> 10> RMAN-00571: ================================================== ===
====== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== R
MAN-00571: ================================================== ========= RMAN-030
09: failure of allocate command on t2 channel at 07/05/2005 12:56:36 ORA-19554:
error allocating device, device type: SBT_TAPE, device name: ORA-27000: skgfqsbi
: failed to initialize storage subsystem (SBT) layer IBM AIX RISC System/6000 Er
ror: 106: Reserved errno was encountered Additional information: 7011 ORA-19511:
Error received from media manager layer, error text: SBT error = 7011, errno =
106, sbtopen: system error
Please suggest me any help for this prob.
Rgds Sanku ------------------------------------------------------------------------------cheffern07-05-2005, 07:03 AM Anything with the SBT layer is usually in
dicative of an issue with the Oracle relinking. Have you relinked Oracle after t
he TDP library install? ------------------------------------------------------------------------------sgabriel6207-06-2005, 12:52 AM Yep, that is the answer. Relink your Oracle libra
ries. Also ensure your tdpo.conf file states yo
Steve ------------------------------------------------------------------------------sanku07-14-2005, 01:01 AM Dear Friends,
I have relinked the Oracle libraries through "relink all " command, After the re
linkg still i am My all configuration file are correct(dsm.opt,dsm.sys &tdpo
.opt).
Kindly provide some suggetions on this. Advanced apprications to them.
Rgds Sanku ------------------------------------------------------------------------------sgabriel6207-16-2005, 12:05 AM Send me your RMAN configuration script
-------------------------------------------------------------------------------s
anku07-18-2005, 10:25 AM Thanks for your support.
My rman script: rman log=/backup/logs/level0_backup.log target / <<EOF con
figure retention policy to recovery window of 7 days; configure backup optimizat
ion on; configure controlfile autobackup on; configure maxsetsize to unlimited;
run{ allocate channel t1 type 'sbt_tape' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/ts
m/client/oracle/bin64/tdpo.opt)'; backup incremental level 0 filesperset 10 form
at 'test1_df_%t_%s_%p_%u' tag 'test1_dbf_level_0_weekly' (database include curre
nt controlfile); release channel t1; }
CROSSCHECK BACKUP; LIST BACKUP OF DATABASE;
REPORT UNRECOVERABLE; REPORT SCHEMA; REPORT NEED BACKUP; REPORT OBSOLETE; quit E
OF
Rgds Sanku ------------------------------------------------------------------------------sgabriel6207-21-2005, 01:05 AM Here is a discrepancy allocate channel
t1 type 'sbt_tape' parms Versus the following error RMAN-03009: failure of alloc
ate command on t2 channel at 07/05/2005 12:56:36
You have "channel differences"
Also where is your TDP dsm.opt file, it should be in Oracle's working directory.
Steven ------------------------------------------------------------------------------rhysm08-02-2005, 03:53 AM I have problem that looks very similar. AIX 5.3L
64 bit , Oracle 9i 9.20, TSM 5.3 with tdpo
/u01/app/oracle/920/lib/libobk.a is linked to /usr/lib/libobk64.a, which is in t
urn linked to th tsm/client/oracle/bin64/dsm.opt contains servername as per dsm.
sys. tsm/client/oracle/bin64/tdpo.opt contains dsm.opt location, log location an
d nodename.
tsm/client/api/bin64/dsm.sys is linked to tsm/client/baclient/bin/dsm.sys, which
contains a serv
Password is set and the node is registered. I have done a relink all.
fact: Recovery Manager (RMAN) symptom: Recover with UNTIL TIME option fails symp
tom: RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time cause: T
he UNTIL TIME is prior to the current Database incarnation in the RMAN-catalog.
fix: Set the Database Incarnation back to an incarnation before the last RESETLO
G time. Example commands : rman catalog rman/rman@rcat RMAN> list incarnation; R
MAN> Set dbid <dbid before the resetlog time> RMAN> connect target un/pw@<alias>
RMAN> reset database to incarnation 2; Preform the recovery. See also Note 1070
453.6 Point-in-Time Recovery of a Backup From Before Last Resetlogs
Note 2: Subject: RMAN: Point-in-Time Recovery of a Backup From Before Last Reset
logs Doc ID: Note:1070453.6 Type: PROBLEM Last Revision Date: 21-MAR-2002 Status
: PUBLISHED Problem Description: ==================== You would like to restore
a database to a point-in-time, but the backup being used is from before the last
resetlogs. The problem is that when a database is opened with resetlogs, the in
carnation of the database is also reset and RMAN keeps a record of the incarnati
on of the database in the Recovery Catalog. Problem Explanation: ===============
===== When we do a point-in-time recovery and open the database with resetlogs,
we also need to tell RMAN that we are reseting the database incarnation. Therefo
re we use the RESET DATABASE command to direct RMAN to create a new database inc
arnation record in the recovery catalog. This new incarnation record indicates t
he current incarnation. RMAN will associate all subsequent backups and log archi
ving done by the target database with the new database incarnation. If we want t
o restore the database to a point-in-time before the last resetlogs, we need to
tell RMAN that our current incarnation needs to be reset to the old one. Problem
References: =================== ORACLE8i BACKUP AND RECOVERY GUIDE Search Words
:
6.
After resetting the database, issue restore and recover commands to restore and
recover the database files from the prior incarnation, then open the database wi
th the RESETLOGS option. You need start from restoring a previous incarnation co
ntrol file when the database is in nomount state. When the database is reset to
the previous incarnation, the catalog will automatically picks up a right contro
l file. After restoring the control file, the database must be mounted for dataf
iles restore. run { set until time 'Jul 8 1999 07:55:00'; # set time to just bef
ore data was lost allocate channel dev1 type disk; shutdown abort; startup nomou
nt; restore controlfile; alter database mount; # mount database after restoring
control file restore database; recover database; alter database open resetlogs;
# this command automatically resets the database # so that this incarnation is t
he new incarnation }
Solution Explanation: ===================== Once we set the database to the prio
r incarnation, RMAN will allow a restore and recover of the database using a bac
kup from before the last resetlogs. Solution References: ==================== Or
acle8i Recovery Manager User s Guide, Release 1 (8.1.6) - Part No. A76990-01 Oracle9
i Recovery Manager User s Guide, Release 1 (9.0.1) - Part No. A9013 Note 3: { This n
ote contains error information about an "RMAN" error number. It may contain addi
tional support notes as described in Note 22080.1 } Oracle9i Release 1 Message ~
~~~~~~~~~~~~~~~~~~~~~~~~~~ Error: B2136 (RMAN-20207) Text: UNTIL TIME or RECOVER
Y WINDOW is before RESETLOGS time -------------------------------------------------------------------------Cause: UNTIL TIME and RECOVERY WINDOW cannot be less
than the database creation time or RESETLOGS time. Action: Check the UNTIL TIME
or RECOVERY WINDOW. If the database needs to be restored to an old incarnation,
use the RESET DATABASE TO INCARNATION command. Oracle 8.1 or Earlier Error Mess
age ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error: RMAN 20207 Text: UNTIL T
IME is before RESETLOGS time -------------------------------------------------------------------------Cause: UNTIL TIME cannot be less than the database creati
on time or RESETLOGS time. Action: Check the UNTIL TIME. If the database needs t
o be restored to an old incarnation, use the RESET DATABASE TO INCARNATION comma
nd.
Note 4: I have a hot backup from yesterday. Try to do point-in-time recovery and
get the following: RMAN-08031: released channel: d2 RMAN-08031: released channe
l: d3 RMAN-00571: =========================================================== RM
AN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571
: =========================================================== RMAN-03002: failur
e during compilation of command RMAN-03013: command type: restore RMAN-03002: fa
ilure during compilation of command RMAN-03013: command type: IRESTORE RMAN-0600
4: ORACLE error from recovery catalog database: RMAN-20207: UNTIL TIME is before
RESETLOGS time I do confirm that backupsets are in the catalog database. Here i
s my recovery script. run { allocate channel d1 type 'SBT_TAPE'; allocate channe
l d2 type 'SBT_TAPE'; allocate channel d3 type 'SBT_TAPE'; restore database unti
l time "to_date('Aug 27 2001 02:00:00','Mon DD YYYY HH24:MI:SS')"; recover datab
ase until time "to_date('Aug 27 2001 1:25:00','Mon DD YYYY HH24:MI:SS')"; sql "a
lter database open resetlogs"; release channel d1; release channel d2; release c
hannel d3; } ## If successful, need to run reset database below ##reset database
__________________ goodhealth goodhealth View Public Profile Send a private mes
sage to goodhealth Find all posts by goodhealth #2 08-29-2001, 06:14 PM sambavan
Senior Advisor Join Date: Oct 2000 Location: Saskatoon, SK, Canada Posts: 3,916
What is your oracle version, backup client that you use and etc? Need more info
rmation... Sam __________________ Thanx Sam
Life is a journey, not a destination!
sambavan View Public Profile Send a private message to sambavan Find all posts b
y sambavan #3 08-29-2001, 07:09 PM goodhealth Junior Member Join Date: Dec 2000
Posts: 75 Oracle 8.1.7 running on HP-UX 11. __________________ goodhealth goodhe
alth View Public Profile Send a private message to goodhealth Find all posts by
goodhealth #4 08-30-2001, 03:17 AM vinit Senior Member Join Date: Oct 2000 Posts
: 466 remove until time after recover ------------------------------------------------------------------------------Hi, This is because your restore is till 2.
Try to give a restore till the point-in-time. Your script should b something li
ke restore until time 1.25 recover database
RMAn will take the backups taken before 1.25 and apply the logs so as to make it
recover till 1. Cheers __________________ Vinit Note 5: Tuesday, February 12, 2
008 How to recover user errors There is traditional way to recover the user erro
rs i.e drop table by doing incomplete recovery the table,in oracle 9i you can re
cover the user errors by flashback technologies flashback drop by using recycle
bin,here i am not considering the space issues of recyclebin. SQL*Plus: Release
10.1.0.2.0 - Production on Wed Dec 12 15:02:09 2007 Copyright (c) 1982, 2004, Or
acle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Produc
tion With the Partitioning, OLAP and Data Mining options SQL> shutdown immediate
Database closed. Database dismounted. ORACLE instance shut down.
SQL> startup mount ORACLE instance started. Total System Global Area 171966464 F
ixed Size 787988 Variable Size 145488364 Database Buffers 25165824 Redo Buffers
524288 Database mounted. SQL> alter database archivelog 2 / Database altered. SQ
L> alter database open 2 / Database altered. SQL> create table t (a number) 2 /
Table created. Recovery Manager: Release 10.1.0.2.0 - Production Copyright (c) 1
995, 2004, Oracle. RMAN> connect target sys/sys connected to target database: OR
CL1 (DBID=1025591162) RMAN> backup database 2> ; Starting backup at 12-DEC-07 us
ing target database controlfile instead of recovery catalog allocated channel: O
RA_DISK_1 channel ORA_DISK_1: sid=139 devtype=DISK channel ORA_DISK_1: starting
full datafile backupset channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=C:\ORACLE10G\ORACLE\ORADATA\ORCL1\ORCL1\SYSTEM01.D
BF input datafile fno=00003 name=C:\ORACLE10G\ORACLE\ORADATA\ORCL1\ORCL1\SYSAUX
01.D BF input datafile fno=00002 name=C:\ORACLE10G\ORACLE\ORADATA\ORCL1\ORCL1\UN
DOTBS01. DBF input datafile fno=00004 name=C:\ORACLE10G\ORACLE\ORADATA\ORCL1\ORC
L1\USERS01.DB F channel ORA_DISK_1: starting piece 1 at 12-DEC-07 channel ORA_DI
SK_1: finished piece 1 at 12-DEC-07 piece handle=C:\ORACLE\FLASH_RECOVERY_AREA\O
RCL1\ORCL1\BACKUPSET\2007_12_12\O1_M F_NNNDF_TAG20071212T150529_3OZDMCGN_.BKP co
mment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:01:36 chann
el ORA_DISK_1: starting full datafile backupset channel ORA_DISK_1: specifying d
atafile(s) in backupset including current controlfile in backupset including cur
rent SPFILE in backupset channel ORA_DISK_1: starting piece 1 at 12-DEC-07 chann
el ORA_DISK_1: finished piece 1 at 12-DEC-07 piece handle=C:\ORACLE\FLASH_RECOVE
RY_AREA\ORCL1\ORCL1\BACKUPSET\2007_12_12\O1_M F_NCSNF_TAG20071212T150529_3OZDPGX
9_.BKP comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00
:20 Finished backup at 12-DEC-07 All rights reserved. bytes bytes bytes bytes by
tes
RMAN>
SQL> select to_char(sysdate,'DD-MM-YYYY:HH24:MI:SS') 2 from dual 3 / TO_CHAR(SYS
DATE,'DD ------------------####### SQL> drop table t 2 / Table dropped. SQL> shu
tdown immediate Database closed. Database dismounted. ORACLE instance shut down.
SQL> startup mount ORACLE instance started. Total System Global Area Fixed Size
Variable Size Database Buffers Redo Buffers Database mounted. SQL> 171966464 78
7988 145488364 25165824 524288 bytes bytes bytes bytes bytes
Recovery Manager: Release 10.1.0.2.0 - Production Copyright (c) 1995, 2004, Orac
le. RMAN> connect target sys/sys connected to target database: ORCL1 (DBID=10255
91162) RMAN> run 2> { 3> set until time "to_date('12-12-2007 15:09:42','DD-MM-YY
YY HH24:MI:SS')"; 4> restore database; 5> recover database; 6> } executing comma
nd: SET until clause using target database controlfile instead of recovery catal
og Starting restore at 12-DEC-07 allocated channel: ORA_DISK_1 channel ORA_DISK_
1: sid=159 devtype=DISK channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set restoring
datafile 00001 to C:\ORACLE10G\ORACLE\ORADATA\ORCL1\ORCL1\SYSTEM01.DBF restoring
datafile 00002 to C:\ORACLE10G\ORACLE\ORADATA\ORCL1\ORCL1\UNDOTBS01.DB F restor
ing datafile 00003 to C:\ORACLE10G\ORACLE\ORADATA\ORCL1\ORCL1\SYSAUX01.DBF resto
ring datafile 00004 to C:\ORACLE10G\ORACLE\ORADATA\ORCL1\ORCL1\USERS01.DBF chann
el ORA_DISK_1: restored backup piece 1 All rights reserved.
piece handle=C:\ORACLE\FLASH_RECOVERY_AREA\ORCL1\ORCL1\BACKUPSET\2007_12_12\O1_M
F_NNNDF_TAG20071212T150529_3OZDMCGN_.BKP tag=TAG20071212T150529 channel ORA_DIS
K_1: restore complete Finished restore at 12-DEC-07 Starting recover at 12-DEC-0
7 using channel ORA_DISK_1 starting media recovery media recovery complete Finis
hed recover at 12-DEC-07
RMAN> alter database open resetlogs 2> ; database opened RMAN> list incarnation
2> ; List of DB Key ------1 2 3 Database Incarnations Inc Key DB Name DB ID ------ -------- ---------------1 ORCL1 1025591162 2 ORCL1 1025591162 3 ORCL1 102559
1162
STATUS Reset SCN Reset Time --- ---------- ---------PARENT 1 09-MAR-04 PARENT 31
8842 12-DEC-07<---------set this CURRENT 331575 12-DEC-07<-----its current
SQL> conn sys/sys as sysdba Connected. SQL> desc t Name Null? Type ---------------------------------------- -------- ---------------------------A NUMBER SQL> d
rop table t 2 / Table dropped. SQL> shutdown immediate Database closed. Database
dismounted. ORACLE instance shut down. SQL> startup mount ORACLE instance start
ed. Total System Global Area Fixed Size Variable Size Database Buffers Redo Buff
ers Database mounted. SQL> 171966464 787988 145488364 25165824 524288 bytes byte
s bytes bytes bytes
Recovery Manager: Release 10.1.0.2.0 - Production Copyright (c) 1995, 2004, Orac
le. RMAN> connect target sys/sys connected to target database: ORCL1 (DBID=10255
91162) RMAN> run 2> { 3> set until time "to_date('12-12-2007 15:09:42','DD-MM-YY
YY HH24:MI:SS')"; 4> restore database; 5> recover database; 6> } executing comma
nd: SET until clause using target database controlfile instead of recovery catal
og RMAN-00571: =========================================================== RMAN00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =
========================================================== RMAN-03002: failure o
f set command at 12/12/2007 15:31:22 RMAN-20207: UNTIL TIME or RECOVERY WINDOW i
s before RESETLOGS time RMAN> shutdown immediate using target database controlfi
le instead of recovery catalog database dismounted Oracle instance shut down RMA
N> startup nomount connected to target database (not started) Oracle instance st
arted Total System Global Area Fixed Size Variable Size Database Buffers Redo Bu
ffers 171966464 bytes 787988 145488364 25165824 524288 bytes bytes bytes bytes A
ll rights reserved.
RMAN> restore controlfile from 'C:\oracle\flash_recovery_area\orcl1\ORCL1\BACKUP
SET\2007_12_12\O 2> ; Starting restore at 12-DEC-07 allocated channel: ORA_DISK_
1 channel ORA_DISK_1: sid=160 devtype=DISK channel ORA_DISK_1: restoring control
file channel ORA_DISK_1: restore complete output filename=C:\ORACLE10G\ORACLE\OR
ADATA\ORCL1\ORCL1\CONTROL01.CTL output filename=C:\ORACLE10G\ORACLE\ORADATA\ORCL
1\ORCL1\CONTROL02.CTL output filename=C:\ORACLE10G\ORACLE\ORADATA\ORCL1\ORCL1\CO
NTROL03.CTL Finished restore at 12-DEC-07 RMAN> startup mount database is alread
y started database mounted RMAN> reset database to incarnation 2 2> ;
List of Database Incarnations DB Key Inc Key DB Name DB ID STATUS ------- ------ -------- ---------------- ------1 2 TRGT 1334358386 PARENT 1 116 TRGT 13343583
86 PARENT 1 311 TRGT 1334358386 CURRENT Resetting the Database After Incomplete
Recovery:
Reset SCN ---------154381 154877 154877 Example
Reset Time ---------OCT 30 2001 16:02:12 OCT 30 2001 16:37:39 AUG 13 2002 17:17:
03
This example assumes that an incomplete recovery or recovery with a backup contr
ol file was perf % rman target / catalog rman/rman@catdb Recovery Manager: Relea
se 10.1.0.2.0 - Production Copyright (c) 1995, 2003, Oracle. All rights reserved
.
connected to target database: TRGT (DBID=1334531173) connected to recovery catal
og database RMAN> RESYNC CATALOG; RMAN-00571: RMAN-00569: RMAN-00571: RMAN-03009
: RMAN-20003: =========================================================== ======
========= ERROR MESSAGE STACK FOLLOWS =============== ==========================
================================= failure of resync command on default channel a
t 11/01/2001 12:00:43 target database incarnation not found in recovery catalog
RMAN> RESET DATABASE; new incarnation of database registered in recovery catalog
starting full resync of recovery catalog full resync complete
Note: Subject: ORA-600 [Krbodo_badend] On Rman Backup Doc ID: Note:412170.1 Type
: PROBLEM Last Revision Date: 20-JUN-2008 Status: REVIEWED In this Document Symp
toms Changes Cause Solution References Applies to: Oracle Server - Enterprise Ed
ition - Version: 10.2.0.2 This problem can occur on any platform. RMAN backup Sy
mptoms An RMAN backup fails with the internal error:
ORA-00600: internal error code, arguments: [krboDo_badend], [641], [], [], [], [
], [], [] In some cases ORA-00600[krboReadBitmap_badbitmap] may appear. Call sta
ck: ksedmp kgerinv kgeasnmierr krbounotread krbbaddb krbb1cf krbbtgb krbbpc krbi
bpc pevm_icd_cal pfrinstr_ICAL pfrrun_no_tool pfrrun plsql_run pricar pricbr pri
ent2 Changes
RMAN full backup is the issue here. In 10.2.0.2 has been introduced a new featur
e that avoids h all the blocks of the datafile during full datafile backup. Star
ting with 10.2.0.2, if database compatibility is 10.0.2 full backups of locally
managed data the space bitmaps so that only blocks that are currently allocated
need to be read and included The validity of the backups reading the whole dataf
ile or using the space bitmaps is the same (a
Cause The cause of this problem has been identified in Bug 5556503. The cause of
the issue is that the As per Bug 5556503 this issue is fixed in 10.2.0.4.
Solution It's available only a workaround, actually: - use: backup BLOCKS ALL <b
ackup options and arguments>
BLOCKS ALL does not mean that all blocks will be backed up. It means that unused
block optimizat
The tablespaces should be checked to avoid any other reason for this error using
the dbms_space_
DBMS_SPACE_ADMIN.ASSM_TABLESPACE_VERIFY ( tablespace_name IN VARCHAR2, ts_option
IN POSITIVE, segment_option IN POSITIVE DEFAULT NULL); With:
* TS_VERIFY_BITMAPS: The bitmaps are verified against the extents. This will det
ect bits that are marked used or free wrongly and will also detect multiple a Ex
ample: oradebug setmypid execute dbms_space_admin.assm_tablespace_verify('USERS'
,dbms_space_admin.TS_VERIFY_BITMAPS) oradebug tracefile_name
Or, if the tablespace is not ASSM, then: DBMS_SPACE_ADMIN.TABLESPACE_VERIFY ( ta
blespace_name IN VARCHAR2, verify_option IN POSITIVE DEFAULT TABLESPACE_VERIFY_B
ITMAP); Example: oradebug setmypid execute dbms_space_admin.tablespace_verify('U
SERS') oradebug tracefile_name
Although the documentation does not say that this will verify the metadata again
st file$ and con References Bug 5556503 - ORA-600 [KRBODO_BADEND] REPORTED IN AL
ERT.LOG DURING RMAN BACKUP
Information in this document applies to any platform. Goal How to recover and op
en the database if the archivelog required for recovery is either missing,
Solution The assumption here is that we have exhausted all possible locations to
find another good and va
directories defined in the LOG_ARCHIVE_DEST_n another directory in the same serv
er or another server standby database RMAN backup OS backup If the archivelog is
not found in any of the above mentioned locations, then the approach and st
For the SCN of the datafiles, it is important to know the mode of the database w
hen the datafile
If the datafiles are restored from an online or hot backup, which means that the
database is ope
However, if the datafiles are restored from an offline or cold backup, and the d
atabase is clean
The critical key thing here is to ensure that all of the online datafiles are sy
nchronized in te select status, checkpoint_change#, to_char(checkpoint_time, 'DD
-MON-YYYY HH24:MI:SS') as checkpoint_time, count(*) from v$datafile_header group
by status, checkpoint_change#, checkpoint_time order by status, checkpoint_chan
ge#, checkpoint_time; The results of the above query must return one and only on
e row for the online datafiles, which
The results of the query above may return some offline datafiles. So, ensure tha
t all of the req You may run the following query to determine the offline datafi
les: select file#, name from v$datafile where file# in (select file# from v$data
file_header where status='OFFLINE'); You may issue the following SQL statement t
o change the status of the required datafile(s) from
alter database datafile <file#> online; If we are lucky that the required log se
quence# is still available in the online redologs and th
set echo on feedback on pagesize 100 numwidth 16 alter session set nls_date_form
at = 'DD-MON-YYYY HH24:MI:SS'; select LF.member, L.group#, L.thread#, L.sequence
#, L.status, L.first_change#, L.first_time, DF.min_checkpoint_change# from v$log
L, v$logfile LF, (select min(checkpoint_change#) min_checkpoint_change# from v$
datafile_header where status='ONLINE') DF where LF.group# = L.group# and L.first
_change# >= DF.min_checkpoint_change#; If the above query returns no rows, becau
se the V$DATABASE.CONTROLFILE_TYPE has a value of "BACK
select * from v$logfile; If you have tried to apply all of the online redolog me
mbers instead of an archivelog during the ORA-00279: change 189189555 generated
at 11/03/2007 09:27:46 needed for thread 1 ORA-00289: suggestion : +BACKUP ORA-0
0280: change 189189555 for thread 1 is in sequence #428 Specify log: {<RET>=sugg
ested | filename | AUTO | CANCEL} #NAME? ORA-00310: archived log contains sequen
ce 503; sequence 428 required
ANS1025E (RC137)
Session rejected: Authentication failure
The password is node specific on TSM server and thus we have to use password for
DBLIMS_ORA node !!! (We used it for DBQIS) After using correct TSM password it
works: ANU0260I Password successfully changed. Now we got a new passwordfile "TD
PO.dblims_ora" created for this node locally: # ls -ltr ../bin/TDPO.* -rw-r--r-1
root -rw-r--r-1 root system system 48 Feb 25 08:38 ../bin/TDPO.dbqis_ora 48 Mar
12 12:29 ../bin/TDPO.dblims_ora
Now we retry the restore by using new tdpo_DBLIMS.opt: ----------------------------------------------------# rman target / catalog tsm/tsm@tsm Recovery Manager
: Release 9.0.1.4.0 - 64bit Production (c) Copyright 2001 Oracle Corporation. Al
l rights reserved. connected to target database: LISA (not mounted) connected to
recovery catalog database RMAN> run { allocate channel tivoli type 'SBT_TAPE' p
arms 'ENV=(tdpo_optfile=/usr/tivoli/tsm/client/oracle/bin64/tdpo_DBLIMS.opt)'; r
estore controlfile; } allocated channel: tivoli channel tivoli: sid=11 devtype=S
BT_TAPE channel tivoli: Tivoli Data Protection for Oracle: version 2.2.1.0 Start
ing restore at 12-MAR-04 channel tivoli: starting datafile backupset restore cha
nnel tivoli: restoring controlfile output filename=/prod/redo1/ctrl1LISA.dbf cha
nnel tivoli: restored backup piece 1 piece handle=c-1133799276-20040311-00 tag=n
ull params=NULL channel tivoli: restore complete replicating controlfile input f
ilename=/prod/redo1/ctrl1LISA.dbf output filename=/prod/redo2/ctrl2LISA.dbf outp
ut filename=/prod/app/oracle/product/9.0.1/dbs/ctrl3LISA.dbf Finished restore at
12-MAR-04 released channel: tivoli Hint: ----You can verify TDPO configuration
with this command: ---------------------------------------------------# tdpoconf
showenv -tdpo_optfile=tdpo_DBLIMS.opt TDP FOR ORACLE INFORMATION Version: 2 Rel
ease: 2 Level: 1 Sublevel: 0 Platform: 64bit TDP Oracle AIX
TSM SERVER INFORMATION Server Name: Server Address: Server Type: Server Port: Co
mmunication Method: SESSION INFORMATION Owner Name: Node Name: Node Type: DSMI_D
IR: DSMI_ORC_CONFIG: TDPO_OPTFILE: Password Directory: Compression:
IS4KAPBK01_ORACLE 172.29.254.12 Windows 1500 TCP/IP
DBLIMS_ORA >>> Correct ! TDP Oracle AIX /usr/tivoli/tsm/client/api/bin64 /usr/ti
voli/tsm/client/oracle/bin/dsm.opt tdpo_DBLIMS.opt /usr/tivoli/tsm/client/oracle
/bin FALSE
You can verify client authentication by querying TSM logfile: -----------------------------------------------------------# dsmadmc -id=oper -pass=oper -cons Ti
voli Storage Manager Command Line Administrative Interface - Version 5, Release
1, Level 6.11 (C) Copyright IBM Corporation 1990, 2003 All Rights Reserved. Sess
ion established with server IS4KAPBK01_SERVER1: Windows Server Version 5, Releas
e 2, Level 2.2 Server date/time: 2004-03-12 12:34:20 Last access: 2004-03-12 12:
24:52 ANR0406I Session 2303 started for node DBLIMS_ORA (TDP Oracle AIX) (Tcp/Ip
dbqis.domain.at(-32369)). If you still get node "DBQIS_ORA", then the new clien
t configuration is not used. This can be the case, if you don't provide TDPO_OPT
FILE in uppercase during channel allocation. RELATED DOCUMENTS ----------------N
ote 120468.1 How to Query Tivoli (ADSM) to Get Name and Status of RMAN Backups N
ote 183025.1 ORA-19507 When Restoring Using RMAN and Tivoli (TSM)
Error on: Performance problems rman:
Known RMAN Performance Problems - Metalink Note : 247611.1 This morning, I have
come across of a recently revised Metalink Note : 247611.1 (revised on 27-0 The
note has workaround for the following bugs: Bug 5219484 - CATALOG RESYNCS ARE VE
RY SLOW - ROUT TABLE HAS 6 MILLION ROWS + Bug 5047758 - RMAN SLOW PERFORMANCE ON
EXIT (UPDATING STATUS STATISTICS) Bug 5247609 RMAN SLOW PERFORMANCE DURING REGI
STER DATABASE/OPEN RESETLOGS Bug 1551773 RMAN RESTORE RUNS VERY SLOWLY WHEN THER
E ARE MANY ROWS IN THE CKP TABLE Bug 2803823 RESYNC CATALOG AND MAINTENANCE COMM
ANDS ARE SLOW Bug 4013855 - RMAN CROSSCHECK IS TAKING A LONG TIME TO COMPLETE No
te 339964.1 RMAN 8.1.7 Crosscheck Command Is Very Slow Bug 4548861 RMAN RESTORE
ARCHIVELOG UNTIL SEQUENCE TAKES A LONG TIME TO COMPLETE Note 342999.1 First Resy
nc on Production Host After Running RMAN on Bug 2876717 RMAN backup starts SLOW
if READ-ONLY device is used Bug 1887868 RMAN RESYNC takes a long time with many
tablespaces
Internal Bug 1712720 RMAN MAINTENANCE COMMANDS ARE VERY SLOW Bug 2174697 RMAN in
cremental backup performance degrades over time in NOCATALOG mode Bug 2385857 RM
AN backup performance degrades over time for large DB_FILES Bug 2484250 RMAN CUM
ULATIVE BACKUP / MAINTENENCE may appear to hang (spin) Bug 2610596 Huge CPU usag
e from RMAN server when TAPE not mounted with BACKUP_TAPE_IO_SLAVE=TRUE Bug 2968
394 RESYNC TAKES A LONG TIME TO COMPLETE : LARGE BP TABLE Bug 1407413 NO INDEX T
O ON RI CONSTRAINT BETWEEN BS AND BDF Bug 4110489 RMAN SKIP READ ONLY TABLESPACE
CLAUSE TAKING TOO MUCH TIME TO SKIP Bug 3966722 CONCURRENT RMAN BACKUPS WAIT ON
TM ENQUEUE ON CKP TABLE Bug 2710321 X$KCCFN / V$DATAFILE much slower in 9i than
8i with many datafiles
Bug 5047758 - RMAN Performance Degradation Posted at Monday, June 18, 2007 Upon
moving to 10g, you may experience poor performance when using RMAN with a 10g re
covery cata Resync operations, in particular will run extremely slow, increasing
the overall amount of time take to run to fruition. This is Bug #5047758 as doc
umented in Metalink note 247611.1.
To remedy this, issue the following command and/or include it in any stored scri
pts you might be sql "alter session set optimizer_mode=RULE"; Or nest in your st
ored script or run block: CREATE SCRIPT SAMPLE_SCRIPT {sql "alter session set op
timizer_mode=RULE";} Oracle also recommends that in response you gather the fixe
d objects' statistics via: exec dbms_stats.gather_fixed_objects_stats()on the re
covery catalog database(s) in question. Labels: Bugs, RMAN
ved logs, and that will work in most cases ncement of this script.
probably look similar to the
le=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
rent controlfile" command in upper script, it is much better
lfile available that has been
Admin\W2K2\Backup%d_DB_%u_%s_%p';
asis so that changes to the database structure perform partial and full resyncs
implicitly, the follwoing command:
a whole database recovery can be achieved
ered. RMAN will apply archive logs the database is opened. like like the followi
ng for each of them:
to restore and recover this tablespace:
le=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)'; le=/usr/tivoli/tsm/client/ora
cle/bin64/tdpo.opt)';
res and recovers it, then brings it back online:
dia management channel to use datafile copies les in tablespace TBS_1 to a diffe
rent location:
ndividual current datafiles when the database open. over the datafile, and bring
the datafile online.
NV=(tdpo_optfile=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)'; NV=(tdpo_optfil
e=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
pecified time, SCN or sequence number:
ify log sequence number
using the RESETLOGS option.
ly recover to the last SCN in the archived redo logs. to the online redo logs wh
ich are not present. y. To perform disaster recovery connect to RMAN:
ce, as a replacement for the datafile to be restored. t the image copy should no
w be treated as se is equivalent to issuing the SQL statement
RMAN, such as native operating system file copy commands n disk. These copies ar
e known as user-managed copies
image copy and enter its metadata into the RMAN repository. up with the RESTORE
or SWITCH commands.
which permit the creation of image copies by breaking RMAN of the existence of a
new user-managed copy, notify RMAN when the copy is no longer available, before
resilvering the mirror (not including other ATALOG command to update the recove
ry catalog
ce such as a tape drive. If you specify the file name space of the target instan
ce evice that can store a datafile.
use third-party media management software, are supported by that software.
ups of archived redo logs.
k after backing them up to backup sets. exactly one copy of each specified log s
equence number letes the specific file it backed up while leaving UT option, the
n RMAN backs up exactly one copy of each that log from all archive destinations.
ion of archived redo logs in standby database configurations.
ed backup sets. Only backup sets that were created d up to any available device
type.
to copy backup sets from disk to disk. manually allocate a non-disk channel.
ups among multiple media. For example, of the production backup schedule:
disk and tape. You can also duplex backups
location. For example, to keep more recent backups un the following command:
7' DELETE INPUT;
an a week ago from disk to tape, and then deletes o DELETE ALL INPUT; RMAN delet
es all to four locations, then RMAN deletes
of files from disk or other media:
simply copy it as you would a backup database file RMAN RESTORE command to extra
ct its contents. he RMAN BACKUP AS COPY command
t need to go into the operating system, iles into the appropriate directories. s
ion to restore the correct backups to either:
e name currently there
open and take the datafile to be restored offline. as datafile image copies and
records them or of the RESTORE, SET NEWNAME, and SWITCH commands.
f online or archived redo logs pdate it to the current time to perform media rec
overy and
the media recovery. If it is not available, s metadata from the target database
control file. n you can still recover the database t one autobackup of the Contr
ol file.
en. For Example, mount the Database ase when performing online tablespace recove
ry. to specify the time, SCN, natively, specify the UNTIL clause
it or bring recovered Tablespaces online.
ecovery, you can also use the RMAN BLOCKRECOVER ry recovers an individual corrup
t datablock ll number of blocks require media recovery, er than whole datafiles.
command as follows:
hived log compromises recoverability a/recovery/archive/arch_1_870_617116679.arc
h
let RMAN catalog
and time of the mounted target database
n old incarnation current then restore the and mount it. You will need to do "st
artup nomount"
e intended incarnation current in the recovery catalog.
_1 channel at date/time
ation (disk not found, no space, tape not loaded etc..)
alled "sbttest". This utility performs a simple test of the tempting to communic
ate with the media manager.
the command line:
equired parameter
ize block_count]>
r example, following is the description
he following table explains how to interpret the output:
ESTORE.BACKUPPIECECREATE
r 691 is corrupt in controlfile C:\ORACLE\ORA90\DATABASE\SNCFSUMMITDB.ORA ESTORE
.BACKUPPIECECREATE
estore. I get the following:
f command: IRESTORE channel BackupTest in exclusive enqueue for datafile 1 ESTOR
E.RESTOREBACKUPPIECE
nd execution on channel %s
---------------the accompanying error messages.
remental RMAN Backup
--------------------s Rapid Visibility (RaV) process, and therefore has not been
channel ORA_DISK_1
--------------------egato NetWorker and performed all of the steps o be very simple. The SA installe
d the 64-bit version r. However, we were running a 32-bit version of Oracle on i
t.
loaded. Call to dlopen for media library returned error.
install Media management module for Oracle.
a shared object library into process space. sage "ORA-27211: Failed to load Medi
a Management Library" rrect library name. The SBT_LIBRARY keyword must be set e
RMAN script. This keyword is not valid with the SEND command
/network/log/sqlnet.log
*****************
10.2.0.3.0 - Production SC System/6000: Version 10.2.0.3.0 - Production BM/AIX R
ISC System/6000: Version 10.2.0.3.0 - Production
4.123)(PORT=35844))
he codes underneath this one.
og in the recovery catalog ========================
rchivelog backup.
up the archive log.
ivelog in the Recovery Catalog
rying to backup archived log files.
backup archived log
5 6 7 8 9
stamp=420196579 stamp=420239024 stamp=420310708 stamp=420310800 stamp=420310879
_1_1 comment=NONE
IVE\PRODT001S01538.AR
IVE\PRODT001S01539.AR
IVE\PRODT001S01540.AR
IVE\PRODT001S01541.AR
IVE\PRODT001S01542.AR
g does not exist
the password file for me ig files and directories setup etup the Tape parameters
: ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt) looked good, i
went for my first test drive.
parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
OEM page. It's a simple test consisting of: parms 'ENV=(TDPO_OPTFILE=/usr/tivoli
/tsm/client/oracle/bin64/tdpo.opt)';
nnel at 05/22/2007 16:28:09
nt class name was not found."?
o Google. There is less than 30 results worldwide! I hate when that happens...
finally worked our way up to a SEV-1 analyst on a conference call and he figures
it out.
_3, or _4) because I was only allocating one channel (these values are only used
when more than one channel is o
: create 2 copies of all datafiles and 2 copies of all control files.
t class name was not found." error, the first question you need to ask yourself
is, "Am i using duplex copies",
or oracle in one of the My cluster Node.
/05/2005 12:56:36
--------------------ue with the Oracle relinking.
--------------------ensure your tdpo.conf file states you want to use Lanfree option. When in doubt,
view your environment with the
---------------------
--------------------/05/2005 12:56:36
's working directory.
--------------------bk64.a, which is in turn linked to the libobk64.a in the TDPO installation.
log location and nodename.
nt/bin/dsm.sys, which contains a server stanza for the TDPO.
commands to restore on, then open the database g a previous incarnation n the da
tabase is reset to y picks up a right control st be mounted for datafiles
o just before data was lost
ring control file
matically resets the database rnation is the new incarnation
l allow a restore
Part No. A76990-01
------------------------------on time or RESETLOGS
restored to an old
RCL1\ORCL1\SYSTEM01.D
RCL1\ORCL1\SYSAUX01.D
RCL1\ORCL1\UNDOTBS01.
RCL1\ORCL1\USERS01.DB
UPSET\2007_12_12\O1_M
UPSET\2007_12_12\O1_M
YY HH24:MI:SS')";
L1\ORCL1\SYSTEM01.DBF
L1\ORCL1\UNDOTBS01.DB
L1\ORCL1\SYSAUX01.DBF
L1\ORCL1\USERS01.DBF
UPSET\2007_12_12\O1_M
12-DEC-07<---------set this 12-DEC-07<-----its current
---------------------
YY HH24:MI:SS')";
ea\orcl1\ORCL1\BACKUPSET\2007_12_12\O1_MF_NCSNF_TAG20071212T150529_3OZDPGX9_.BKP
'
ELOG\2007_12_12\O1_MF
SET\2007_12_12\O1_MF_
YY HH24:MI:SS')";
and V$RMAN_OUTPUT row
L1\ORCL1\SYSTEM01.DBF
L1\ORCL1\UNDOTBS01.DB
L1\ORCL1\SYSAUX01.DBF
L1\ORCL1\USERS01.DBF
UPSET\2007_12_12\O1_M
C:\ORACLE\FLASH_RECOV
CL1\ARCHIVELOG\2007_1
--------------------ies its by default ss you dont purge it, Recycle Bin catches receives database o
bjects and its dependent objects i.e PK,
--------------------- ------------------2008-02-11:23:19:28
- ------------------2008-02-12:15:59:12 2008-02-11:23:19:28
.TABLESPACE_VERIFY'
database until cancel using backup controlfile
ed from a pre-upgrade backup.
ther words, on the restore of the old copy of the controlfile (pre-upgrade), the
incarnation was listed as 1. No
int_change#, checkpoint_time
#, resetlogs_change#, resetlogs_time
from v$database; ST_CHANGE# from v$log;
pe,HXERR Validity, quence from X$KCVFH;
e. Any other solution will not be a valid fix for the issue.
ecreating the controlfile
se modify it to build a create controlfile script and recreate the controlfile
RESETLOGS; TRACE;
velog required for recovery is either missing, lost or corrupted?
but you still cannot open the database, because the archivelog required for reco
very is either missing, lost or
ETLOGS_CORRUPTION=TRUE in the init.ora. But there is no 100% guarantee that this
will open the database. However
se, then restore the database from the said backup, and recover the database by
applying up to the last availabl
Unloader (DUL), which is performed by Oracle Field Support at the customer site
on the next business day and fo
le create SCN error
--------------------s Rapid Visibility (RaV) process, and therefore has not been subject to an indep
endent technical review.
f command: resync channel default
f command: resync channel default
een the catalog (RC_DATAFILE) and target
talog. The following queries will
e, but different from the catalog */
ESTORE.RESTOREBACKUPPIECE
n't find the backuppiece
he following query:
ame = 'c-1133799276-20040311-00'
able, or may require a
MS_ORA", belongs by TSM) and is
gether with the file called "TDPO_OPTFILE",
in64/tdpo.opt)';
bin64/tdpo.opt)';
e provided in UPPERCASE only.
************ cle
************
opt
e
ave to use password
this node locally:
bin/TDPO.dbqis_ora bin/TDPO.dblims_ora
.
in64/tdpo_DBLIMS.opt)';
n 2.2.1.0
L
ISA.dbf
dsm.opt
e 1, Level 6.11 ved.
ws
4-03-12 12:24:52
acle AIX) (Tcp/Ip
iguration is not LE in uppercase
atus of RMAN Backups
link Note : 247611.1 (revised on 27-02.2007) which addressed several known perfo
rmance problems with RMAN backup
S 6 MILLION ROWS +
NY ROWS IN THE CKP TABLE
LONG TIME TO COMPLETE
bt-tape-instead-o-88699/
used when more than one channel is opened to TSM, otherwise, it used the channel
appropriately named "DEFAULT")
self is, "Am i using duplex copies", if so, i'll bet you don't have a value for
"TDPO_MGMT_CLASS_2" in your tdpo
doubt, view your environment with the "showenv" variable. Oh For the likes of me
, since is midnight on a Tues, I
as been created. Note that if you run the RMAN command ALTER DATABASE OPEN RESET
LOGS (not the SQL statement with
oint before a RESETLOGS operation, or when attempting to undo the affects of a R
ESETLOGS by restoring backups ta
he current RMAN session.
ER DATABASE OPEN RESETLOGS option. If you do not, then RMAN refuses to access th
e recovery catalog because it ca
cord of the prior incarnation. If you do not run RESET DATABASE, RMAN recovers t
o the last incarnation recorded
r, then the control file must have a record of the prior incarnation.
e database incarnation. Run LIST INCARNATION OF DATABASE to obtain possible key
values. After you issue RESET DA
es an old incarnation of database trgt current again:
s started in CATALOG mode, but the RESYNC command fails because the incarnation
has not been reset in the catalo
ormed is to use the space bitmaps to find the blocks that are currently allocate
d and need to be included in the
p. Unused block optimization is a new feature in 10.2.0.2, with BLOCKS ALL the b
ackup will be done in the same w
a will be validated against file$ and control file. This is the default option (
1).
RESETLOGS (not the SQL statement with the same keywords), then RMAN resets the t
arget database automatically so
f a RESETLOGS by restoring backups taken before a RESETLOGS.
ss the recovery catalog because it cannot distinguish between a RESETLOGS operat
ion and an accidental restore of
ers to the last incarnation recorded in the control file.
key values. After you issue RESET DATABASE TO INCARNATION, then you can run RMAN
commands such as RESTORE and R
ocated and need to be included in the backup The backup seems to misread the spa
ce and then raises the ORA-600 e
the backup will be done in the same way that it was done in 10.2.0.1 and previou
s versions.
so a mismatch appeared.
l as, whether the log sequence# required for the recovery is still available in
the online redologs.
enerated from the beginning and until the completion of the said backup that was
used to restore the datafiles.
unted when the backup is taken, then the datafiles are already synchronized in t
erms of their SCN. In this situa
o determine whether the datafiles are synchronized or not. Take note that we que
ry the V$DATAFILE_HEADER, becaus
w for the online datafiles, then the datafiles are still not synchronized yet. I
n this case, we need to apply ar
abase in resetlogs. Even though we can recover the database beyond resetlogs for
the Oracle database starting fr
elog. To confirm, issue the following query, as shown below, that is to determin
e the redolog member(s) that you
ery to determine the redolog members:
uired for recovery is no longer available in the online redolog.
equence# is no longer available in the online redolog, since they are already ov
erwritten during the redolog swi
must immediately rebuild the database. Database rebuild means doing the followin
g, namely: (1) perform a full-d
only recover the database up to the last archivelog that is applied, and any dat
a after that are lost. If no arc
ts to pursue this approach, we need the complete name, phone# and email address
of the person who has the author
the target database automatically so that you do not have to run RESET DATABASE.
By resetting the database, RMA
peration and an accidental restore of an old control file. The RESET DATABASE co
mmand informs RMAN that you iss
n RMAN commands such as RESTORE and RECOVER.
dy overwritten during the redolog switches, then we cannot normally open the dat
abase, since the datafiles are
llowing, namely: (1) perform a full-database export, (2) create a brand new and
separate database, and finally
y data after that are lost. If no archivelogs are applied at all, then we can on
ly recover the database from th
ress of the person who has the authority to sign the work order in behalf of the
customer.
BASE. By resetting the database, RMAN considers the new incarnation as the curre
nt incarnation of the database.
SE command informs RMAN that you issued a RESETLOGS command.
base without even applying archivelogs, because the datafiles are already in a c
onsistent state, except if ther
the header of the physical datafile, and not the V$DATAFILE, which derives the i
nformation from the controlfile
ze all of the online datafiles. By the way, take note of the CHECKPOINT_TIME in
the V$DATAFILE_HEADER, which in
ntroduction of the format "%R" in the LOG_ARCHIVE_FORMAT, it is recommended that
you online the required datafi
e database, since the datafiles are in an inconsistent state. So, the following
are the 3 options available to
and separate database, and finally (3) import the recent export dump. This optio
n can be tedious and time cons
an only recover the database from the backup that is restored. However, if we re
stored from an online or hot ba
wing are the 3 options available to allow you to open the database:
option can be tedious and time consuming, but once we successfully open the new
database, then we expect minim
we restored from an online or hot backup, then we may not be able to open the da
tabase, because we still need t
he new database, then we expect minimal or perhaps no data loss at all. Before y
ou try this option, ensure that
the database, because we still need to apply the archivelogs generated during th
e said backup in order to synchr
ore you try this option, ensure that you have a good and valid backup of the cur
rent database.
ng the said backup in order to synchronize the SCN of the datafiles before we ca
n normally open the database.
e current database.
we can normally open the database.
AND
L.first_change# >= DF.min_checkpoint_change#;
If the above query returns no rows, because the V$DATABASE.CONTROLFILE_TYPE has
a value of "BACK of the redolog membes one at a time during the recovery. You ma
y run the following query to dete select from where and and ( al.sequence# v$arc
hived_log al, v$log rl al.sequence# = rl.sequence# (+) al.thread# = rl.thread# (
+) rl.status = 'INACTIVE' or rl.status is null
) and al.deleted = 'NO' order by al.sequence# The above command should show all
archived redologs which are ready to be backupped with rman if rman also deletes
the input. SELECT RECOVERY_ESTIMATED_IOS FROM V$INSTANCE_RECOVERY; The above sq
l gives you an idea about how many IO needs to be performed at recovery.
Examples: SQL> SELECT * FROM v$backup; FILE# ---------1 2 3 4 5 6 7 8 STATUS CHA
NGE# TIME ------------------ ---------- --------NOT ACTIVE 0 NOT ACTIVE 0 NOT AC
TIVE 0 NOT ACTIVE 0 NOT ACTIVE 0 NOT ACTIVE 0 NOT ACTIVE 0 NOT ACTIVE 0
8 rows selected. SQL> SELECT file#, FROM v$datafile; 2 FILE# STATUS ---------- -----1 SYSTEM 2 ONLINE 3 ONLINE 4 ONLINE 5 ONLINE 6 ONLINE 7 ONLINE 8 ONLINE 8 r
ows selected. SQL> SELECT file#, status, checkpoint_change# FROM v$datafile_head
er; status, substr(name, 1, 70)
SUBSTR(NAME,1,70) -------------------------------------------------------------------/dbms/tdbaprod/prodroca/database/default/system01.dbf /dbms/tdbaprod/prodr
oca/database/default/undotbs01.dbf /dbms/tdbaprod/prodroca/database/default/sysa
ux01.dbf /dbms/tdbaprod/prodroca/database/default/users01.dbf /dbms/tdbaprod/pro
droca/database/rocade/roc_rmlive_data01.dbf /dbms/tdbaprod/prodroca/database/roc
ade/roc_rmlive_indx01.dbf /dbms/tdbaprod/prodroca/database/rocade/roc_rmwork_dat
a01.dbf /dbms/tdbaprod/prodroca/database/rocade/roc_rmwork_indx01.dbf
2 FILE# ---------1 2 3 4 5 6 7 8
STATUS CHECKPOINT_CHANGE# ------- -----------------ONLINE 20344051 ONLINE 203440
51 ONLINE 20344051 ONLINE 20344051 ONLINE 20344051 ONLINE 20344051 ONLINE 203440
51 ONLINE 20344051
8 rows selected. SQL> 2 3 4 5
SELECT status,resetlogs_change#,resetlogs_time,checkpoint_change#, to_char(check
point_time, 'DD-MON-YYYY HH24:MI:SS') as checkpoint_time,count( FROM v$datafile_
header group by status, resetlogs_change#, resetlogs_time, checkpoint_change#, c
heckpoint_ order by status, checkpoint_change#, checkpoint_time ;
STATUS RESETLOGS_CHANGE# RESETLOGS CHECKPOINT_CHANGE# CHECKPOINT_TIME COUNT(*) ------ ----------------- --------- ------------------ -------------------- --------ONLINE 1 18-JUN-07 20344051 30-JUN-2008 08:20:56 8
SQL> SELECT substr(name,1,60), recover, fuzzy, checkpoint_change#, resetlogs_cha
nge#, re FROM v$datafile_header; 2 SUBSTR(NAME,1,60) REC FUZ CHECKPOINT_CHANGE#
------------------------------------------------------------ --- --- ----------------/dbms/tdbaprod/prodroca/database/default/system01.dbf NO YES 20344051 /dbm
s/tdbaprod/prodroca/database/default/undotbs01.dbf NO YES 20344051 /dbms/tdbapro
d/prodroca/database/default/sysaux01.dbf NO YES 20344051 /dbms/tdbaprod/prodroca
/database/default/users01.dbf NO YES 20344051 /dbms/tdbaprod/prodroca/database/r
ocade/roc_rmlive_data01.db NO YES 20344051 /dbms/tdbaprod/prodroca/database/roca
de/roc_rmlive_indx01.db NO YES 20344051 /dbms/tdbaprod/prodroca/database/rocade/
roc_rmwork_data01.db NO YES 20344051 /dbms/tdbaprod/prodroca/database/rocade/roc
_rmwork_indx01.db NO YES 20344051 8 rows selected. SQL> SELECT name, open_mode,
checkpoint_change#, ARCHIVE_CHANGE# FROM v$database; 2 NAME OPEN_MODE CHECKPOINT
_CHANGE# ARCHIVE_CHANGE# --------- ---------- ------------------ --------------P
RODROCA READ WRITE 20344051 20324343 SQL> SELECT GROUP#,THREAD#,SEQUENCE#,MEMBER
S,ARCHIVED,STATUS,FIRST_CHANGE# FROM v$log; GROUP# THREAD# SEQUENCE# MEMBERS ARC
STATUS FIRST_CHANGE# ---------- ---------- ---------- ---------- --- --------------- ------------1 1 901 1 YES INACTIVE 20324346 2 1 902 1 NO CURRENT 20344051
3 1 898 1 YES INACTIVE 20280936 4 1 899 1 YES INACTIVE 20280948 5 1 900 1 YES I
NACTIVE 20324332
CONTROLFILE_TYPE has a value of "BACKUP", then try to apply each u may run the f
ollowing query to determine the redolog members:
re ready to be backupped with
be performed at recovery.
----------------------------------fault/system01.dbf fault/undotbs01.dbf fault/s
ysaux01.dbf fault/users01.dbf cade/roc_rmlive_data01.dbf cade/roc_rmlive_indx01.
dbf cade/roc_rmwork_data01.dbf cade/roc_rmwork_indx01.dbf
TUS
RECOVERY_DEST_FILE CK_SIZE E_SIZE_BLKS
ID ME EATED SETLOGS_CHANGE# SETLOGS_TIME IOR_RESETLOGS_CHANGE# IOR_RESETLOGS_TIM
E G_MODE
V$INSTANCE_RECOVERY
RECOVERY_ESTIMATED_IOS ACTUAL_REDO_BLKS TARGET_REDO_BLKS LOG_FILE_SIZE_REDO_BLKS
LOG_CHKPT_TIMEOUT_REDO_BLKS LOG_CHKPT_INTERVAL_REDO_BLKS FAST_START_IO_TARGET_R
EDO_BLKS TARGET_MTTR ESTIMATED_MTTR CKPT_BLOCK_WRITES OPTIMAL_LOGFILE_SIZE ESTD_
CLUSTER_AVAILABLE_TIME WRITES_MTTR WRITES_LOGFILE_SIZE WRITES_LOG_CHECKPOINT_SET
TINGS WRITES_OTHER_SETTINGS WRITES_AUTOTUNE WRITES_FULL_THREAD_CKPT
CHIVE_CHANGE# NTROLFILE_TYPE NTROLFILE_CREATED NTROLFILE_SEQUENCE# NTROLFILE_CHA
NGE# NTROLFILE_TIME EN_RESETLOGS RSION_TIME EN_MODE OTECTION_MODE OTECTION_LEVEL
MOTE_ARCHIVE TIVATION# CHIVELOG_CHANGE# CHIVELOG_COMPRESSION COVERY_TARGET_INCA
RNATION# ST_OPEN_INCARNATION# RRENT_SCN ASHBACK_ON
PERS_ID ---------1 2
PERS_NAME --------------------db was never gebackupped before 1st backup
The SCN at that time is 549794. But ofcourse the SCN is always increasing. >>> N
ow we run our first backup: run { allocate channel t1 type disk; backup full dat
abase ; backup (spfile) (current controlfile) ; sql 'alter system archive log cu
rrent'; backup archivelog all delete input ; release channel t1; } Some time aft
er the backup, albert does an insert. SQL> select * from person; PERS_ID --------1 2 3 PERS_NAME ---------------------------db was never gebackupped before 1st
backup after 1ste backup
>>> Now we run our second backup: run { allocate channel t1 type disk; backup fu
ll database ; backup (spfile) (current controlfile) ; sql 'alter system archive
log current'; backup archivelog all delete input ; release channel t1; } Some ti
me after the second backup, albert does an insert. SQL> select * from person; PE
RS_ID ---------1 2 3 4 PERS_NAME ---------------------------db was never gebacku
pped before 1st backup after 1ste backup after 2nd backup
>>> Now we run our third backup: run { allocate channel t1 type disk; backup ful
l database ; backup (spfile) (current controlfile) ; sql 'alter system archive l
og current'; backup archivelog all delete input ; release channel t1; } SQL> SEL
ECT DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER() from dual; DBMS_FLASHBACK.GET_SYST
EM_CHANGE_NUMBER()
BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- --------- ----------- ------------ --------------137 Full 6.77M DISK 00:00:02 27-J
UN-08 BP Key: 141 Status: AVAILABLE Compressed: NO Tag: TAG20080627T104755 Piece
Name: C:\ORACLE\FLASH_RECOVERY_AREA\TEST10G\BACKUPSET\2008_06_27\O1_MF_NCNNF_TA
G20 Control File Included: Ckp SCN: 550302 Ckp time: 27-JUN-08
BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- --------- ----------- ------------ --------------203 Full 6.80M DISK 00:00:03 27-J
UN-08 BP Key: 210 Status: AVAILABLE Compressed: NO Tag: TAG20080627T111308 Piece
Name: C:\ORACLE\FLASH_RECOVERY_AREA\TEST10G\BACKUPSET\2008_06_27\O1_MF_NCSNF_TA
G20 Control File Included: Ckp SCN: 551014 Ckp time: 27-JUN-08
BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- --------- ----------- ------------ --------------228 Full 6.77M DISK 00:00:02 27-J
UN-08 BP Key: 232 Status: AVAILABLE Compressed: NO Tag: TAG20080627T111442 Piece
Name: C:\ORACLE\FLASH_RECOVERY_AREA\TEST10G\BACKUPSET\2008_06_27\O1_MF_NCNNF_TA
G20 Control File Included: Ckp SCN: 551032 Ckp time: 27-JUN-08 RMAN> So lets try
the restore with SCN=549830 RMAN> run { 2> allocate channel t1 type disk; 3> se
t until scn 549830; 4> restore controlfile; 5> alter database mount; 6> restore
database ; 7> recover database ; 8> release channel t1; 9> alter database open r
esetlogs; 10> } allocated channel: t1 channel t1: sid=156 devtype=DISK executing
command: SET until clause Starting restore at 27-JUN-08
channel t1: starting datafile backupset restore channel t1: restoring control fi
le channel t1: reading from backup piece C:\ORACLE\FLASH_RECOVERY_AREA\TEST10G\B
ACKUPSET\2008_06_27 23_469DWKVT_.BKP channel t1: restored backup piece 1 piece h
andle=C:\ORACLE\FLASH_RECOVERY_AREA\TEST10G\BACKUPSET\2008_06_27\O1_MF_NCSNF_TAG
20080627T 0080627T103023 channel t1: restore complete, elapsed time: 00:00:05 ou
tput filename=C:\ORACLE\ORADATA\TEST10G\CONTROL01.CTL output filename=C:\ORACLE\
ORADATA\TEST10G\CONTROL02.CTL output filename=C:\ORACLE\ORADATA\TEST10G\CONTROL0
3.CTL Finished restore at 27-JUN-08 database mounted Starting restore at 27-JUN08 Starting implicit crosscheck backup at 27-JUN-08 Crosschecked 1 objects Finis
hed implicit crosscheck backup at 27-JUN-08 Starting implicit crosscheck copy at
27-JUN-08 Finished implicit crosscheck copy at 27-JUN-08
searching for all files in the recovery area cataloging files... cataloging done
List of Cataloged Files ======================= File Name: C:\ORACLE\FLASH_RECOV
ERY_AREA\TEST10G\BACKUPSET\2008_06_27\O1_MF_ANNNN_TAG20080627T10 File Name: C:\O
RACLE\FLASH_RECOVERY_AREA\TEST10G\BACKUPSET\2008_06_27\O1_MF_ANNNN_TAG20080627T1
0 File Name: C:\ORACLE\FLASH_RECOVERY_AREA\TEST10G\BACKUPSET\2008_06_27\O1_MF_AN
NNN_TAG20080627T11 File Name: C:\ORACLE\FLASH_RECOVERY_AREA\TEST10G\BACKUPSET\20
08_06_27\O1_MF_NCNNF_TAG20080627T10 File Name: C:\ORACLE\FLASH_RECOVERY_AREA\TES
T10G\BACKUPSET\2008_06_27\O1_MF_NCNNF_TAG20080627T10 File Name: C:\ORACLE\FLASH_
RECOVERY_AREA\TEST10G\BACKUPSET\2008_06_27\O1_MF_NCNNF_TAG20080627T11 File Name:
C:\ORACLE\FLASH_RECOVERY_AREA\TEST10G\BACKUPSET\2008_06_27\O1_MF_NCSNF_TAG20080
627T10 File Name: C:\ORACLE\FLASH_RECOVERY_AREA\TEST10G\BACKUPSET\2008_06_27\O1_
MF_NCSNF_TAG20080627T10 File Name: C:\ORACLE\FLASH_RECOVERY_AREA\TEST10G\BACKUPS
ET\2008_06_27\O1_MF_NCSNF_TAG20080627T11 File Name: C:\ORACLE\FLASH_RECOVERY_ARE
A\TEST10G\BACKUPSET\2008_06_27\O1_MF_NNNDF_TAG20080627T10 File Name: C:\ORACLE\F
LASH_RECOVERY_AREA\TEST10G\BACKUPSET\2008_06_27\O1_MF_NNNDF_TAG20080627T11 File
Name: C:\ORACLE\FLASH_RECOVERY_AREA\TEST10G\BACKUPSET\2008_06_27\O1_MF_NNSNF_TAG
20080627T10 File Name: C:\ORACLE\FLASH_RECOVERY_AREA\TEST10G\BACKUPSET\2008_06_2
7\O1_MF_NNSNF_TAG20080627T10 File Name: C:\ORACLE\FLASH_RECOVERY_AREA\TEST10G\BA
CKUPSET\2008_06_27\O1_MF_NNSNF_TAG20080627T11
channel t1: starting datafile backupset restore channel t1: specifying datafile(
s) to restore from backup set restoring datafile 00001 to C:\ORACLE\ORADATA\TEST
10G\SYSTEM01.DBF restoring datafile 00002 to C:\ORACLE\ORADATA\TEST10G\UNDOTBS01
.DBF restoring datafile 00003 to C:\ORACLE\ORADATA\TEST10G\SYSAUX01.DBF restorin
g datafile 00004 to C:\ORACLE\ORADATA\TEST10G\USERS01.DBF restoring datafile 000
05 to C:\ORACLE\ORADATA\TEST10G\TEST01.DBF channel t1: reading from backup piece
C:\ORACLE\FLASH_RECOVERY_AREA\TEST10G\BACKUPSET\2008_06_27 23_469DSJF5_.BKP cha
nnel t1: restored backup piece 1 piece handle=C:\ORACLE\FLASH_RECOVERY_AREA\TEST
10G\BACKUPSET\2008_06_27\O1_MF_NNNDF_TAG20080627T 0080627T103023 channel t1: res
tore complete, elapsed time: 00:01:25 Finished restore at 27-JUN-08 Starting rec
over at 27-JUN-08 starting media recovery
channel t1: starting archive log restore to default destination channel t1: rest
oring archive log archive log thread=1 sequence=11 channel t1: reading from back
up piece C:\ORACLE\FLASH_RECOVERY_AREA\TEST10G\BACKUPSET\2008_06_27 27_469DXG4D_
.BKP channel t1: restored backup piece 1 piece handle=C:\ORACLE\FLASH_RECOVERY_A
REA\TEST10G\BACKUPSET\2008_06_27\O1_MF_ANNNN_TAG20080627T 0080627T103227 channel
t1: restore complete, elapsed time: 00:00:01 archive log filename=C:\ORACLE\ORA
DATA\LOG\ARC00011_0658480420.001 thread=1 sequence=11 media recovery complete, e
lapsed time: 00:00:02 Finished recover at 27-JUN-08 released channel: t1 databas
e opened new incarnation of database registered in recovery catalog starting ful
l resync of recovery catalog full resync complete RMAN> Now we return to databas
e test10g.
SQL> select * from person; PERS_ID ---------1 2 SQL> PERS_NAME -------------------db was never gebackupped before 1st backup
SQL> SELECT DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER() from dual; DBMS_FLASHBACK.
GET_SYSTEM_CHANGE_NUMBER() ----------------------------------------553255
Article 3.
TEST:
Incomplete Recovery to a point in time: up to a certain SCN
This example is quite similar to the example above. But there is a difference. T
his time, we have set the following default in rman: RMAN> CONFIGURE RETENTION P
OLICY TO RECOVERY WINDOW OF 1 DAYS;
This will mark all backups older than one day as obsolete. Now in this example w
e are going to t if we still can use a backup that s several days old. Lets first li
st our backups: RMAN> list backup of database; List of Backup Sets =============
======
BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- --------- ----------- ------------ --------------24 Full 498.62M DISK 00:01:24 28JUN-08 BP Key: 26 Status: AVAILABLE Compressed: NO Tag: TAG20080628T012918 Piece
Name: C:\ORACLE\FLASH_RECOVERY_AREA\TEST10G\BACKUPSET\2008_06_28\O1_MF_NNNDF_TA
G20 List of Datafiles in backup set 24 File LV Type Ckp SCN Ckp Time Name ---- - ---- ---------- --------- ---1 Full 545773 28-JUN-08 C:\ORACLE\ORADATA\TEST10G
\SYSTEM01.DBF 2 Full 545773 28-JUN-08 C:\ORACLE\ORADATA\TEST10G\UNDOTBS01.DBF 3
Full 545773 28-JUN-08 C:\ORACLE\ORADATA\TEST10G\SYSAUX01.DBF 4 Full 545773 28-JU
N-08 C:\ORACLE\ORADATA\TEST10G\USERS01.DBF 5 Full 545773 28-JUN-08 C:\ORACLE\ORA
DATA\TEST10G\TEST01.DBF
BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- --------- ----------- ------------ --------------88 Full 498.66M DISK 00:01:28 28JUN-08 BP Key: 93 Status: AVAILABLE Compressed: NO Tag: TAG20080628T014827 Piece
Name: C:\ORACLE\FLASH_RECOVERY_AREA\TEST10G\BACKUPSET\2008_06_28\O1_MF_NNNDF_TA
G20 List of Datafiles in backup set 88 File LV Type Ckp SCN Ckp Time Name ---- - ---- ---------- --------- ---1 Full 546326 28-JUN-08 C:\ORACLE\ORADATA\TEST10G
\SYSTEM01.DBF 2 Full 546326 28-JUN-08 C:\ORACLE\ORADATA\TEST10G\UNDOTBS01.DBF 3
Full 546326 28-JUN-08 C:\ORACLE\ORADATA\TEST10G\SYSAUX01.DBF 4 Full 546326 28-JU
N-08 C:\ORACLE\ORADATA\TEST10G\USERS01.DBF 5 Full 546326 28-JUN-08 C:\ORACLE\ORA
DATA\TEST10G\TEST01.DBF BS Key Type LV Size Device Type Elapsed Time Completion
Time
39
Full 6.77M DISK 00:00:02 28-JUN-08 BP Key: 43 Status: AVAILABLE Compressed: NO T
ag: TAG20080628T013052 Piece Name: C:\ORACLE\FLASH_RECOVERY_AREA\TEST10G\BACKUPS
ET\2008_06_28\O1_MF_NCNNF_TAG20 Control File Included: Ckp SCN: 545820 Ckp time:
28-JUN-08
etc.. Etc.. So now we try: RMAN> run { 2> allocate channel t1 type disk; 3> set
until scn 545801; 4> restore controlfile; 5> alter database mount; 6> restore da
tabase ; 7> recover database ; 8> release channel t1; 9> alter database open res
etlogs; 10> } allocated channel: t1 channel t1: sid=157 devtype=DISK executing c
ommand: SET until clause Starting restore at 30-JUN-08 channel t1: starting data
file backupset restore channel t1: restoring control file channel t1: reading fr
om backup piece C:\ORACLE\FLASH_RECOVERY_AREA\TEST1 18_46C1KQ3F_.BKP channel t1:
restored backup piece 1 piece handle=C:\ORACLE\FLASH_RECOVERY_AREA\TEST10G\BACK
UPSET\2008_06_28\O 0080628T012918 channel t1: restore complete, elapsed time: 00
:00:03 output filename=C:\ORACLE\ORADATA\TEST10G\CONTROL01.CTL output filename=C
:\ORACLE\ORADATA\TEST10G\CONTROL02.CTL output filename=C:\ORACLE\ORADATA\TEST10G
\CONTROL03.CTL Finished restore at 30-JUN-08 database mounted Starting restore a
t 30-JUN-08 Starting implicit crosscheck backup at 30-JUN-08 Crosschecked 1 obje
cts Finished implicit crosscheck backup at 30-JUN-08 Starting implicit crosschec
k copy at 30-JUN-08 Finished implicit crosscheck copy at 30-JUN-08 searching for
all files in the recovery area etc.. Etc.. Finished restore at 30-JUN-08 Starti
ng recover at 30-JUN-08 starting media recovery channel t1: starting archive log
restore to default destination channel t1: restoring archive log archive log th
read=1 sequence=8 channel t1: reading from backup piece C:\ORACLE\FLASH_RECOVERY
_AREA\TEST10G\BACKUPSET\2 04_46C1L9TC_.BKP channel t1: restored backup piece 1
piece handle=C:\ORACLE\FLASH_RECOVERY_AREA\TEST10G\BACKUPSET\2008_06_28\O1_MF_AN
NNN_TAG 0080628T013104 channel t1: restore complete, elapsed time: 00:00:02 arch
ive log filename=C:\ORACLE\ORADATA\LOG\ARC00008_0658542361.001 thread=1 sequence
=8 media recovery complete, elapsed time: 00:00:01 Finished recover at 30-JUN-08
released channel: t1 database opened new incarnation of database registered in
recovery catalog starting full resync of recovery catalog full resync complete S
o even with the small "retention period" of one day, we can restore a backup fro
m several days
Article 4. TEST: Restore a database from a former incarnation.
If you did a recovery of a database to a certain point in time, or a certain SCN
, then after the recovery, you must have opened the database with the "reset log
s" clause. As far as rman "sees it", a new Database Incarnation has been created
, and all backup start from scratch. The former backups just belong to the forme
r Incarnation, and are detached from the new incarnation. You "just start again
from 0" when you create new backups from the new incarnation. But, can we still
use the former backups, if we really need to do so? Yes they can. Suppose we hav
e target database prodross Suppose we have the rman catalog in database rman Sup
pose we have restored and recovered the target database to a prior SCN. In that
case, we have opened the target with the "reset logs" clause, and a new incarnat
ion was created. Lets see how this looks in rman RMAN> connect target / connecte
d to target database: PRODROSS (DBID=1443222271) RMAN> connect catalog rman/rman
@rman connected to recovery catalog database RMAN> list incarnation; List of DB
Key ------1 1 1 Database Incarnations Inc Key DB Name DB ID ------- -------- --------------8 PRODROSS 1443222271 2 PRODROSS 1443222271 345 PRODROSS 1443222271
STATUS Reset SCN Reset Time --- ---------- ---------PARENT 1 30-AUG-05 PARENT 53
4907 01-JUL-08 CURRENT 547426 01-JUL-08
If you were to open a sqlplus session to the RMAN database, you could have issue
d the following SQL query: SQL>select DBINC_KEY,DB_KEY,DB_NAME,RESET_SCN,RESET_T
IME,DBINC_STATUS from DBINC; DBINC_KEY DB_KEY DB_NAME RESET_SCN RESET_TIM DBINC_
ST ---------- ---------- -------- ---------- --------- -------2 1 PRODROSS 53490
7 01-JUL-08 PARENT
8 345
1 PRODROSS 1 PRODROSS
1 30-AUG-05 PARENT 547426 01-JUL-08 CURRENT
So, the table DBINC, as well as several other tables in the catalog, store the i
ncarnation infor Suppose now that we want to "restore" the database to a prior i
ncarnation, older backup. In this case, we need to "make clear" to rman, we are
going to use such an to the prior incarnation. We can do that by using the "RESE
T DATABASE TO INCARNATION <Key>" command. the database to that incarnation, char
acterized by the correct incarnation to use those older backups. How was the dat
abase a while ago? Lets check alberts person table. SQL> select * from albert.pe
rson; PERS_ID ---------1 2 3 PERS_NAME ----------------------------Before any ba
ckup After 1st backup After 2nd backup
using an sufficiently
old backup, belonging If we bring back key, we are able
Then we restored the 2nd backup. Albert's table now is PERS_ID ---------1 2 PERS
_NAME ----------------------------Before any backup After 1st backup
What we want to do now, is restore the first backup, so Albert's table should be
come PERS_ID PERS_NAME ---------- ----------------------------1 Before any backu
p Lets take a look at the first controlfile backup: RMAN> list backup of control
file; List of Backup Sets ===================
BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- --------- ----------- ------------ --------------32 Full 6.80M DISK 00:00:03 01-JU
L-08 BP Key: 34 Status: AVAILABLE Compressed: NO Tag: TAG20080701T074551 Piece N
ame: C:\ORACLE\FLASH_RECOVERY_AREA\PRODROSS\BACKUPSET\2008_07_01\O1_MF_NCSNF_TAG
2 Control File Included: Ckp SCN: 546782 Ckp time: 01-JUL-08 So now we are going
to reset the incarnation to the former one, and we will use the backup that was
associated to that incarnation. Watch this:
RMAN> RESET DATABASE TO INCARNATION 2; database reset to incarnation 2 RMAN> RES
TORE DATABASE UNTIL SCN 546782; Starting restore at 02-JUL-08 allocated channel:
ORA_DISK_1
RMAN> RUN { # Manually allocate a channel to the media manager ALLOCATE CHANNEL
t1 DEVICE TYPE sbt; # Restore autobackup of the control file. This example assum
es that you have # accepted the default format for the autobackup name. RESTORE
CONTROLFILE FROM AUTOBACKUP; # The set until command is used in case the databas
e # structure has changed in the most recent backups, and you wish to # recover
to that point-in-time. In this way RMAN restores the database # to the same stru
cture that the database had at the specified time. ALTER DATABASE MOUNT; SET UNT
IL SEQUENCE 1124 THREAD 1; RESTORE DATABASE; RECOVER DATABASE; } RMAN> ALTER DAT
ABASE OPEN RESETLOGS; # Reset the online logs after recovery completes
The following example of the RUN command shows the same scenario except with new
filenames for t RMAN> RUN { # If you need to restore the files to new locations
, tell Recovery Manager # to do this using SET NEWNAME commands: SET NEWNAME FOR
DATAFILE 1 TO '/dev/vgd_1_0/rlvt5_500M_1'; SET NEWNAME FOR DATAFILE 2 TO '/dev/
vgd_1_0/rlvt5_500M_2'; SET NEWNAME FOR DATAFILE 3 TO '/dev/vgd_1_0/rlvt5_500M_3'
; ALLOCATE CHANNEL t1 DEVICE TYPE sbt; RESTORE CONTROLFILE FROM AUTOBACKUP; ALTE
R DATABASE MOUNT; SET UNTIL SEQUENCE 124 THREAD 1; RESTORE DATABASE; SWITCH DATA
FILE ALL; # Update control file with new location of datafiles. RECOVER DATABASE
; } RMAN> ALTER DATABASE OPEN RESETLOGS;
Article 6: Oracle Paper
http://download-east.oracle.com/docs/cd/B19306_01/backup.102/b14191/rcmrecov003.
htm#i1006245 Oracle Database Backup and Recovery Advanced User's Guide 10g Release
2 (10.2) Part Number B14191-02
Performing Recovery with a Backup Control FileIf all copies of the current contr
ol file are lost then you must restore and mount a backup control file before yo
u can perform recovery. When using a backup control file, and using a recovery c
atalog, the process is identical to recovery with a current control file, as the
RMAN repository information missing from the backup control file is available f
rom the re There are special considerations when using a backup controlfile and
not using a recovery catalo The following notes and restrictions apply regardles
s of whether you use a recovery catalog:
You must run the RECOVER command after restoring a backup control file, even if
no datafiles hav
You must open the database with the RESETLOGS option after performing either com
plete or point-i with a backup control file.
If the online redo logs are inaccessible, then you must perform incomplete recov
ery to an SCN be in the online redo logs. This limitation is necessary because R
MAN does not back up online logs.
During recovery, RMAN automatically searches for online and archived redo logs t
hat are not reco
and catalogs any that it finds so that it can use them in recovery.
RMAN attempts to find a valid archived log in any of the current archiving desti
nations with the The current format is specified in the initialization parameter
file used to start the instance (or all instances in a Real Application Cluster
s installation). Similarly, RMAN attempts to find by using the filenames as spec
ified in the control file.
If you changed the archiving destination or format during recovery, or if you ad
ded new online l the control file, then RMAN may not be able to automatically ca
talog a needed online or archived RMAN reports errors similar to the following:
RMAN-00571: RMAN-00569: RMAN-00571: RMAN-03002: RMAN-06054: ====================
======================================= =============== ERROR MESSAGE STACK FOLL
OWS =============== ===========================================================
failure of recover command at 08/29/2001 14:23:09 media recovery requesting unkn
own log: thread 1 scn 86945
In this case, you must use the CATALOG command to manually add the required logs
to the reposito The cataloging procedure is described in Oracle Database Backup
and Recovery Basics.
Performing Recovery with a Backup Control File and No Recovery Catalog: Scenario
This section assumes that you have RMAN backups of the control file, but do not
use a recovery c
Assuming that you enabled the control file autobackup feature for the target dat
abase, you can r autobackup of the control file. Because the autobackup uses a d
efault format, RMAN can restore i a repository available that lists the availabl
e backups. You can restore the autobackup to the d RMAN replicates the control f
ile to all CONTROL_FILES locations automatically. Note:
If you know the backup piece name (for example, from the media manager or becaus
e the piece is o the piece name using the RESTORE CONTROLFILE FROM 'filename' co
mmand. The server records the loc in the alert log. Because you are not connecte
d to a recovery catalog, the RMAN repository contains only informati at the time
of the control file backup. If you know the location of other usable backup set
s or control file RMAN repository with the CATALOG command.
Because the repository is not available when you restore the control file, you m
ust use the SET the target database. The DBID is used to determine the location
of control file autobackups. Use in the following special circumstances:
You are not connected to a recovery catalog and want to restore the control file
or server param
You are connected to a recovery catalog and want to restore the control file, bu
t the database n in the recovery catalog. The server parameter file is lost and
you want to restore it. To recover the database with an autobackup of the contro
l file without a recovery catalog: Start RMAN and connect to the target database
. For example, run: CONNECT TARGET / Start the target instance without mounting
the database. For example: STARTUP NOMOUNT;
Set the database identifier for the target database with SET DBID. RMAN displays
the DBID whenev You can also obtain it by inspecting saved RMAN log files, quer
ying the catalog, or looking at t control file autobackup. (refer to "Restoring
Control File When Databases in the Catalog Have th SET DBID 676549873; Restore t
he autobackup control file, then perform recovery. Do the following:
Optionally, specify the most recent backup time stamp that RMAN can use when sea
rching for a con If you know that a different control file autobackup format was
in effect when the control file then specify a nondefault format for the restor
e of the control file.
If the channel that created the control file autobackup was device type sbt, the
n you must alloc Because no repository is available, you cannot use preconfigure
d channels.
Restore the autobackup of the control file, optionally setting the maximum numbe
r of days backwa and the initial sequence number that it should use in its searc
h for the first day.
If you know that your control file contained information about configured channe
ls that will be restore process, you can exit the RMAN client at this point, to
clear manually allocated channel the RMAN client and mount the database those co
nfigured channels become available for your use i
If you do not care about using configured channels from your control file, then
you can simply m
If the online logs are usable, then perform a complete restore and recovery as d
escribed in Orac
Otherwise, restore and perform incomplete recovery of the database, as described
in Oracle Datab Use an UNTIL clause to specify a target time , SCN or log seque
nce number for the recovery prior
In this example, the online redo logs have been lost, and the most recent archiv
ed log sequence how to restore the control file autobackup, then performs recove
ry of the database to log sequen RUN { # Optionally, set upper limit for eligibl
e time stamps of control file # backups # SET UNTIL TIME '09/10/2000 13:45:00';
# Specify a nondefault autobackup format only if required # SET CONTROLFILE AUTO
BACKUP FORMAT FOR DEVICE TYPE DISK # TO '?/oradata/%F.bck'; ALLOCATE CHANNEL c1
DEVICE TYPE sbt PARMS='...'; # allocate manually RESTORE CONTROLFILE FROM AUTOBA
CKUP MAXSEQ 100 # start at sequence 100 and count down MAXDAYS 180; # start at U
NTIL TIME and search back 6 months ALTER DATABASE MOUNT DATABASE; } # uses autom
atic channels configured in restored control file RESTORE DATABASE UNTIL SEQUENC
E 13243; RECOVER DATABASE UNTIL SEQUENCE 13243; # recovers to latest archived lo
g If recovery was successful, then open the database and reset the online logs:
ALTER DATABASE OPEN RESETLOGS;
Article 7.
How to use the Online redologs for recovery.
Subject: How To Recover Using The Online Redo Log Doc ID: Note:186137.1 Type: BU
LLETIN Last Revision Date: 11-OCT-2007 Status: PUBLISHED How to recover using th
e online redo log ======================================== PURPOSE
------To easily and quickly find out if the online redo log files can be used to
recover a database. AUDIENCE -------This document is addressed to DBAs that wan
t to quickly find the best recovery solution in case of a database crash. HOW TO
-----Many databases today are run without archive logging enabled, this reduces
the available options to quickly recover a database. Basically 2 options are av
ailable: a) restore from a backup b) recover the database using the online redo
logs. Option a) is straight forward and will not be covered here. Only important
thing to mention is that option a) WILL cause loss of data if there has been up
dates/inserts to the database since the backup was taken. Let us instead take a
look at option b): In case of a database crash or a database that will not start
up due to ORA-1110, ORA-1113 or both, we first need to identify which files need
to be recovered. 1) First we mount the database then issue the following query:
select * from v$recover_file;
This will give us a list of the files that need media recovery. It will also giv
e us CHANGE#, i.e. the SCN where the media recovery must start. To get the name
of the file use the FILE# column and query against v$datafile like this:
select name from v$datafile where file# = <file# from v$recover_file>
or like this in 9i:
select substr(d.name,1,30) fname , r.online_status , r.error , r.change# , r.tim
e from v$datafile d, v$recover_file r where d.file# = r.file#
2) Next we do:
archive log list
This will give us the current log sequence. We need the current log sequence -1.
This will give us the last redo log file that was in use. 3) As the last step w
e do:
select recid , stamp , sequence#
inconsistent database. The database MUST now be exported and rebuild as an incon
sistent database is unreliable, and hence not supported. This last option should
only be used in cooperation with Oracle Support
Article 8. Oracle paper:
RMAN best practices
Subject: Top 10 Backup and Recovery best practices. Doc ID: Note:388422.1 Type:
FAQ Last Revision Date: 05-DEC-2007 Status: PUBLISHED In this Document Purpose T
op 10 Backup and Recovery best practices. Questions and Answers
Applies to: Oracle Server - Enterprise Edition - Version: 9.2 Information in thi
s document applies to any platform. Purpose Top 10 Backup and Recovery best prac
tices. This document assumes that you are doing the Backup and Recovery basics =
- Running in Archivelog mode =- multiplexing the controlfile =- Taking regular b
ackups =- Periodically doing a complete restore to test your procedures. Questio
ns and Answers 1. Turn on block checking. REASON: The aim is to detect, very ear
ly the presence of corrupt blocks in the database. This has a slight performance
overhead, but will allow Oracle to detect early corruption caused by underlying
disk, storage system, or I/O system problems. SQL> alter system set db_block_ch
ecking = true scope=both;
2. Turn on block tracking when using RMAN backups (if running 10g) REASON: This
will allow RMAN to backup only those blocks that have changed since the last ful
l backup, which will reduce the time taken to back up, as less blocks will be ba
cked up. SQL> alter database enable block change tracking using file /u01/oradata/o
ra1/change_tracking.f ;
3. Duplex log groups and members and have more than one archive log dest. REASON
: If an archivelog is corrupted or lost, by having multiple copies in multiple l
ocations, the other logs will still be available and could be used. If an online
log is deleted or becomes corrupt, you will have another member that can be use
d to recover if required. SQL> alter system set log_archive_dest_2='location=/ne
w/location/archive2' scope=both; SQL> alter database add logfile member '/new/lo
cation/redo21.log' to group 1;
4. When backing up the database use the 'check logical' parameter REASON: This w
ill cause RMAN to check for logical corruption within a block as well as the nor
mal head/tail checksumming. This is the best way to ensure that you will get a g
ood backup.
been backed up. The next backup will back up those from location 2 as well as ne
w logs from location 1, then delete all that are backed up. This means that you
will have the archivelogs since the last backup available on disk in location 2
(as well as backed up once) and two copies backup up prior to the previous backu
p. See Note 443814.1 Managing multiple archive log destinations with RMAN for de
tails.
Article 9. Oracle article: Recovery after disk loss
Subject: Recover database after disk loss Doc ID: Note:230829.1 Type: TROUBLESHO
OTING Last Revision Date: 20-MAY-2007 Status: PUBLISHED
*** This article is being delivered in Draft form and may contain errors. Please
use the MetaLink "Feedback" button to advise Oracle of any issues related to th
is article. *** PURPOSE ------This article aims at walking you through some of t
he common recovery techniques after a disk failure SCOPE & APPLICATION -----------------All Oracle support Analysts, DBAs and Consultants who have a role to pl
ay in recovering an Oracle database Loss due to Disk Failure ----------------------What can we lose due to disk failure: A) Control files B) Redo log files C)
Archivelog files D) Datafiles E) Parameter file or SPFILE F) Oracle software ins
tallation Detecting disk failure ----------------------1) Run copy utilities lik
e "dd" on unix 2) If using RAID mechanisms like RAID 5, parity information may m
ask the disk failure and more vigorous check would be needed 3) As always, check
the Operating system log files 4) Another obvious case would be when the disk c
ould not be seen or mounted by the OS. 5) On the Oracle side, run dbverify if th
e file affected is a datafile 6) The best way to detect disk failure is by runni
ng Hardware diagnostic tools and OS specific disk utilities. Next Action ----------Once the type of failure is identified, the next step is to rectify them. Op
tions could be: (1) Replace the corrupted disk with a new one and mount them wit
h the same name (say /oracle or D:\)
(2) Replace the corrupted disk with a new one and mount them with a different na
me (say /oracle1 as the new mount point) (3) Decide to use another existing disk
mounted with a different name (say /oracle2) The most common methods are (1) AN
D (3). Oracle Recovery --------------Once the disk problem is sorted, the next s
tep is to perform recovery at the Oracle level. This would depend on the type of
files that is lost (see Loss due to Disk Failure section) and also on the type
of disk recovery done as mentioned in the "Next Action" section above. (A) Contr
ol Files -----------------Normally, we have multiplexing of controlfiles and the
y are expected to be placed in different disks. If one or more controlfile is/ar
e lost,mount will fail as shown below: SQL> startup Oracle Instance started ....
ORA-00205: error in identifying controlfile, check alert log for more info You
can verify the controlfile copies using: SQL> select * from v$controlfile; **If
atleast one copy of the controlfile is not affected by the disk failure, When th
e database is shutdown cleanly: (a) Copy a good copy of the controlfile to the m
issing location (b) Start the database Alternatively, remove the lost control fi
le location specified in the init parameter control_files and start the database
. **If all copies of the controlfile are lost due to the disk failure, then: Che
ck for a backup controlfile. Backup controlfile is normally taken using either o
f the following commands: (a) SQL> alter database backup controlfile to '/backup
/control.ctl'; -- This would have created a binary backup of the current control
file --->If the backup was done in binary format as mentioned above, restore the
file to the lost controlfile locations using OS copying utilities. --> SQL> sta
rtup mount; --> SQL> recover database using backup controlfile; --> SQL> alter d
atabase open; (b) SQL> alter database backup controlfile to trace; -- This would
have created a readable trace file containing create controlfile script ---> Ed
it the trace file created (check user_dump_dest for the location) and retain the
SQL commands alone. Save this to a file say cr_ctrl.sql --> Run the script SQL>
@cr_ctrl This would create the controlfile, recover database and open the datab
ase. ** If no copy of the controlfile or backup is available, then create a cont
rolfile creation script using the datafile and redo log file information. Ensure
that the
file names are listed in the correct order as in FILE$. Then the steps would be
similar to the one followed with cr_ctrl.sql script.
Note that all controlfile related SQL maintenance operations are done in the dat
abase nomount state
(B) Redo logs --------In normal cases, we would not have backups of online redo
log files. But the inactive logfile changes could already have been checkpointed
on the datafiles and even archive log files may be available. SQL> startup moun
t Oracle Instance Started Database mounted ORA-00313: open failed for members of
log group 1 of thread 1 ORA-00312: online log 1 thread 1: '/ORACLE/ORADATA/H817
/REDO01.LOG' ORA-27041: unable to open file OSD-04002: unable to open file O/S-E
rror: (OS 2) The system cannot find the file specified. ** Verify if the lost re
dolog file is Current or not. SQL> select * from v$log; SQL> select * from v$log
file; --> If the lost redo log is an Inactive logfile, you can clear the logfile
: SQL> alter database clear logfile '/ORACLE/ORADATA/H817/REDO01.LOG'; Alternati
vely, you can drop the logfile if you have atleast two other logfiles: SQL> alte
r database drop logfile group 1;
--> If the logfile is the Current logfile, then do the following: SQL> recover d
atabase until cancel; Type Cancel when prompted SQL>alter database open resetlog
s;
The 'recover database until cancel' command can fail with the following errors:
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below O
RA-01194: file 1 needs more recovery to be consistent ORA-01110: data file 1: '/
ORACLE/ORADATA/H817/SYSTEM01.DBF' In this case , restore an old backup of the da
tabase files and apply the archive logs to perform incomplete recovery. --> rest
ore old backup SQL> startup mount SQL> recover database until cancel using backu
p controlfile; SQL> alter database open resetlogs;
(1) A combination of each of these data loss recovery scenarios (2) Perform enti
re database restore from the last backup and apply archive logs to perform recov
ery. This is a highly preferred method but could be time consuming.
Note: For any issues or clarifications, call into Oracle Support
RELATED DOCUMENTS -----------------Note 103176.1 - How to Recover Having Lost Co
ntrolfiles and Online Redo Logs Note 184327.1 - Common Causes and Solutions on O
RA-1157 Error Found in B&R Note 198640.1 - How to Recover from a Lost Datafile w
ith Different Scenarios Note 183327.1 - Common Causes and Solutions on ORA-376 E
rror Found in B&R Note 183367.1 - Common Causes and Solutions on ORA-1113 Error
Found in B&R Note 117481.1 - Loss Of Online Redo Log And ORA-312 And ORA-313
th missing archivelogs
g behind from the rest of the datafiles.
quired to recover the said datafile are missing.
ecover it by applying up to the last available archivelog to roll it forward,
CORRUPTION=TRUE in the init.ora. But there is no 100% guarantee d, then you must
immediately rebuild the database. full-database export, (2) create a new and se
parate database,
er (DUL), which is performed by Oracle Field Support on-site for an extra charge
.
ke sure you have a good and recent export of the database as well. e a pipe, and
using gzip or compress, you . For example, a 500GB database can be exported to
a 25GB exportfile.
in time: up to a certain SCN
the table PERSON.
g: TAG20080627T104755 ACKUPSET\2008_06_27\O1_MF_NCNNF_TAG20080627T104755_469FTDJ
M_.BKP
g: TAG20080627T111308 ACKUPSET\2008_06_27\O1_MF_NCSNF_TAG20080627T111308_469HDDY
R_.BKP
g: TAG20080627T111442 ACKUPSET\2008_06_27\O1_MF_NCNNF_TAG20080627T111442_469HDN5
C_.BKP
ERY_AREA\TEST10G\BACKUPSET\2008_06_27\O1_MF_NCSNF_TAG20080627T103
T\2008_06_27\O1_MF_NCSNF_TAG20080627T103023_469DWKVT_.BKP tag=TAG
2008_06_27\O1_MF_ANNNN_TAG20080627T103227_469DXG4D_.BKP 2008_06_27\O1_MF_ANNNN_T
AG20080627T104805_469FTQ6T_.BKP 2008_06_27\O1_MF_ANNNN_TAG20080627T111453_469HDY
YR_.BKP 2008_06_27\O1_MF_NCNNF_TAG20080627T103209_469DWV0Z_.BKP 2008_06_27\O1_MF
_NCNNF_TAG20080627T104755_469FTDJM_.BKP 2008_06_27\O1_MF_NCNNF_TAG20080627T11144
2_469HDN5C_.BKP 2008_06_27\O1_MF_NCSNF_TAG20080627T103023_469DWKVT_.BKP 2008_06_
27\O1_MF_NCSNF_TAG20080627T104611_469FT57B_.BKP 2008_06_27\O1_MF_NCSNF_TAG200806
27T111308_469HDDYR_.BKP 2008_06_27\O1_MF_NNNDF_TAG20080627T104611_469FQ48S_.BKP
2008_06_27\O1_MF_NNNDF_TAG20080627T111308_469H9OK2_.BKP 2008_06_27\O1_MF_NNSNF_T
AG20080627T103209_469DWZ5C_.BKP 2008_06_27\O1_MF_NNSNF_TAG20080627T104755_469FTG
QX_.BKP 2008_06_27\O1_MF_NNSNF_TAG20080627T111442_469HDPF5_.BKP
ERY_AREA\TEST10G\BACKUPSET\2008_06_27\O1_MF_NNNDF_TAG20080627T103
T\2008_06_27\O1_MF_NNNDF_TAG20080627T103023_469DSJF5_.BKP tag=TAG
ERY_AREA\TEST10G\BACKUPSET\2008_06_27\O1_MF_ANNNN_TAG20080627T103
T\2008_06_27\O1_MF_ANNNN_TAG20080627T103227_469DXG4D_.BKP tag=TAG
420.001 thread=1 sequence=11
g: TAG20080630T044903 ACKUPSET\2008_06_30\O1_MF_NNNDF_TAG20080630T044903_46JOXJQ
X_.BKP
0G\UNDOTBS01.DBF
hile our latest backup is from 30 june. nt to investigate whether
s take a look at the backups
: TAG20080628T012918 ACKUPSET\2008_06_28\O1_MF_NCSNF_TAG20080628T012918_46C1KQ3F
_.BKP
: TAG20080628T013052 ACKUPSET\2008_06_28\O1_MF_NCNNF_TAG20080628T013052_46C1KY00
_.BKP
ERY_AREA\TEST10G\BACKUPSET\2
T\2008_06_28\O1_MF_ANNNN_TAG
361.001 thread=1 sequence=8
n restore a backup from several days old.
ime, or a certain SCN, with the "reset logs" clause.
en created, and all backup ormer Incarnation, and are
rom the new incarnation. to do so? Yes they can.
s" clause, and a new incarnation
this is the new incarnation you could have issued the following
INC_STATUS from DBINC;
rrent archiving destinations with the current log format. eter file used to star
t the instance on). Similarly, RMAN attempts to find the online redo logs
ecovery, or if you added new online log members after the backup of y catalog a
needed online or archived log. In this situation,
add the required logs to the repository so that recovery can proceed. ckup and R
ecovery Basics.
ery Catalog: Scenario rol file, but do not use a recovery catalog.
re for the target database, you can restore an a default format, RMAN can restor
e it even though it does not have u can restore the autobackup to the default or
a new location. ions automatically.
dia manager or because the piece is on disk), then you can specify ' command. Th
e server records the location of every autobackup
AN repository contains only information about available backups ation of other u
sable backup sets or image copies, add them to the
e control file, you must use the SET DBID command to identify tion of control fi
le autobackups. Use SET DBID command only
tore the control file or server parameter file. the control file, but the databa
se name is not unique
ile without a recovery catalog:
T DBID. RMAN displays the DBID whenever you connect to the target. querying the
catalog, or looking at the filenames of When Databases in the Catalog Have the S
ame Name: Example"). For example, run:
Do the following:
RMAN can use when searching for a control file autobackup to restore. was in eff
ect when the control file autobackup was created, device type sbt, then you must
allocate one or more sbt channels.
ing the maximum number of days backward that RMAN can search (up to 366) earch f
or the first day.
out configured channels that will be useful to you in the rest of the , to clear
manually allocated channels from step "c". If you then restart nnels become ava
ilable for your use in the rest of the restore and recovery process.
r control file, then you can simply mount the database at this point.
ore and recovery as described in Oracle Database Backup and Recovery Basics.
atabase, as described in Oracle Database Backup and Recovery Basics equence numb
er for the recovery prior to the first SCN of the online redo logs.
he most recent archived log sequence number is 13243. This example shows ecovery
of the database to log sequence 13243.
t the online logs:
E804DB1/arch/129.arc
be opened with:
ase back online:
as well as new logs at you will have the (as well as backed up
and ORA-1110 errors occur, then you would have restore from an old backup and st
art the database.
querying dba_extents
24 in thread 1.
d No Recovery Catalog: Scenario".
File and No Recovery Catalog: Scenario").
og After Upgrade").
o"Performing Disaster Recovery").