Skip to Main Content

Breadcrumb

Dev Live Dev Intro

We are celebrating Developers at AskTOM. We welcome Developers of all levels of experience to join us at our FREE Developer Live events coming in August and September. Just click on the left to register today! If you are brand new to Database Technology, then we also have got you covered. Just click on the right for your comprehensive FREE training program to kick start your Oracle Database Development journey!

Question and Answer

Tom Kyte

Thanks for the question, Yogeeraj.

Asked: January 13, 2003 - 8:30 am UTC

Answered by: Tom Kyte - Last updated: December 07, 2010 - 8:47 am UTC

Category: Database - Version: 8.1.7.4

Viewed 10K+ times! This question is

You Asked

Hello,

I have a question concerning RMAN backup to disk. I was doing my Database backup using RMAN (Full backup everyday) to disk until recently when we got a new application which required about 2 GB of additional disk space. With this my RMAN backup is starting to Fail!

My current database usage is as follows:
Total: 17,239,646,208
Free: 8,048,582,656
Used: 9,191,063,552
(bytes)

The error message i am getting is:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
RMAN-00571: ==========================================================
RMAN-00569: ============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ==========================================================
RMAN-03007: retryable error occurred during execution of command: backup
RMAN-07004: unhandled exception during command execution on channel fs2b
RMAN-10035: exception raised in RPC: ORA-19502: write error on file "/backup/rman/full/fs2/full_idecnd2s.2", blockno 67585 (blocksize=1024)
ORA-27072: skgfdisp: I/O error
HP-UX Error: 2: No such file or directory
Additional information: 67585
RMAN-10031: ORA-19624 occurred during call to DBMS_BACKUP_RESTORE.BACKUPPIECECREATE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
which i believe is related to insufficient disk space being available in file system /backup.

Fortunately, i have another file system /backup01 (which is reserved for RMAN Archived Redolog backup) with lots of free space.

hence, i have 2 file systems of different sizes available.
SLX1:>bdf /backup /backup01
Filesystem kbytes used avail %used Mounted on
/dev/vgexport/lv_export 31449088 26019860 5357748 83% /backup
/dev/vg00/lv_backup01 13312000 4704940 8338134 36% /backup01

My last successful FUll RMAN backup took 14GB (fitted in /backup => ).

My backup script is as follows:
1. Delete old backup
2. Do new backup
(NB. the disk backup is then to sent to tape by another scheduled process)

=====================================================================
#!/bin/sh
######################################################################
#Script name: rman_full.sh
#Description: RMAN full backup script
#last Modified: YD-10/01/2002
######################################################################
#Generate Script & Execute it
/prod/global/admin/bckup/generate_deletefull_script.sh > /prod/global/admin/bckup/rman_deletefull.sh
chmod +x /prod/global/admin/bckup/rman_deletefull.sh
/prod/global/admin/bckup/rman_deletefull.sh
######################################################################
messagelog="/backup/rman/logfiles/rman_full-`date +%d%m%y-%H%M`"
rman target sys/change_on_install@pfs rcvcat rman_dbslx1/rman_dbslx1@dev msglog
$messagelog <<EOF >/dev/null
run {
allocate channel fs1b type disk format='/backup/rman/full/fs1/full_%u.%p';
allocate channel fs2b type disk format='/backup/rman/full/fs2/full_%u.%p';
allocate channel fs3b type disk format='/backup/rman/full/fs3/full_%u.%p';
allocate channel fs4b type disk format='/backup/rman/full/fs4/full_%u.%p';
allocate channel fs5b type disk format='/backup/rman/full/fs5/full_%u.%p';
allocate channel fs6b type disk format='/backup/rman/full/fs6/full_%u.%p';
allocate channel fs7b type disk format='/backup/rman/full/fs7/full_%u.%p';

set limit channel fs1b kbytes=750000;
set limit channel fs2b kbytes=750000;
set limit channel fs3b kbytes=750000;
set limit channel fs4b kbytes=750000;
set limit channel fs5b kbytes=750000;
set limit channel fs6b kbytes=750000;
set limit channel fs7b kbytes=750000;
backup database include current controlfile;}
exit;
EOF
subject="RMAN-Backup Log (full) on `date`"
emailadd1=xxxx@xxx.mu
#
/usr/bin/mailx -s "$subject" $emailadd1 < $messagelog
#
=====================================================================

generate_deletefull_script.sh is as follows:
=====================================================================
#!/bin/sh
echo "rman target sys/change_on_install@pfs rcvcat rman_dbslx1/rman_dbslx1@dev m
sglog /backup/rman/logfiles/rman_full_delete-`date +%d%m%y-%H%M`.log <<EOF >/dev
/null"
echo "allocate channel for delete type disk;"
for i in `ls -1 /backup*/rman/full/fs*/* `
do
echo "change backuppiece '$i' delete; "
done
echo "release channel;"
echo "exit;"
echo EOF
=====================================================================


Question:
- How do i determine how much space will be required by my FULL rman backup?

- Based on the size of the file systems, how do i allocate my channels so that we make the best use of the file systems?

Thank you for your patience and precious guidance.

Best Regards
Yogeeraj


and we said...

...
My backup script is as follows:
1. Delete old backup
2. Do new backup
......

NO, please tell me that is NOT true. You need to keep at least two and preferably 3 or more of your last backups. ELSE YOU WILL LOSE ALL OF YOUR DATA SOMEDAY.

Consider:

a) you delete old backup
b) you start new backup
c) DISK FAILS NOW

Don't laugh -- I've not only seen it happen, I've seen it happen more then once and it will happen to you.

You need to buy a tape drive or some other storage device if you are somewhat serious about backup and recovery. You need to do that today.



As for the questions:

o I would use the size of my database as a starting point, and make sure I have 1.5 to 2x that much storage available for my current backup set. Why? Because my database could be that big and it'll grow and I want to have space to stuff it.


o that is up to you -- I would just stripe them all together into one big one and deal with it that way. My goal is to get that backup off to tape actually -- onto some other storage. away from my machines....




and you rated our response

  (58 ratings)

Is this answer out of date? If it is, please let us know via a Review

Reviews

great rman stuff - Tom

January 13, 2003 - 12:11 pm UTC

Reviewer: Jonathan


Thank you for the reply...

January 14, 2003 - 7:27 am UTC

Reviewer: Yogeeraj from Mauritius

hello,

YES. this is not true. In fact, i can't forget your words "I've seen it happen more than once and it will happen to you" which you have repeated on most of your replies to backup related questions ;)

The backup files being deleted are already on tape beforehand. In fact, we are keeping 6 copies of our last backups on high-speed tape (HP-Ultrium).

In fact, my script is as follows:
Repeat
1. Delete old backup
2. Do new backup
3. Send backup to Daily backup tape.
Everyday except Early Monday morning where you should append to the tape.
if monday,wednesday: Send backup tape to Phoenix head office.

I have yet to implement the restore of the backup files on my development server - As you have mentioned here - "onto some other storage"!

<quote>
I would use the size of my database as a starting point, and make sure I have 1.5 to 2x that much storage available for my current backup set. Why? Because my database could be that big and it'll grow and I want to have space to stuff it.
</quote>
Do you mean "1.5 to 2x" amount of storage on the SAME File System? I hope no! So how do i specify how much of the backup should go to which file system?

Thank you for your patience.

Best Regards
Yogeeraj

Tom Kyte

Followup  

January 14, 2003 - 7:50 am UTC

stripe it. make it easy for you -- just have one big old disk.

rman errors

June 19, 2003 - 1:27 pm UTC

Reviewer: Reader

Tom, When I use RMAN to recover a tablespace, using OEM interface, if there are any errors, where RMAN logs those errors? In command line mode rman shows the errors on the screen. Thanks. I appreciate your time.

restore with RMAN

June 28, 2003 - 7:59 pm UTC

Reviewer: Reader

If I wanted to use a specific backup, how do i tell RMAN? RMAN, my understanding is that it uses the most appropriate backup to restore from. Suppose, I have taken two full backups of my database, Sun and Mon. If I let RMAN to restore from, it would restore from MON backup. However, If I wanted to restore from SUN backup specifically, What command should I use? Thanks.

configure channel

July 09, 2003 - 5:13 pm UTC

Reviewer: Reader

Tom, is it possible to configure channels using CONFIGURE command for device type 'disk' for multiple locations? I understand that I can do it by manuaaly allocating channels and then i can specify format for each channel in RUN block. similarly, can i do it with CONFIGURE command? Thanks for your time.

Tom Kyte

Followup  

July 09, 2003 - 8:11 pm UTC

you could configure multiple channels, each with different settings, yes.


consider

RMAN> configure channel 1 device type disk format '/d01/bkup1/%U.bak';

using target database controlfile instead of recovery catalog
old RMAN configuration parameters:
CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT '/d01/bkup1/%U.bak';
new RMAN configuration parameters:
CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT '/d01/bkup1/%U.bak';
new RMAN configuration parameters are successfully stored

RMAN> configure channel 2 device type disk format '/d01/bkup2/%U.bak';

old RMAN configuration parameters:
CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT '/d02/bkup2/%U.bak';
new RMAN configuration parameters:
CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT '/d01/bkup2/%U.bak';
new RMAN configuration parameters are successfully stored

RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 2;

old RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK PARALLELISM 2;
new RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK PARALLELISM 2;
new RMAN configuration parameters are successfully stored

RMAN> configure default device type to disk;

old RMAN configuration parameters:
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
new RMAN configuration parameters:
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
new RMAN configuration parameters are successfully stored

RMAN> backup database;

Starting backup at 09-JUL-03
using target database controlfile instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=12 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=13 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current SPFILE in backupset
including current controlfile in backupset
input datafile fno=00011 name=/usr/oracle/ora920/OraHome1/oradata/ora920/o1_mf_undo_zhy26jk5_.dbf
input datafile fno=00001 name=/usr/oracle/ora920/OraHome1/oradata/ora920/system.dbf
input datafile fno=00005 name=/usr/oracle/ora920/OraHome1/oradata/ora920/example01.dbf
input datafile fno=00003 name=/usr/oracle/ora920/OraHome1/oradata/ora920/cwmlite01.dbf
input datafile fno=00004 name=/usr/oracle/ora920/OraHome1/oradata/ora920/drsys01.dbf
channel ORA_DISK_1: starting piece 1 at 09-JUL-03
channel ORA_DISK_2: starting full datafile backupset
channel ORA_DISK_2: specifying datafile(s) in backupset
input datafile fno=00009 name=/usr/oracle/ora920/OraHome1/oradata/ora920/users01.dbf
input datafile fno=00006 name=/usr/oracle/ora920/OraHome1/oradata/ora920/o1_mf_big_tabl_zjbvrkt3_.dbf
input datafile fno=00008 name=/usr/oracle/ora920/OraHome1/oradata/ora920/tools01.dbf
input datafile fno=00010 name=/usr/oracle/ora920/OraHome1/oradata/ora920/xdb01.dbf
input datafile fno=00007 name=/usr/oracle/ora920/OraHome1/oradata/ora920/odm01.dbf
input datafile fno=00002 name=/usr/oracle/ora920/OraHome1/oradata/ora920/tools02.db
channel ORA_DISK_2: starting piece 1 at 09-JUL-03
channel ORA_DISK_1: finished piece 1 at 09-JUL-03
piece handle=/d01/bkup1/01erqjs5_1_1.bak comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:06:07
channel ORA_DISK_2: finished piece 1 at 09-JUL-03
piece handle=/d01/bkup2/02erqjs6_1_1.bak comment=NONE
channel ORA_DISK_2: backup set complete, elapsed time: 00:06:06
Finished backup at 09-JUL-03

RMAN> exit


Recovery Manager complete.
[tkyte@tkyte-pc-isdn 9iR2]$ ls -l /d01/bkup?
/d01/bkup1:
total 1287428
-rw-rw---- 1 ora920 ora920 1317036032 Jul 9 20:11 01erqjs5_1_1.bak

/d01/bkup2:
total 1286260
-rw-rw---- 1 ora920 ora920 1315840000 Jul 9 20:11 02erqjs6_1_1.bak
[tkyte@tkyte-pc-isdn 9iR2]$




maxpiecesize

October 05, 2003 - 12:35 am UTC

Reviewer: Shankar from Salt Lake City, UT

I am trying to understand the usage of maxpiecesize usage.
Assume that D: drive capacity is 50M and C: drive capacity is 50m and my users tablespace size is 100m.
If I run the following run block in RMAN, does channel c1 create a piece of size 50M of users tablespace in D: path and another piece in the specified c: path? Is my understanding correct? does it mean that the backupset is spread in two locations with a piece in each location? thanks.

RMAN> run
{
allocate channel c1 type disk maxpiecesize=50m format='D:\rmanbackup\df_%U.bak';
allocate channel c2 type disk maxpiecesize=50m format='C:\oracle\ora92\database\df_%U.bak';
backup tablespace users;
}

Tom Kyte

Followup  

October 05, 2003 - 9:22 am UTC

no, it sets the maximum size of a backup piece, it does not control the max data written to a channel.

it'll use channel c1 in this case:

RMAN> run { allocate channel c1 type disk maxpiecesize=60m format = '/usr/oracle/ora920/OraHome1/oradata/bkup/d1/df_%U.bak';
allocate channel c2 type disk maxpiecesize=60m format = '/usr/oracle/ora920/OraHome1/oradata/bkup/d2/df_%U.bak';
backup tablespace example;
}
2> 3> 4>

allocated channel: c1
channel c1: sid=15 devtype=DISK

allocated channel: c2
channel c2: sid=17 devtype=DISK

Starting backup at 05-OCT-03
channel c1: starting full datafile backupset
channel c1: specifying datafile(s) in backupset
input datafile fno=00005 name=/usr/oracle/ora920/OraHome1/oradata/ora920/example01.dbf
channel c1: starting piece 1 at 05-OCT-03

channel c1: finished piece 1 at 05-OCT-03
piece handle=/usr/oracle/ora920/OraHome1/oradata/bkup/d1/df_04f343j5_1_1.bak comment=NONE
channel c1: starting piece 2 at 05-OCT-03
channel c1: finished piece 2 at 05-OCT-03
piece handle=/usr/oracle/ora920/OraHome1/oradata/bkup/d1/df_04f343j5_2_1.bak comment=NONE
channel c1: backup set complete, elapsed time: 00:00:15
Finished backup at 05-OCT-03
released channel: c1
released channel: c2



Thanks. It helped.

October 05, 2003 - 10:41 am UTC

Reviewer: Shankar from Salt Lake City


Use 9x and backup to tape from disk

October 05, 2003 - 10:57 am UTC

Reviewer: Dana from Phoenix, AZ USA

The big failure point the backup from disk to tape.
You are depending on a process rman does not know about to get your backuppieces from one media to another. Use Oracle 9, get a media management layer for rman, and have rman do the backup from disk to tape.
Not only will you have more security, it is transparent to recover. Rman will know which pieces it needs to fetch from tape, and which from disk.


Please answer original question! :)

June 09, 2004 - 12:40 pm UTC

Reviewer: Robert from Memphis, USA

Tom,

You never answered the specific original question...

"How do i determine how much space will be required by my FULL rman backup?"

Take a single tablespace for example.
In my experience, the sum of the size of my backup pieces appears to fall somewhere between the sum(dba_segment.bytes) and sum(dba_data_file.bytes) for a given tablespace.

Is there an accurate method to predict the amount of disk space required for a given backup?

Thanks,

Robert.




Tom Kyte

Followup  

June 09, 2004 - 1:56 pm UTC

it will be less than or equal to the sum of the sizes of your files.

it can be less because rman won't backup blocks *never used* but there isn't a way for us to tell beforehand how many blocks haven't been used.


I did answer the question as best as it could be:

o I would use the size of my database as a starting point, and make sure I have
1.5 to 2x that much storage available for my current backup set. Why? Because
my database could be that big and it'll grow and I want to have space to stuff
it.

rman backup on windows

June 27, 2004 - 4:01 am UTC

Reviewer: A reader

hi tom
we have unix server on rman default backup is taken on ?/dbs/ directory.
we installed catalog db on windows and given format paramter to take it into local d:\backup drive but it is stilll taking backup on unix dbs directory.

should we give tcp/ip address in format paramter to take it on local m/c.

thanks

Tom Kyte

Followup  

June 27, 2004 - 11:14 am UTC

rman the client is running on windows, but rman itself is always going to run on the server (it uses the oracle binary on the unix machine to perform the backup)

so, you'll have to mount a windows networked disk on the unix machine and backup to that if you want it on the windows machine.

June 27, 2004 - 11:38 am UTC

Reviewer: A reader

an nfs(networking file system) will do i think.
we have nfs

thanks

Why such a strange behaviour!!!!!!!!!!!!!

June 28, 2004 - 1:41 pm UTC

Reviewer: A reader

Hi Tom,
I am using RMAN with the catalog. I have configured exclude tablespace feature in my backup configuration.
My question is why doesn't oracle ignore this tablespace while specifying report need backup.
To be precise:
I have excluded the example tablespace from my backups. It does not back it up. But when I issue "Report need backup" it shows the excluded tablespace needs more than 4 days of archivelogs.
Retention policy is set to a window of 4 days.
Since it ignores it during backup why does it specify that. I don't need it that is why it has been excluded.
In fact it should delete the backups and archivelogs not needed to restore the rest of the tablespaces.
Oracle version is 9iR2 on Windows 2000 Server.
Please shed some light.
Thanks as always......

Tom Kyte

Followup  

June 28, 2004 - 2:11 pm UTC

that would be an enhancement request for support if you feel it is wrong.

followup to above..

June 28, 2004 - 4:01 pm UTC

Reviewer: bob from PA

EXCLUDE doesn't work really the way I would want it to, there is a related bug that I have been meaning to file for the last week or so that relates to your above post.

I think the "report need backup" problem you mention is a related bug to the following EXCLUDE bug:

1. create a database,
2. Turn on exclude for a tablespace
3. back up everything else plus archive logs, many many times with many log switches in between
4. set redundancy policy to 1
5. delete obsolete

notice, all archive log backups every created will be preserved. They will never be marked obsolete, until the tablespace you are excluding is actually backed up. As soon as you backup that tablespace a ton of logs will go obsolete. They were only being preserved to maintain recoverability of a tablespace that you were excluding in the first place.

So excluding tablespaces doesn't buy you anything in terms of space storage, since if you are using RMAN to maintain your catalog and file system, eventually the archives that accrue for the whole database will take more space than that tablespace you were excluding.

If you want to use EXCLUDE forever with a tablespace you need to manually delete backed up archive log pieces, and than routinely crosscheck them to get them out of the catalog, or every so often actually back up the tablespace you have been excluding.

In the same regards, the catalog believes you need to back them up with report need backup, even though you have exclude configured. To me this is a bug.

This was on 9.2.0.4 and 9.0.1.4

Tom Kyte

Followup  

June 28, 2004 - 4:34 pm UTC

(same sort of answer -- please contact support.... they handle bugs and enhancement requests)


I see exclude as being a way to "hey, this time around, don't back up that tablespace -- get the others" but not on a persistent sort of basis. It is a strange situation to have a tablespace that contains data "that isn't worth the disk it is sitting on", you apparently don't care if this data exists or not -- in a database with data you do care about. So, I would argue that your use of exclude is the exception -- not the rule.

Agreed Bob

June 28, 2004 - 4:46 pm UTC

Reviewer: A reader

I agree with you Bob. But the question is that RMAN automizes the backup and restore procedure and simplifies it the deletion of Obsolete backups. So why should I analyze each and every backup in case Exclude is configured. Also since I don't need that tablespace it has been configured to be excluded, RMAN should behave as if it does not exist.
Why should I backup the excluded tablespace if I don't need it?


Tom Kyte

Followup  

June 28, 2004 - 7:12 pm UTC

because you are looking at "backup" as an atomic thing and rman see's it as a continous thing.

there is a database.
it needs to be protected.
not tablespaces.
the database.
not a file.
a database.

so what, you ran a backup and exclude a tablespace? that doesn't mean

a) the tablespace is not relevant.
b) the tablespace should not be recoverable.

the tablespace is just a teeny bit of a big organism.

i agree

June 28, 2004 - 4:50 pm UTC

Reviewer: bob from PA

I agree with your assessment 100%. I didn't think it was a bug either, until rman product support said it was. I assumed, like you, that it was intended behavior, a one time skip kind of thing as you described. I even argued that side of it and can see all kinds of reasons why you wouldn't want it to direct the catalog to drop relevant data that you just intended to exclude that one time, so I was suprised when support said otherwise. I was originally looking for an enhancement for the rare case where you really don't care about something.






agree with tom that is..

June 28, 2004 - 4:53 pm UTC

Reviewer: bob from PA

a reader slipped in between my post and tom's response. I was agreeing with tom's description that it is a rare case that data is not wanted at all..

but like the other reader says, I want the ability not to have to maintain my catalog and file system manually (the whole point of RMAN)..



RMAN Backup on Tap Drive

July 09, 2004 - 1:29 am UTC

Reviewer: Mahesh Kumar from Delhi, India

Hi Tom

I wanna know how to take backup on Tap Drive Using RMAN. I am having Oracle 9i on Solaris and HP Tap Drive.

Thanx & Regards



Tom Kyte

Followup  

July 09, 2004 - 7:35 am UTC

you need a media manager from somewhere like legato for example:

</code> http://docs.oracle.com/docs/cd/B10501_01/server.920/a96566/rcmintro.htm#451880 <code>

RMan Bakup Failure

September 14, 2004 - 11:17 am UTC

Reviewer: a reader from Houston,TX

Hi Tom,

Our Rman backups have been running fine for a year but suddenly this weekend we got the following errors in all our production dbs that is 3 prodn dbs

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ch2 channel at 09/10/2004 22:37:04
ORA-19502: write error on file "/u04/backups/.....", blockno 18561 (blocksize=8192)
ORA-27072: skgfdisp: I/O error
Linux Error: 5: Input/output error

Oracle Version : 9.2.0.3.0
OS : Red Hat Linux AS2.1

I checked Metalink for answers but I coudnt find any for my particular problem

Tom Kyte

Followup  

September 14, 2004 - 11:50 am UTC

I/O error - have your OS admin check out that disk, review the OS system logs for scsi or whatever errors on those devices.

Looks like a disk is "not functioning properly"

About dbms_backup_restore

October 18, 2004 - 12:40 am UTC

Reviewer: YenYang

Hello,
I've few of questions
(1) I know in one situation we can use dbms_backup_restore that's when we have not enabled automated backups of our control file and we are not using recovery catalog.
Is there any other situation in which dbms_backup_restore is used to recover spfile or control file ?

(2) I wanted to restore spfile so I did the following :
While backing up :
configure default device type to disk;
configure channel device type disk format 'd:\rmanbackup\backup_%U';
configure controlfile autobackup on;
backup database;

While restoring spfile :
shutown
log into rman

set oracle_sid=mydb
rman target sys/passwd
set dbid = 227190981
startup nomount;
run
{
set controlfile autobackup format for device type disk to 'd:\backup\%F';
restore spfile from autobackup;
}

It gives an error : 065641 Must use the TO clause when the instance is started with SPFILE.
As per the Oracle 9i RMAN Backup & Recovery book it should work.
May be Im missing something. What's the reason and how to correct ?

(3) Going through the chapter 10 on recovering a lost control file in archive log mode I stummbled at this part from the same book.

It says in the event of only control file was lost then the recovery of control file and the db is fairly simple.

set oracle_sid = recover
rman target sys/robert
set dbid = 3434454545
startup nomount;
restore controfile from autobackup;
alter database mount;
recover database noredo;
alter database open resetlogs;

then when is this following done :

set oracle_sid = recover
rman target sys/robert
set dbid = 3434454545
startup nomount;
restore controfile from autobackup;

is it that after this complete recovery must be done ?



Tom Kyte

Followup  

October 18, 2004 - 8:05 am UTC

1) under any circumstance, the only documented usable function in that entire package is dbms_backup_restore.normalizefilenames to be used during migration. It is an "internal package" used by rman.


2) sounds like the instance was started with the spfile (eg: you backed up the spfile sure -- but did you wipe it out. when you did the startup nomount, what type of parameter file was used? if it was an spfile, well, you cannot restore over the existing one)

3) complete or incomplete could be done. chapter 10 walks through this.

Size of Backup

March 15, 2005 - 2:08 am UTC

Reviewer: A reader

Hi Tom,

The following is the output from my Database :-
SQL> select sum(bytes)/(1024*1024*1024) from dba_segments;
SUM(BYTES)/(1024*1024*1024)
---------------------------
           4.95909118652344

SQL> select sum(bytes)/(1024*1024*1024) from dba_data_files

SUM(BYTES)/(1024*1024*1024)
---------------------------
            21.487548828125

But when I do a full backup of the Database the size of backup piece generated is :-

bash-2.03$ ls -lrt
total 29241760
-rw-r-----   1 oracle  dba      14964465664 Mar 14 18:10 testdb_3agfab1f_1_1

Which comes to around 13.93 GB.

There were a lot of unnecessary schemas created which I droppped, Do I need to resize the Datafiles to reduce the size of the backup piece generated?

Thanks 

Tom Kyte

Followup  

March 15, 2005 - 8:00 am UTC

rman will back up every block that was ever used, even if it currently is not being used.

You would have to shrink the files (search for maxshrink on this site) if you want to possibly reduce the size of your backups.

RMAN and Large Pool

April 15, 2005 - 3:19 am UTC

Reviewer: Vivek Sharma from Bombay, India

Hi Tom,

I have a question on RMAN and Large Pool. I believe that Large Pool should be configured when using RMAN. I have a book "Oracle 9i RMAN Backup and Recovery" written by Robert Freeman and Matthew Hart, published by Oracle Press.

In this book, the authors say that though we configure Large_pool, it will not be used by default instead PGA memory will be used unless BACKUP_TAPE_IO_SLAVES or DBWR_IO_SLAVES parameter are set to TRUE. The Statement in the book (Chapter 1, Page 14) is

"The large pool is used by RMAN in specific cases and is not used by default, even if it is configured. RMAN allows duplex RMAN Backups (or make concurrent copies of the same backup in different places) if either of the database parameters, BACKUP_TAPE_IO_SLAVES or DBWR_IO_SLAVES, is set to TRUE. In this case, Oracle can use large pool memory rather than local memory (PGA). The use of the PGA is the default."

I am unable to understand this. Would like to know certain things :

1. When using RMAN, Shared Pool should be tuned well and increased for pinning of RMAN packages and procedures
and
2. Validity of the statement published in the book.

An explanation will be highly appreciated.

Thanks and Regards
Vivek

Tom Kyte

Followup  

April 15, 2005 - 9:02 am UTC

1) i'm not a big fan of pinning, especially something that is used once in a while like this. the shared pool should be right sized, but that is it.

2) that sounds right to me.

user managed backup and recovery versus RMAN

April 16, 2005 - 5:22 am UTC

Reviewer: scott from calgary ab canada

Hi Tom,

How do you respond to the statement "a database recovery may be required before a database recovery can begin?"

That is, the RMAN repository must be in place before DB recovery can begin.



Tom Kyte

Followup  

April 16, 2005 - 8:54 am UTC

not sure what you are getting at here.

If you are using a recovery catalog, and you want to use the recovery catalog, then the recovery catalog must be available, yes.

However the recovery catalog is not mandatory

And in the event the target database is in need of recovery, it would be unusual for the recovery catalog to also be in need of recovery?

RMAN Connecting to non-database user account

April 19, 2005 - 3:31 pm UTC

Reviewer: Vivek Sharma from Bombay, India

Hi Tom,

I have a 9201 database in which there is no RMAN_BACKUP User which can be seen from dba_users.

SQL> select username from dba_users order by 1;

USERNAME
------------------------------
ANONYMOUS
CTXSYS
DBSNMP
HR
MDSYS
ODM
ODM_MTR
OE
OLAPSYS
ORDPLUGINS
ORDSYS
OUTLN
PM
QS
QS_ADM
QS_CB
QS_CBADM
QS_CS
QS_ES
QS_OS
QS_WS
RMAN
SCOTT
SH
SYS
SYSTEM
VIVEK
WKPROXY
WKSYS
WMSYS
XDB

31 rows selected.

There is only one database on my machine and when I connect to RMAN with RMAN_BACKUP or any other username, which is not existing in the database and take a backup of a datafile it succeeds. How is it possible ?

The commands issued were :

c:\>RMAN TARGET RMAN_BACKUP/RMAN_BACKUP LOG=vivek.log
RMAN>backup datafile='e:\oracle\oradata\prod\tools01.dbf';
RMAN>exit;

Content of vivek.log
---------------------
Recovery Manager: Release 9.2.0.1.0 - Production

Copyright (c) 1995, 2002, Oracle Corporation.  All rights reserved.

connected to target database: PROD (DBID=4237381397)

RMAN> 
Starting backup at 20-APR-05
using target database controlfile instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=15 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00008 name=E:\ORACLE\ORADATA\PROD\TOOLS01.DBF
channel ORA_DISK_1: starting piece 1 at 20-APR-05
channel ORA_DISK_1: finished piece 1 at 20-APR-05
piece handle=E:\ORACLE\ORA9\DATABASE\04GIA0V2_1_1 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:08
Finished backup at 20-APR-05

Similarly when I connect to man_backup, it connects. Would like to know, how can it connect to a database user which is not existing in the database.

Awaiting your response.

Thanks and Regards
Vivek


RMAN> 

Recovery Manager complete.

 

Tom Kyte

Followup  

April 19, 2005 - 7:42 pm UTC

it is doing an as sysdba connection, it is just using OS authentication, the user/pass is needed over the network.

Rman Recovery

May 02, 2005 - 7:11 am UTC

Reviewer: Galib

hi Tom
I have a problem about recovery....
I configure the parameters
I take backup normally
I cant do the recovery.. I take error please help me I cant take back my database


RMAN> restore controlfile from 'C:\Oracle93\oradata\db1_Rman\CTL_DB1_C-1150710560-20050429-00 ';

Starting restore at 02-MAY-05

using target database controlfile instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=11 devtype=DISK
channel ORA_DISK_1: restoring controlfile
channel ORA_DISK_1: restore complete
replicating controlfile
input filename=C:\ORACLE93\ORADATA\DB1\CONTROL01.CTL
output filename=C:\ORACLE93\ORADATA\DB1\CONTROL02.CTL
output filename=C:\ORACLE93\ORADATA\DB1\CONTROL03.CTL
Finished restore at 02-MAY-05

RMAN> mount database;

database mounted

RMAN> restore database;

Starting restore at 02-MAY-05

using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 05/02/2005 16:00:55
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 5 found to restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore

RMAN>



Tom Kyte

Followup  

May 02, 2005 - 8:42 am UTC

I cannot answer this, no idea how you did the backup in the first place.

RMAN - ( Dispatcher ) Database Registraion

August 17, 2005 - 2:08 am UTC

Reviewer: VIKAS SANGAR from INDIA.

Dear Mr. Kyte,

While configuring Rman (Oracle 9i, Shared server - Win XP), After conecting to Target Database at Rman Prompt, i had created a recovery catalog using the command

RMAN> CREATE CATALOG
Recovery Catalog Created

Now when i intend to register the Dtabase that i want to be Backed up, I am getting the follwing messages :-

database registered in recovery catalog
RMAN-00571: ================================================
RMAN-00569: ======== ERROR MASSAGE STACK FOLLOWS ===========
RMAN-00571: ================================================
RMAN-03008: error while performing automatic resync of
recovery catalog
RMAN-19550: cannot use backup/restore function while using
dispatcher

Can you pls tell me

-> What is this message all about?
-> What shall i do to resolve these errors, and ensure
smooth and effective backup/recovery of my databases?
-> Why did Oracle flashed this message to me?
-> What might have been the internal and external resons
that lead to this error message? What might had been
going in the mind (oracle background processes)of Oracle?
-> Even though my database had got registered with RMAN
recovery catalog, why it says, that i connot use
backup/restore functions while using despatcher? How can
i correct this?

Thanks for your valuable Advice in advance
Regards...

VIKAS.


Tom Kyte

Followup  

August 17, 2005 - 12:39 pm UTC

it is telling you that you cannot use a shared server connection to perform that operation. use dedicated server (many admin things are like that)

this error message seemed sort of clear to me?

Follow_up - RMAN (Shared Server)

August 18, 2005 - 1:19 am UTC

Reviewer: VIKAS SANGAR from INDIA

Oh my God, This is really a heck.
I am so suprised to learn this that, "Rman cannot be used/configured for Shared Server Databases in Oracle."

So it means, all those who have oracle database on Shared Server are deprived of using this utility?

Mr. kyte dont you think this to be something really underdeveloped and lacking in Oracle & something should be done to fortify and finish this lack.

If not RMAN, then what should such people & organisations do to cope-up with their backup related isuues?

-> Go on for Cold/Hot Backups.
-> Use some other third party tools for backup.
-> Reinstall Oracle, or create new Database with Dedicated
Server option, and then Export/Import their respected
objects into it? etc...

And the most important peice of information that i would like to obtain from you is :-

-> Can i convert/change my current Shared Server connection
to the Dedicated one? If yes, then how can this be
achieved and what are the things that i should keep in
mind and handy.
-> Or, is their any other tool/utility which you may
consider appropriate for this purpose.
-> Lastly is their any other way by which we can put RMAN to
work efficiently with databases with Shared Server
connection?

Take care, regards....
Vikas.


Tom Kyte

Followup  

August 18, 2005 - 3:55 pm UTC

why? shared server is a way to get thousands and thousands of users connected to a database.

shared server is NOT a way to connect as an admin.


A database is NEVER "ON SHARED SERVER". dedicated server is "always" -- always always always - available. Period. ALWAYS available.

A database may be configured to support shared server connections (or not). That a database supports shared server does not mean it does not do dedicated server. Not at all.

You have a misunderstanding of the way it works. There is nothing "lacking" here, just connect via dedicated server is all.

dedicate_connection =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = host)(PORT = 1525))
)
(CONNECT_DATA =
(SERVER = DEDICATED)

(SERVICE_NAME = your_service)
)
)




RMAN - Shared Server (Feed Back)

August 19, 2005 - 1:37 am UTC

Reviewer: VIKAS SANGAR from INDIA

Thanx a lot Mr. Kyte.

It really helped me a lot to overcome the misconception regarding Shared Server. My confusion regarding the matter in clear now. It really worked.

Take care regards....
Vikas.

reader

November 07, 2005 - 9:01 am UTC

Reviewer: A reader

I was searching manuals and did not find a match.
What are the conditions under which a automatic resync of
recovery catalog (RMAN) is invoked

Tom Kyte

Followup  

November 07, 2005 - 11:33 am UTC

don't know that a complete list of all commands that do automatic resync's is available, there is this quote:

</code> http://docs.oracle.com/docs/cd/B19306_01/backup.102/b14191/rcmcatdb003.htm#sthref967 <code>
"RMAN performs resynchronizations automatically as needed when you execute certain commands, including BACKUP. You can also manually perform a full resynchronization using the RESYNC CATALOG command."

Error during backup of archivelogs with RMAN

November 07, 2005 - 11:53 am UTC

Reviewer: Smita Acharya from St. louis MO USA

Hi Tom,

We have a database of version 8.1.7.4. We are backing up the archivelogs using RMAN onto tape and deleting them the server and this is executed by the following script every hour.
RMAN> run {
allocate channel c1 type 'SBT_TAPE' parms 'ENV=NSR_SERVER=<SERVER>,NSR_DATA_VOLUME_POOL=<>,NSR_SAVESET_EXPIRATION=30 days)' format 'b_%u_%s_%p';
backup ( archivelog all delete input );
}


The following error occurs at random few times a day, unsure of what is the reason.

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03007: retryable error occurred during execution of command: backup
RMAN-07004: unhandled exception during command execution on channel c1
RMAN-10035: exception raised in RPC: ORA-19505: failed to identify file "D:\ORACLE\ORADATA\<SID>\ARCHIVE\<SID>92032.001"
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 2) The system cannot find the file specified.
RMAN-10031: ORA-19624 occurred during call to DBMS_BACKUP_RESTORE.BACKUPPIECECREATE



To Smita

November 07, 2005 - 12:14 pm UTC

Reviewer: Tom from Cincinnati, OH

When this error occurs, are there any archive logs in the directory you are backing up?

November 07, 2005 - 12:52 pm UTC

Reviewer: A reader

Hi Tom,

Thanks a lot for the response.

RMAN deletes the archivelogs from server once it has them backed up on tape.So, there are lot of times when there are no archivelogs on the directory.

I tried to run the same command manually when there were no archivelogs in the archivelog directory, instead of executing via script and got the following error.

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure during compilation of command
RMAN-03013: command type: backup
RMAN-06004: ORACLE error from recovery catalog database: RMAN-20242: specificati
on does not match any archivelog in the recovery catalog

I guess this is error which is occurring all the time, but for some reason the script is reporting the different misleading error all the time. I will try to figure out why there is a difference between the actual error and the error reported by the script.

But again, in a case where there are no archivelogs to backup, should not RMAN exit without an error. Is there any way to make RMAN exit without a error in this case.

Thanks again for your help.

The earlier review was from me. Sorry about missing out my name

November 07, 2005 - 1:07 pm UTC

Reviewer: Smita Acharya from St. Louis ,MO, USA


backup recovery area to disk

March 01, 2006 - 2:17 pm UTC

Reviewer: steve

Hi Tom,

Is it not possible to backup the recovery area to disk?
I've tried but I keep getting RMAN-06748.

If it's not possible, why?

Thanks

Steve

[1:41pm] oracle@brainy: > oerr rman 6748
6748, 1, "no or more than one tertiary storage channel found"
// *Cause: RECOVERY FILES, RECOVERY AREA or DB_RECOVERY_FILE_DEST option was
// specified in BACKUP command, but no or more than one tertiary
// channel was found.
// One of the following could have caused this error:
// 1) All of the allocated channels are of type DISK.
// 2) No tertiary storage (SBT) channel configured.
// 3) CHANNEL or DEVICE TYPE option specified is of DISK type.
// 4) More than one tertiary storage channel allocated or configured
// and no DEVICE TYPE or CHANNEL option specified.
// *Action: One of the following:
// 1) Allocate a channel of TYPE SBT.
// 2) Configure a SBT channel.
// 3) Specify CHANNEL, DEVICE TYPE option of TYPE SBT.


Tom Kyte

Followup  

March 02, 2006 - 8:33 am UTC

no version, no example, no look.

woops

March 02, 2006 - 10:11 am UTC

Reviewer: A reader

woops, sorry. My bad.

brainy oracle 83> rman target /

Recovery Manager: Release 10.1.0.4.0 - 64bit Production

Copyright (c) 1995, 2004, Oracle. All rights reserved.

connected to target database: DWS (DBID=2370999033)

RMAN> run
2> {
3> ALLOCATE CHANNEL d1 DEVICE TYPE DISK
4> FORMAT '/var/DWS/FRA_%d_%T_%u_s%s_p%p.bak';
5> BACKUP RECOVERY AREA;
6> }

using target database controlfile instead of recovery catalog
allocated channel: d1
channel d1: sid=533 devtype=DISK

Starting backup at 02-MAR-06
released channel: d1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 03/02/2006 09:53:43
RMAN-06748: no or more than one tertiary storage channel found

RMAN> quit


Recovery Manager complete.
lbrainy oracle 84> ^R
ls -la /var/DWS
total 34
drwxr-xr-x 13 root root 1024 Feb 17 10:17 .
drwxr-xr-x 37 root sys 1024 Jan 12 12:33 ..
drwxr-xr-x 12 dwsadm dws 1024 Jan 16 11:31 archive
drwxr-xr-x 11 dwsadm dws 1024 Jan 16 11:31 erroneous
drwxrwsr-x 3 oracle dws 5120 Mar 2 01:01 export
-rw-rw-r-- 1 root other 371 Feb 17 10:17 exportUSG_from_0101052000_to_0130062000_at_20060217_101715dat
-rw-rw-r-- 1 root other 0 Feb 17 10:17 exportUSG_from_0101052000_to_0130062000_at_20060217_101715dlv
-rw-rw-r-- 1 root other 371 Feb 17 10:14 exportUSG_from_0101052000_to_0131062000_at_20060217_101416dat
-rw-rw-r-- 1 root other 0 Feb 17 10:14 exportUSG_from_0101052000_to_0131062000_at_20060217_101416dlv
drwxr-xr-x 14 dwsadm dws 1024 Jan 16 11:31 incoming
drwxr-xr-x 13 dwsadm dws 1024 Jan 16 11:32 loading
drwxr-xr-x 11 dwsadm dws 1024 Jan 25 14:34 loading_queue
drwxr-xr-x 9 dwsadm dws 1024 Jan 16 11:47 logs
drwxr-xr-x 2 root root 96 Jan 13 16:20 lost+found
drwxr-xr-x 2 dwsadm dws 96 Jan 16 11:31 outgoing
drwxr-xr-x 12 dwsadm dws 1024 Jan 16 11:31 processing
drwxr-xr-x 10 dwsadm dws 1024 Jan 16 11:32 working


Need any other info?

March 05, 2006 - 8:55 pm UTC

Reviewer: A reader

Hi Tom,

Just wondering if the info above is complete.

Thanks!

Steve

reader

March 07, 2006 - 9:00 am UTC

Reviewer: A reader

Is there a equivalent RMAN command in 10g
for the 9i command "print database"

Thanks

RMAN Backup

March 09, 2006 - 7:29 am UTC

Reviewer: Mahesh Kumar from India

Tom

One of the feature if RMAN backup is no need to put tablespace in bakcup mode.

Can you answer why?

Tom Kyte

Followup  

March 09, 2006 - 2:36 pm UTC

because rman understands Oracle database blocks and can detect "fractured blocks" (search for that on this site). when it hits a fractured block - it (rman) re-reads it.

When "copy" reads an Oracle datafile - it does not understand a fractured block, it will NOT re-read the block, hence we must log additional information - that is what hot backup does.


since rman is intelligent about oracle blocks, it can "fix" problems that "copy" would not.

BACKUP RECOVERY AREA;

March 09, 2006 - 2:50 pm UTC

Reviewer: A reader

Hi Tom,

Any chance to look at the BACKUP RECOVERY AREA question
above?

Tom Kyte

Followup  

March 09, 2006 - 3:50 pm UTC

whoops, had this book marked. I asked around and yes, this is currently a limitation. You have to have a sbt (tape) channel

Thanks!

March 09, 2006 - 4:06 pm UTC

Reviewer: A reader

Thanks Tom!!

Steve

RMAN-06207: WARNING: 33 objects could not be deleted for

March 09, 2006 - 5:13 pm UTC

Reviewer: Dawar Naqvi from LA, CA, USA

Tom,

I am running following sh script to run our RMAN backup.

oracle:>more darchive.sh
. $HOME/.profile
export ORACLE_SID=SIDNAME
rman nocatalog << EOF
connect target
ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE disk;
configure controlfile autobackup on;
backup database plus archivelog delete input;
delete noprompt obsolete;
exit
EOF

-----------------------------------------------
Log file has following values:

---
---
----
Backup Set 268 03-MAR-06
Backup Piece 303 03-MAR-06 /u02/backup/c-1052429639-20060303
-00
Backup Set 270 04-MAR-06
Backup Piece 305 04-MAR-06 /u02/backup/backup_anhd2rcd_1_1
Backup Set 269 04-MAR-06
Backup Piece 304 04-MAR-06 /u02/backup/aohd2rcd_1_1
deleted backup piece
backup piece handle=/u02/backup/backup_ajhd071m_1_1 recid=301 stamp=584064054
deleted backup piece
backup piece handle=/u02/backup/akhd071m_1_1 recid=300 stamp=584064054
deleted backup piece
backup piece handle=/u02/backup/backup_alhd08b2_1_1 recid=302 stamp=584065378
deleted backup piece
backup piece handle=/u02/backup/c-1052429639-20060303-00 recid=303 stamp=5840653
81
deleted backup piece
backup piece handle=/u02/backup/backup_anhd2rcd_1_1 recid=305 stamp=584150414
deleted backup piece
backup piece handle=/u02/backup/aohd2rcd_1_1 recid=304 stamp=584150414
Deleted 6 objects

RMAN-06207: WARNING: 33 objects could not be deleted for DISK channel(s) due
RMAN-06208: to mismatched status. Use CROSSCHECK command to fix status
RMAN-06210: List of Mismatched objects
RMAN-06211: ==========================
RMAN-06212: Object Type Filename/Handle
RMAN-06213: --------------- ---------------------------------------------------
RMAN-06214: Backup Piece /u02/backup_5vha9dlo_1_1
RMAN-06214: Backup Piece /u02/backup/60ha9dlo_1_1
RMAN-06214: Backup Piece /u02/backup/63ha9evk_1_1
RMAN-06214: Backup Piece /u02/backup/65haimuq_1_1
RMAN-06214: Backup Piece /u02/backup_66haimuq_1_1
RMAN-06214: Backup Piece /u02/backup_68hanse7_1_1
RMAN-06214: Backup Piece /u02/backup/69hanse7_1_1
RMAN-06214: Backup Piece /u02/backup/backup_6mhbe3s4_1_1
RMAN-06214: Backup Piece /u02/backup/c-1052429639-20060215-00
RMAN-06214: Backup Piece /u02/backup/backup_6ohbeov5_1_1
RMAN-06214: Backup Piece /u02/backup/c-1052429639-20060215-01
RMAN-06214: Backup Piece /u02/backup/backup_6qhbf005_1_1
RMAN-06214: Backup Piece /u02/backup/backup_6rhbf00d_1_1
RMAN-06214: Backup Piece /u02/backup/6shbf00d_1_1
RMAN-06214: Backup Piece /u02/backup/backup_6thbf17o_1_1
RMAN-06214: Backup Piece /u02/backup/c-1052429639-20060215-02
RMAN-06214: Backup Piece /u02/backup/backup_6vhbf3gj_1_1
RMAN-06214: Backup Piece /u02/backup/backup_70hbf3gm_1_1
RMAN-06214: Backup Piece /u02/backup/71hbf3gm_1_1
RMAN-06214: Backup Piece /u02/backup/backup_72hbf4no_1_1
RMAN-06214: Backup Piece /u02/backup/c-1052429639-20060215-03
RMAN-06214: Backup Piece /u02/backup/backup_74hbf715_1_1
RMAN-06214: Backup Piece /u02/backup/backup_75hbf718_1_1
RMAN-06214: Backup Piece /u02/backup/76hbf718_1_1
RMAN-06214: Backup Piece /u02/backup/backup_77hbf8h4_1_1
RMAN-06214: Backup Piece /u02/backup/c-1052429639-20060215-04
RMAN-06214: Backup Piece /u02/backup/backup_79hbfahk_1_1
RMAN-06214: Backup Piece /u02/backup/backup_7ahbfahn_1_1
RMAN-06214: Backup Piece /u02/backup/7bhbfahn_1_1
RMAN-06214: Backup Piece /u02/backup/backup_7chbfbp6_1_1
RMAN-06214: Backup Piece /u02/backup/c-1052429639-20060215-05
RMAN-06214: Backup Piece /u02/backup/backup_7qhbicr6_1_1
RMAN-06214: Backup Piece /u02/backup/7rhbicr7_1_1


RMAN>

Recovery Manager complete.

on the middle (above) you can see I got the below message:

RMAN-06207: WARNING: 33 objects could not be deleted for DISK channel(s) due
RMAN-06208: to mismatched status. Use CROSSCHECK command to fix status
RMAN-06210: List of Mismatched objects
RMAN-06211: ==========================


What should I do for it? thanks
OR just ignore it.


Regards,
Dawar

Rman for cloning database

April 13, 2006 - 9:07 am UTC

Reviewer: A reader

Hello Tom,

Thanks a lot for all your help.

We have been asked for refreshing our test database from production and among all available options, we have concluded that we are going to use rman backup of production and will restore it in test database.

We use RMAN for backing up our production database and we backup database on DISK. We are on HP-UX and Oracle 9i.

Now, we have production database running on one server, say on server A, while test database is running on other server, say on server B.

My questions are:
(1) For using script as under do we need to copy backup pieces from production server,A, to test server,B?

(Sorry, I had to test this on my windows box as well as I tested this script on my local box so where target & auxiliary databases were living on same box)

run
{
show all ;
allocate auxiliary channel ch1 type DISK ;
allocate auxiliary channel ch2 type DISK ;
set NEWNAME for DATAFILE 1 TO 'C:\ORACLE\ORADATA\TEST3\SYSTEM01.DBF' ;
set NEWNAME for DATAFILE 2 TO 'C:\ORACLE\ORADATA\TEST3\UNDOTBS01.DBF' ;
set NEWNAME for DATAFILE 3 TO 'C:\ORACLE\ORADATA\TEST3\CWMLITE01.DBF' ;
set NEWNAME for DATAFILE 4 TO 'C:\ORACLE\ORADATA\TEST3\DRSYS01.DBF' ;
set NEWNAME for DATAFILE 5 TO 'C:\ORACLE\ORADATA\TEST3\EXAMPLE01.DBF' ;
set NEWNAME for DATAFILE 6 TO 'C:\ORACLE\ORADATA\TEST3\INDX01.DBF' ;
set NEWNAME for DATAFILE 7 TO 'C:\ORACLE\ORADATA\TEST3\ODM01.DBF' ;
set NEWNAME for DATAFILE 8 TO 'C:\ORACLE\ORADATA\TEST3\TOOLS01.DBF' ;
set NEWNAME for DATAFILE 9 TO 'C:\ORACLE\ORADATA\TEST3\USERS01.DBF' ;
set NEWNAME for DATAFILE 10 TO 'C:\ORACLE\ORADATA\TEST3\XDB01.DBF' ;
DUPLICATE target DATABASE TO test3
LOGFILE
GROUP 1 (
'C:\ORACLE\ORADATA\TEST3\REDO01.LOG'
) SIZE 2M,
GROUP 2 (
'C:\ORACLE\ORADATA\TEST3\REDO02.LOG'
) SIZE 2M,
GROUP 3 (
'C:\ORACLE\ORADATA\TEST3\REDO03.LOG'
) SIZE 2M
nofilenamecheck;
}

(2) If answer of question 1 is YES than
do we need to create same directories on test database server?

(3) If answer of question 1 is NO than:
(i)Will RMAN copy all datafiles or just backup pieces? As total size of datafiles is nearly 8GB but size of backup pieces is less than 3 GB.
(ii) Can RMAN create any performance problem while transferring, datafile/backup pieces, to our test database server?

As per my understanding, as we do not have NFS mount file system , through which RMAN could transfer datafile/backup pieces, we will have to copy backup pieces to our test database server and will have to store them in same directory as production server.


It would be great if you could show some example of this.

Happy Easter,

Cheers,


Tom Kyte

Followup  

April 14, 2006 - 11:32 am UTC

1) the backup has to of course be available to the test machine, whether you have to copy it there to make that so or whether it can be available some other way (SAN, NAS, nfs, whatever)....

2) it would be easiest

3) you could also just use the rman duplicate commands as well - but rman only needs the backups, not access to the live system.

what are the actions require immediately?

December 19, 2006 - 5:08 pm UTC

Reviewer: Dawar from Los Angeles, CA USA

DB: 10.2

Tom,

I had some issues.
I used rman utility to run the backup after that 
I run CROSSCHECK command beause of invalid objects etc. 

rman> CROSSCHECK copy;
rman> CROSSCHECK backup; & 
rman> DELETE EXPIRED backup;


Now logged as a sys (sysdba)

SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 223
Next log sequence to archive 223
Current log sequence 225

*****************************************


SQL> show parameter db_recovery_file_dest;

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string /flash_recovery_area

db_recovery_file_dest_size big integer 7147483648
**********************************************************************************************************************

SQL> select * FROM V$RECOVERY_FILE_DEST;

NAME SPACE_LIMIT SPACE_USED SPACE_RECLAIMABLE 
------------------------------ --------------------- --------------- ------------------------------------
/flash_recovery_area 7147483648 7143581696 0 

NUMBER_OF_FILES
-----------------------------
167

what are the actions require immediately?

cheers,
Dawar
 

Tom Kyte

Followup  

December 20, 2006 - 7:56 am UTC

not really sure what you mean

from above

December 20, 2006 - 10:35 am UTC

Reviewer: Dawar from Los Angeles, CA USA

Tom,

I am curious about the size of SPACE_LIMIT & SPACE_USED (in V$RECOVERY_FILE_DEST). There are very close in the size.
Is it normal?

What are the number_of_files indicates?

Is it archivelog file?

Is it ok to remove old archivelog files manually?



RECAP:

SQL> select * FROM V$RECOVERY_FILE_DEST;

NAME SPACE_LIMIT SPACE_USED SPACE_RECLAIMABLE 
------------------------------ --------------------- --------------- 
------------------------------------
/flash_recovery_area 7147483648 7143581696 0 

NUMBER_OF_FILES
-----------------------------
167

Cheers,
Dawar
 

Device type disk for duplicate

February 08, 2007 - 9:37 am UTC

Reviewer: Laxman Kondal from Springfield, VA

Hi Tom

I am trying to create duplicate with RMAN (no archive and cold backup)and both are on Linux4 and Oracle10gR2 but keep getting this error. First I created cold backup on disk (FRA):

shutdown
startup mount and then
RMAN> run
2> {
3> allocate channel c1 device type disk;
4> allocate channel c2 device type disk;
5> backup database;
6> backup current controlfile;
7> }

using target database control file instead of recovery catalog
allocated channel: c1
channel c1: sid=159 devtype=DISK

allocated channel: c2
channel c2: sid=157 devtype=DISK
.....
Starting backup at 08-FEB-07
channel c1: starting full datafile backupset
channel c1: specifying datafile(s) in backupset
including current control file in backupset
channel c1: starting piece 1 at 08-FEB-07
channel c1: finished piece 1 at 08-FEB-07
piece handle=/u01/app/oracle/flash_recovery_area/OPTEST/backupset/2007_02_08/o1_mf_ncnnf_TAG20070208T091506_2wpd3brc_.bkp tag=TAG20070208T091506 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:01
Finished backup at 08-FEB-07
released channel: c1
released channel: c2

RMAN> connect auxiliary sys/lkondal@irdclone

connected to auxiliary database: IRDCLONE (not mounted)

RMAN> run
2> {
3> allocate auxiliary channel aux1 device type disk;
4> allocate auxiliary channel aux2 device type disk;
5> duplicate target database to irdclone;
6> }

allocated channel: aux1
channel aux1: sid=156 devtype=DISK

allocated channel: aux2
channel aux2: sid=155 devtype=DISK

Starting Duplicate Db at 08-FEB-07

contents of Memory Script:
{
set newname for datafile 1 to
"/u01/app/oracle/oradata/irdclone/system01.dbf";
.....
restoring datafile 00003 to /u01/app/oracle/oradata/irdclone/sysaux01.dbf
restoring datafile 00005 to /u01/app/oracle/oradata/irdclone/indx01.dbf
restoring datafile 00008 to /u01/app/oracle/oradata/irdclone/opom_lobs.dbf
channel aux1: reading from backup piece /u01/app/oracle/flash_recovery_area/OPTEST/backupset/2007_02_08/o1_mf_nnndf_TAG20070208T091153_2wpcxb8f_.bkp
ORA-19870: error reading backup piece /u01/app/oracle/flash_recovery_area/OPTEST/backupset/2007_02_08/o1_mf_nnndf_TAG20070208T091153_2wpcxb6p_.bkp
ORA-19505: failed to identify file "/u01/app/oracle/flash_recovery_area/OPTEST/backupset/2007_02_08/o1_mf_nnndf_TAG20070208T091153_2wpcxb6p_.bkp"
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
ORA-19870: error reading backup piece /u01/app/oracle/flash_recovery_area/OPTEST/backupset/2007_02_08/o1_mf_nnndf_TAG20070208T091153_2wpcxb8f_.bkp
ORA-19505: failed to identify file "/u01/app/oracle/flash_recovery_area/OPTEST/backupset/2007_02_08/o1_mf_nnndf_TAG20070208T091153_2wpcxb8f_.bkp"
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
failover to previous backup

released channel: aux1
released channel: aux2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 02/08/2007 09:19:17
RMAN-03015: error occurred in stored script Memory Script
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 8 found to restore
RMAN-06023: no backup or copy of datafile 7 found to restore
RMAN-06023: no backup or copy of datafile 6 found to restore
RMAN-06023: no backup or copy of datafile 5 found to restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore

RMAN>
----------------------------------------------------

I can not figure out what wrong I am doing. I just want to pick up an unarchived database and create duplicate on different box with same OS and Oracle version.

Thanks and regards.

Device type disk for duplicate

February 08, 2007 - 11:45 am UTC

Reviewer: Laxman Kondal from Springfield, VA

Hi Tom

Never mind I had to change on auxiliary side FRA instance name to source name and it worked fine.

Thanks and regards.

RMAN : list/report

August 15, 2007 - 6:48 am UTC

Reviewer: Santosh Upadhyay from UK

Hi,
A basic question but quite confusing for me. I don't understand when to use lis and when to use reprot. Why I can't take a reprot of obslete files but can list them.
Is there any way to decide if list or report shold be used?

Thanks,
Santosh.

June 25, 2009 - 10:25 am UTC

Reviewer: Alexander

Hi,

On a couple of the databases I backup to disk I get these errors a lot

RMAN-03009: failure of Control File and SPFILE Autobackup command on ORA_DISK_1 channel at 06/24/2009 23:01:08
ORA-00230: operation disallowed: snapshot control file enqueue unavailable


Is there anything I can do about this? Do I have to just make sure I'm not running things at the same time? I'm guessing it's because I schedule archivelog backups every hour, and at night it collides with my incrementals.

Thanks.
Tom Kyte

Followup  

June 26, 2009 - 10:49 am UTC

see Note 145619.1 for what this is about.


there is an enhancement request (bug 5868318) open to permit simultaneous backups of a single target.

maxsetsize/maxpiecesize

August 12, 2009 - 7:13 am UTC

Reviewer: Jatin from Delhi, India

Hi Tom

We are doing full DB backups to disk and later pushing the same to tapes. Of recent i was requested to put a limit to the file size generated on OS by RMAN -- for the same I set maxpiecesize to 2G using "ALLOCATE CHANNEL c1 DEVICE TYPE DISK MAXPIECESIZE 2G;" in rman configurations.

However, when I fire the full backup, what I get is files exceeding 2 GB in size:

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
254     Incr 0  1.01G      DISK        00:08:44     11-AUG-09
        BP Key: 254   Status: AVAILABLE  Compressed: NO  Tag: TAG20090811T125546
        Piece Name: /backup/database_backup/full_96kme02j_1_1
  List of Datafiles in backup set 254
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  4    0  Incr 86587302856 11-AUG-09 /ora_mid80/data01/mid80/MIDAS_DAT.DBF
  6    0  Incr 86587302856 11-AUG-09 /ora_mid80/data01/mid80/USERS.DBF
  7    0  Incr 86587302856 11-AUG-09 /ora_mid80/index01/mid80/PRIS_IDX.DBF
  8    0  Incr 86587302856 11-AUG-09 /ora_mid80/data01/mid80/MIDAS_REP.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
256     Incr 0  <b>2.09G</b>      DISK        00:12:23     11-AUG-09
        BP Key: 256   Status: AVAILABLE  Compressed: NO  Tag: TAG20090811T125546
        Piece Name: /backup/database_backup/full_97kme02j_1_1
  List of Datafiles in backup set 256
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1    0  Incr 86587302857 11-AUG-09 /ora_mid80/sys/mid80/sysmid80.dbf
  10   0  Incr 86587302857 11-AUG-09 /ora_mid80/index01/mid80/MIDAS_IDX.dbf
  11   0  Incr 86587302857 11-AUG-09 /ora_mid80/data01/mid80/PRIS.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
257     Incr 0  <b>2.62G</b>      DISK        00:13:37     11-AUG-09
        BP Key: 257   Status: AVAILABLE  Compressed: NO  Tag: TAG20090811T125546
        Piece Name: /backup/database_backup/full_98kme02j_1_1
  List of Datafiles in backup set 257
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  2    0  Incr 86587302858 11-AUG-09 /ora_mid80/rbs/mid80/undotbs.dbf
  3    0  Incr 86587302858 11-AUG-09 /ora_mid80/sys/mid80/sysaux.dbf
  5    0  Incr 86587302858 11-AUG-09 /ora_mid80/data01/mid80/MIDAS_LOG.DBF
  9    0  Incr 86587302858 11-AUG-09 /ora_mid80/data01/mid80/PRISTEMP.dbf


Can you tell me where am I going wrong on this?

However, when I further test runwith maxsetsize as 2G using "CONFIGURE MAXSETSIZE TO 2097152K;" I achieve the desired results!!

Just to give you a view of show all (with maxsetizixe unlimited and maxpiecesize 2G):

RMAN> show all;

using target database control file instead of recovery catalog
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backup/database_backup/confs/Auto_%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/backup/database_backup/confs/snapcf_mid80.f';

Maxsetsize/Maxpiecesize

August 12, 2009 - 7:23 am UTC

Reviewer: Jatin from Delhi, India

Just a correction, I am using the foolwoing command:

CONFIGURE CHANNEL DEVICE TYPE sbt MAXPIECESIZE 1G;

and not ALLOCATE CHANNEL...

Best Regards
Jatin
Tom Kyte

Followup  

August 13, 2009 - 12:03 pm UTC

and now it is 1g and why don't we see that in the above list?

show us the entire script - all of it, everything we need to reproduce with

Resubmitting the question...

August 17, 2009 - 1:17 am UTC

Reviewer: Jatin from Delhi, India

Sorry for the confusion, I am resubmitting the entire question. This is a 10g database with the following configuration parameters:

qyx011{oramid80}# rman target / nocatalog

Recovery Manager: Release 10.2.0.1.0 - Production on Mon Aug 17 07:29:44 2009

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

connected to target database: MID80 (DBID=1319489002)
using target database control file instead of recovery catalog

RMAN> show all;

RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backup/database_backup/confs/Auto_%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/backup/database_backup/confs/snapcf_mid80.f';

Hereafter I do a RMAN> CONFIGURE CHANNEL DEVICE TYPE SBT MAPIECESIZE 2G;

and we execute the following script (called from a unix shell):

run {
allocate channel d1 type disk;
allocate channel d2 type disk;
allocate channel d3 type disk;
backup incremental level 0 filesperset 6 format '/backup/database_backup/dumps/full_%U' (database include current controlfile);
sql 'ALTER SYSTEM ARCHIVE LOG CURRENT';
backup filesperset 20 format '/backup/database_backup/archivelogs/archlog_%U' (archivelog all);
release channel d1;
release channel d2;
release channel d3;
}
exit;

PS: Herein I have tried running the script without  the 'filesperset 6' clause, but still the filesize on OS is > 2G:

List of this test backup:
-------------------------

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
254     Incr 0  1.01G      DISK        00:08:44     11-AUG-09
        BP Key: 254   Status: AVAILABLE  Compressed: NO  Tag: TAG20090811T125546
        Piece Name: /backup/database_backup/full_96kme02j_1_1
  List of Datafiles in backup set 254
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  4    0  Incr 86587302856 11-AUG-09 /ora_mid80/data01/mid80/MIDAS_DAT.DBF
  6    0  Incr 86587302856 11-AUG-09 /ora_mid80/data01/mid80/USERS.DBF
  7    0  Incr 86587302856 11-AUG-09 /ora_mid80/index01/mid80/PRIS_IDX.DBF
  8    0  Incr 86587302856 11-AUG-09 /ora_mid80/data01/mid80/MIDAS_REP.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
256     Incr 0  2.09G      DISK        00:12:23     11-AUG-09
        BP Key: 256   Status: AVAILABLE  Compressed: NO  Tag: TAG20090811T125546
        Piece Name: /backup/database_backup/full_97kme02j_1_1
  List of Datafiles in backup set 256
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1    0  Incr 86587302857 11-AUG-09 /ora_mid80/sys/mid80/sysmid80.dbf
  10   0  Incr 86587302857 11-AUG-09 /ora_mid80/index01/mid80/MIDAS_IDX.dbf
  11   0  Incr 86587302857 11-AUG-09 /ora_mid80/data01/mid80/PRIS.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
257     Incr 0  2.62G      DISK        00:13:37     11-AUG-09
        BP Key: 257   Status: AVAILABLE  Compressed: NO  Tag: TAG20090811T125546
        Piece Name: /backup/database_backup/full_98kme02j_1_1
  List of Datafiles in backup set 257
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  2    0  Incr 86587302858 11-AUG-09 /ora_mid80/rbs/mid80/undotbs.dbf
  3    0  Incr 86587302858 11-AUG-09 /ora_mid80/sys/mid80/sysaux.dbf
  5    0  Incr 86587302858 11-AUG-09 /ora_mid80/data01/mid80/MIDAS_LOG.DBF
  9    0  Incr 86587302858 11-AUG-09 /ora_mid80/data01/mid80/PRISTEMP.dbf


Strangely though when I do a CONFIGURE MAXSETSIZE to 2G it gives me the required results (ie filesize < 2G)?
Tom Kyte

Followup  

August 24, 2009 - 8:44 am UTC

type sbt is tape, not disk, you are configuring disk channels, your setting for tape (sbt) is not relevant.

Pay attention..

August 17, 2009 - 8:29 am UTC

Reviewer: A reader

@Jatin...As already pointed out to you here ( http://forums.oracle.com/forums/thread.jspa?threadID=942620&tstart=15 ), you still show yourself allocating a TAPE channel and NOT a disk channel.

Nevertheless, as also pointed out in your OTN post, your manual allocation of the channels is what is causing your problem.

But Still..

August 18, 2009 - 2:44 am UTC

Reviewer: Jatin from Delhi, India

1) It is all on disk.. no tapes invloved.. It happened to change as I compiled the steps in this question - part from the putty screen and part from the manuals :)

2) Is it that manual allocation of disk channels will override the setting of maxpiece size? I remember I read somewhere in metalink about this but not sure if my case is similar.. ?

Tom, can you please comment?
Tom Kyte

Followup  

August 24, 2009 - 4:37 pm UTC

so what, you configured a TAPE DEVICE with maxpiecesize

and then used a disk - why do you think a DISK would obey a TAPE setting?

Simple test..

August 18, 2009 - 10:50 am UTC

Reviewer: A reader

YES, it is the manual allocation of the channels. Why don't you do a ingenious thing like TEST IT like you tested the MAXSETSIZE and prove it to yourself.

Oracle RMAN and OS backup

December 01, 2010 - 6:04 am UTC

Reviewer: Theodora from MD, US

I had a successful backup to disk, the OS Admin erroneously deleted the backup files on disk but rman still has the records of the backup. What commands do you issue to fix this problem?
Tom Kyte

Followup  

December 07, 2010 - 8:42 am UTC

http://docs.oracle.com/docs/cd/E11882_01/backup.112/e10642/rcmmaint.htm#sthref1134

do a crosscheck and then optionally a delete

DISK BACKUP and OS Admin

December 01, 2010 - 6:09 am UTC

Reviewer: Theodora from MD, US

You had a successful backup to disk, the OS Admin erroneously deleted your backup files on disk but rman still has the records of the backup. What commands do you issue to fix this problem?

December 01, 2010 - 7:01 am UTC

Reviewer: Theodora from MD, US


Hi Tom,
I configured my RMAN as follows,
RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 10;
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'c:\oracle\backu
p\backdatafile_%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 3 BACKUP TYPE TO COMPRESSED BACKUPSET;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BZIP2'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'C:\APP\THEODORA\PRODUCT\11.1.0\DB_3\DATA
BASE\SNCFORCL.ORA'; # default
Then backup in RMAN as
backup as backupset format'c:\oracle\backup\backdatafile_%d_%s_%p' database; the backup was successful but from then when ever I do any futher simple backups e.g backup current control file; or backup spfile; or backup database I recieve the error

Starting backup at 01-DEC-10
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 01-DEC-10
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 12/01/2010 0
30
ORA-19809: limit exceeded for recovery files
ORA-19804: cannot reclaim 52428800 bytes disk space from 2147483648 limit
Why does this error occur and what should I do to solve it
Tom Kyte

Followup  

December 07, 2010 - 8:47 am UTC

$ oerr ora 19804
19804, 00000, "cannot reclaim %s bytes disk space from %s limit"
// *Cause: Oracle cannot reclaim disk space of specified bytes from the
//         DB_RECOVERY_FILE_DEST_SIZE limit.
<b>// *Action: There are five possible solutions:
//          1) Take frequent backup of recovery area using RMAN.
//          2) Consider changing RMAN retention policy.
//          3) Consider changing RMAN archived log deletion policy.
//          4) Add disk space and increase DB_RECOVERY_FILE_DEST_SIZE.
//          5) Delete files from recovery area using RMAN.</b>




You have a 2gb recovery area - you are asking for 10 copies to be kept there. Unless your database is teeny tiny - it won't fit.

Why rman not following the Backup policy

May 12, 2011 - 5:37 pm UTC

Reviewer: A reader



Hi Tom,
I have the following Retention policy for RMAN . Doing 11g rac DB Backups thru OEM for 11g release 1

Retention Policy
Retain backups that are necessary for a recovery to any time within the specified number of days (point-in-time recovery) Days = 2
Recovery Window

Retain at least the specified number of full backups for each datafile Backups = 1
Redundancy .

I Still see backupsets and Archive logs from 7 days olds.

Not using Rec catalog , only control file.

Why is RMAN keeping so many backups and not just 2 days backups ?

I am doing Daily incremental and Weekly full backup

RMAN-06023

June 27, 2011 - 8:30 am UTC

Reviewer: A reader

Hi Tom,

I was trying to restore the database in our newly configured backup recovery system and got the error while restoring the database from recently taken Level 0 incremental backup:

RMAN> startup nomount;
RMAN> restore spfile from '/archive/backup/weekly/XXXX_1031_754880561_SPFILE';
RMAN> set dbid 1288974732;
RMAN> shutdown abort;
RMAN> startup nomount:
RMAN> restore controlfile from '/archive/backup/weekly/XXXX_1030_754880558_CONTROL';
RMAN> alter database mount;
RMAN> restore database;
Starting restore at 27-JUN-11
using channel ORA_DISK_1
using channel ORA_DISK_2

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/27/2011 15:51:59
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore


But I am able to see backups of those databases through "list backup of datafile 2 summary;" command or "crosscheck backup of datafile 2;" command like:

RMAN> crosscheck backup of datafile 2;
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=153 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=152 devtype=DISK
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/archive/backup/weekly/XXXX_1027_754880410_1_DB0 recid=560 stamp=754880415
Crosschecked 1 objects


Now I am able to restore from any old level 0 backup but not from this particular level 0 backup. Please advise what needs to be done.