onec using RMAN backup
Vera, September 03, 2003 - 3:24 am UTC
Tom,
I create database (archivelog mode), then make full backup with RMAN (and controlfile).
I remove database totally and restore and recover it through RMAN .
I open database with resetlogs .
When I remove database again and try to restore and recover it, RMAN outputs error:
RMAN> restore database ;
Starting restore at 03-SEP-03
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 09/03/2003 10:22:54
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 11 found to restore
RMAN-06023: no backup or copy of datafile 10 found to restore
...
Does it mean that I can use the backup only onec and if so ,
how does RMAN define a unavailable state for restore the database ? Or do I wrong something ?
Thanks.
Can we use RMAN to backup RAW files? Thanks.
Reader, September 10, 2003 - 8:08 am UTC
September 10, 2003 - 7:38 pm UTC
you can use rman to backup anything you can put an oracle database file on.
yes. that includes raw
memory for backup and restore
reader, September 27, 2003 - 12:02 pm UTC
Tom,
(1) when Rman backsup datafiles, how much memory it would use to backup by reading blocks from datafiles to a disk drive?
(2) Is this memory allocated in the PGA of the server process that does the backup?
(3) If I set parallalism to 4, RMAN will use four channels that means four server processes, in this case the memory allocation the same for each channel?
(4) Could you also help me to understand how much memory I should allocate in large pool If I used slaves for tape backup?
Thanks.
September 27, 2003 - 1:08 pm UTC
block corruption
Sam Bernard, September 27, 2003 - 2:48 pm UTC
How Rman finds block corruption? What does it check to find if the block is corrupted or not when it backs up datafiles? Thanks.
September 27, 2003 - 4:24 pm UTC
it does not help!
Sam, September 27, 2003 - 5:07 pm UTC
From the above link,
<quote> If the server session encounters a datafile block during a backup that has already been identified as corrupt by the database, then the server session copies the corrupt block into the backup and Oracle logs the corruption in the control file as either a logical or media corruption. RMAN copies the block in case the user wants to try to salvage the contents of the block.
If RMAN encounters a datafile block with a corrupt header that has not already been identified as corrupt by the database, then it writes the block to the backup with a reformatted header indicating that the block has media corruption. <quote>
The doc is so generic and it is not helpful how rman checks and what it checks to see if the block is corrupt or not? May be it is a proprietory info for oracle to share. Anyway, if you know how it does detect block corruption, please share. Thanks.
September 27, 2003 - 9:14 pm UTC
it looks at the block - is says "does this block make sense, does it compute, would it be able to be processed normally"
if not, block is not good.
if yes, block is good
exactly what it does, well, since you and I don't really even care what a block is -- its beyond what we really need to know. that is tests the logical integrity of the block is way more then enough.
I've no idea if it is proprietary or not, it is just way beyond (the tests it does) what we need to know. it tests the block to see "can this block be made sense of". thats all.
also quoted from that link:
...
RMAN tests data and index blocks that pass physical corruption checks for logical corruption, for example, corruption of a row piece or index entry. If RMAN finds logical corruption, it then logs the block in the alert.log and server session trace file. By default, error checking for logical corruption is disabled.
.....
A reader, September 29, 2003 - 2:40 am UTC
Thanks.
Sam, September 29, 2003 - 12:45 pm UTC
blockrecover
Shankar, October 17, 2003 - 8:48 pm UTC
Tom, I wanted to practice blockrecover feature in RMAN. Is there a way I can cause block corruption in a datafile to result in ora 01578 error? I am using 9iR2 on Windows 2000. Do you have any script that would corrupt a datafile that would result in block corruption error? Thanks.
October 19, 2003 - 6:06 pm UTC
you'd have to shutdown normally, use some binary editor to mess around with the blocks on a TEST database. startup and full scan the affected table to trigger the error. I don't have a script to corrupt a datafile, no.
I've written one off C programs to do so, but not a generic utility, no.
Which one is a binary editor on NT?
Reader, October 20, 2003 - 10:42 am UTC
October 20, 2003 - 10:59 am UTC
no idea -- maybe someone out that that uses windows has a favorite one they use.
windows binary editor
A reader, October 20, 2003 - 12:36 pm UTC
RE: TextPad
Mark A. Williams, October 20, 2003 - 7:24 pm UTC
A Reader,
The TextPad website says that:
"TextPad ® is a powerful, general purpose editor for plain text files."
Does it actually have a binary editor too?
Thanks,
Mark
datafile corruption
Duncan, October 28, 2003 - 10:53 am UTC
Tom
I am testing out a restore after loss of a datafile.
I took a hot backup using RMAN. I then tested a full restore of the database which worked fine.
I then tested a point in time restore of the db which also worked ok. After doing this I did not take another backup so my db was opened with a resetlogs.
Next I simulated media failure by deleting a datafile. I am now testing the restore from the original backup set (taken before the pit recovery), RMAN is reporting errors when I attempt this restore:
RMAN> run {
allocate channel ch1 type disk;
allocate channel ch2 type disk;
allocate channel ch3 type disk;
allocate channel ch4 type disk;
restore database;
recover database ;
}
RMAN-03022: compiling command: allocate
RMAN-03023: executing command: allocate
RMAN-08030: allocated channel: ch1
RMAN-08500: channel ch1: sid=14 devtype=DISK
RMAN-03022: compiling command: allocate
RMAN-03023: executing command: allocate
RMAN-08030: allocated channel: ch2
RMAN-08500: channel ch2: sid=15 devtype=DISK
RMAN-03022: compiling command: allocate
RMAN-03023: executing command: allocate
RMAN-08030: allocated channel: ch3
RMAN-08500: channel ch3: sid=16 devtype=DISK
RMAN-03022: compiling command: allocate
RMAN-03023: executing command: allocate
RMAN-08030: allocated channel: ch4
RMAN-08500: channel ch4: sid=17 devtype=DISK
RMAN-03022: compiling command: restore
RMAN-03025: performing implicit partial resync of recovery catalog
RMAN-03023: executing command: partial resync
RMAN-08003: starting partial resync of recovery catalog
RMAN-08005: partial resync complete
RMAN-03022: compiling command: IRESTORE
RMAN-03026: error recovery releasing channel resources
RMAN-08031: released channel: ch1
RMAN-08031: released channel: ch2
RMAN-08031: released channel: ch3
RMAN-08031: released channel: ch4
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure during compilation of command
RMAN-03013: command type: restore
RMAN-03002: failure during compilation of command
RMAN-03013: command type: IRESTORE
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 27 found to restore
RMAN-06023: no backup or copy of datafile 26 found to restore
RMAN-06023: no backup or copy of datafile 25 found to restore
RMAN-06023: no backup or copy of datafile 24 found to restore
RMAN-06023: no backup or copy of datafile 23 found to restore
RMAN-06023: no backup or copy of datafile 15 found to restore
RMAN-06023: no backup or copy of datafile 9 found to restore
RMAN-06023: no backup or copy of datafile 7 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> list backup;
RMAN-03022: compiling command: list
List of Backup Sets
Key Recid Stamp LV Set Stamp Set Count Completion Time
------- ---------- ---------- -- ---------- ---------- ----------------------
47672 1 508589487 0 508589321 2 28-OCT-03
List of Backup Pieces
Key Pc# Cp# Status Completion Time Piece Name
------- --- --- ----------- ---------------------- ------------------------
47676 1 1 AVAILABLE 28-OCT-03 /op4/backup/02f50t89_1_1
List of Datafiles Included
File Name LV Type Ckp SCN Ckp Time
---- ------------------------------------- -- ---- ---------- -------------
7 /op4/datafiles/drsys01.dbf 0 Full 164683756 28-OCT-03
9 /op4/datafiles/DATA_S_2.dbf 0 Full 164683756 28-OCT-03
24 /op4/datafiles/temp03.dbf 0 Full 164683756 28-OCT-03
26 /op4/datafiles/DATA_M_1.dbf 0 Full 164683756 28-OCT-03
List of Backup Sets
Key Recid Stamp LV Set Stamp Set Count Completion Time
------- ---------- ---------- -- ---------- ---------- ----------------------
47673 2 508589567 0 508589321 1 28-OCT-03
List of Backup Pieces
Key Pc# Cp# Status Completion Time Piece Name
------- --- --- ----------- ---------------------- ------------------------
47677 1 1 AVAILABLE 28-OCT-03 /op4/backup/01f50t89_1_1
List of Datafiles Included
File Name LV Type Ckp SCN Ckp Time
---- ------------------------------------- -- ---- ---------- -------------
1 /oracle/app/oracle/oradata/op4/system01.dbf 0 Full 164683755 28-OCT-0
3
23 /op4/datafiles/temp02.dbf 0 Full 164683755 28-OCT-03
25 /op4/datafiles/DATA_S_1.dbf 0 Full 164683755 28-OCT-03
List of Backup Sets
Key Recid Stamp LV Set Stamp Set Count Completion Time
------- ---------- ---------- -- ---------- ---------- ----------------------
47674 3 508589575 0 508589321 3 28-OCT-03
List of Backup Pieces
Key Pc# Cp# Status Completion Time Piece Name
------- --- --- ----------- ---------------------- ------------------------
47678 1 1 AVAILABLE 28-OCT-03 /op4/backup/03f50t89_1_1
List of Datafiles Included
File Name LV Type Ckp SCN Ckp Time
---- ------------------------------------- -- ---- ---------- -------------
2 /op4/datafiles/tools01.dbf 0 Full 164683757 28-OCT-03
5 /op4/datafiles/users01.dbf 0 Full 164683757 28-OCT-03
15 /op4/datafiles/rbs02.dbf 0 Full 164683757 28-OCT-03
27 /op4/datafiles/DATA_L_1.dbf 0 Full 164683757 28-OCT-03
List of Backup Sets
Key Recid Stamp LV Set Stamp Set Count Completion Time
------- ---------- ---------- -- ---------- ---------- ----------------------
47675 4 508589642 0 508589321 4 28-OCT-03
List of Backup Pieces
Key Pc# Cp# Status Completion Time Piece Name
------- --- --- ----------- ---------------------- ------------------------
47679 1 1 AVAILABLE 28-OCT-03 /op4/backup/04f50t89_1_1
List of Datafiles Included
File Name LV Type Ckp SCN Ckp Time
---- ------------------------------------- -- ---- ---------- -------------
3 /op4/datafiles/rbs01.dbf 0 Full 164683758 28-OCT-03
4 /op4/datafiles/temp01.dbf 0 Full 164683758 28-OCT-03
What is causing these errors? Is it because I didn't take a backup after doing the pit recovery? Am I not allowed to use an older backup set?
October 28, 2003 - 10:58 am UTC
you need to take a full backup immediately after a resetlogs. resetlogs BREAKS the redo chain.
Read about database incarnation
Kishan, October 28, 2003 - 7:20 pm UTC
Hi Duncan:
A resetlogs on a database completes a logical lifetime of the database and it creates a new incarnation of the same.
So, unless you have a backup of the current incarnation, you may not be able to recover it.
If you are using 9i, you can use RMAN to list all the incarnations and restore the database to a previous incarnation, provided you have all the necessary backup( control file, data file, archive logs) available for that incarnation.
Hope this helps.
Thanks
Duncan, October 29, 2003 - 4:26 am UTC
Thanks very much, very useful.
rman 9i's and 8.1.7
hossam seif, February 24, 2004 - 6:56 am UTC
can 9i's version of RMAN backup 8.1.7 databases?
and how ?
PLEASE TELL ME
February 24, 2004 - 8:27 am UTC
rman is backwards compatible. the backup is done by the server really, rman is just a "command line interface", you can do whatever the server could do in its time.
Rman restore
Reader, April 05, 2004 - 8:24 am UTC
hi,
I have gone through with Oracle Docs.
But still some points is not clear to me.
I have a database 9.2 on linux
in archive mode.
I have to backups.
First => at mount stage "rman> backup database"
Second => at open stage "rman>backup database"
Now I want to restore and check my both backups.
what steps will be nedded for restore these backups
without shutting down the running database.
just tell me the steps.
Thanks
April 05, 2004 - 9:50 am UTC
only one step
step one) reread documentation
you must be reading a different set of docs then I am -- for the steps that you ask for are in mine. (chapter 10 specifically in the 9.2 rman users guide)
Why am I getting RMAN-06026
Prince, April 30, 2004 - 3:47 am UTC
Dear Tom,
I am trying the Oracle 10G dataguard feature. I was able to successfully test some of the features. Now, when I try to restore a standby control file backup, I get the following error.
RMAN> restore controlfile to '/u02/oradata/devs/control/control01.ctl' ;
Starting restore at 30-APR-04
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 04/30/2004 00:06:50
RMAN-06026: some targets not found - aborting restore
RMAN-06024: no backup or copy of the controlfile found to restore
The following are my steps.
1, ORACLE_SID=devp; rman target sys nocatalog
connected to target database: DEVP (DBID=482222311)
using target database controlfile instead of recovery catalog
2, RMAN> startup mount
Oracle instance started
database mounted
Total System Global Area 104857600 bytes
..
3, RMAN> backup current controlfile for standby;
Starting backup at 30-APR-04
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=52 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including standby controlfile in backupset
channel ORA_DISK_1: starting piece 1 at 30-APR-04
channel ORA_DISK_1: finished piece 1 at 30-APR-04
piece handle=/u02/oradata/devp/flash_recovery_area/DEVP/backupset/2004_04_30/o1_mf_ncnnf_TAG20040430T001525_093z8h89_.bkp comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:04
Finished backup at 30-APR-04
4, RMAN> list backup of controlfile ;
RMAN> list backup of controlfile ;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
1 Full 2M DISK 00:00:03 29-APR-04
BP Key: 1 Status: AVAILABLE Compressed: NO Tag: TAG20040429T224320
Piece Name: /u02/oradata/devp/flash_recovery_area/DEVP/backupset/2004_04_29/o1_mf_ncnnf_TAG20040429T224320_093svvdr_.bkp
Standby Controlfile Included: Ckp SCN: 293542 Ckp time: 29-APR-04
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
3 Full 2M DISK 00:00:02 30-APR-04
BP Key: 3 Status: AVAILABLE Compressed: NO Tag: TAG20040430T000312
Piece Name: /u02/oradata/devp/flash_recovery_area/DEVP/backupset/2004_04_30/o1_mf_ncnnf_TAG20040430T000312_093ykkx0_.bkp
Standby Controlfile Included: Ckp SCN: 296327 Ckp time: 30-APR-04
...
5,
RMAN> restore controlfile to '/u02/oradata/devs/control/control01.ctl';
Now, I get the error, I mentioned at the beginning of the post.
What am I doing wrong here?
Oracle 10.0.1 on RedHat Enterprise 3 AS.
Note: I am trying "D.1.2 Creating the Standby Control File with RMAN" step 2 from </code>
http://download-west.oracle.com/docs/cd/B13789_01/server.101/b10823.pdf <code>
I was able to get the standby working fine by creating the standby controlfile using SQL command (ALTER DATABASE CREATE STANDBY CONTROLFILE AS), but the above RMAN step is giving me trouble.
Thanks,
April 30, 2004 - 7:42 am UTC
where do you see them using the restore controlfile there?
after backing up (d.1) you want to goto creating a standby (d.2, 3, 4)
I will try again
Prince, April 30, 2004 - 7:04 pm UTC
Thanks Tom,
I tried the "duplicate" without restoring the controlfile and got some error. Probably I wasn't taking a careful look and assumed the error was due to the standby instance not being started (nomount).
I will try it out, once I get to my machine.
Thanks Tom. That part worked, but..
Prince., May 01, 2004 - 6:57 pm UTC
That was my mistake. After your guidance I went thru the documenataion and got the duplicate processing ok, but I got the following error when the files are getting restored. I get it working fine in windows environment.
Would please tell me what could be wrong, if you have a few moments?
1, created init.ora files for both primary and secondary with appropriate filename_convert, service names etc
secondary params:
-----------------
db_unique_name=devs
db_file_name_convert='/u02/oradata/devp/', '/u02/oradata/devs/'
log_file_name_convert='/u02/oradata/devp/redo/', '/u02/oradata/devs/redo/'
etc...
For primary: devs is replaced with devp and viceverca except the DB_NAME.
2, backup current controlfile for standby;
3, rman target sys@primary auxiliary sys@secondary nocatalog
rman> backup target database for standby ;
Starting Duplicate Db at 01-MAY-04
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=49 devtype=DISK
contents of Memory Script:
{
restore clone standby controlfile;
sql clone 'alter database mount standby database';
}
executing Memory Script
Starting restore at 01-MAY-04
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting datafile backupset restore
channel ORA_AUX_DISK_1: restoring controlfile
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=/u02/oradata/devp/flash_recovery_area/DEVP/backupset/2004_05_01/o1_mf_ncnnf_TAG20040501T142615_0985ht2b_.bkp tag=TAG20040501T142615
channel ORA_AUX_DISK_1: restore complete
output filename=/u02/oradata/devs/control/control01.ctl
output filename=/u02/oradata/devs/control/control02.ctl
output filename=/u02/oradata/devs/control/control03.ctl
Finished restore at 01-MAY-04
sql statement: alter database mount standby database
contents of Memory Script:
{
set newname for datafile 1 to
"/u02/oradata/devs/data/system01.dbf";
set newname for datafile 2 to
"/u02/oradata/devs/undo/undotbs01.dbf";
set newname for datafile 3 to
"/u02/oradata/devs/data/sysaux01.dbf";
set newname for datafile 4 to
"/u02/oradata/devs/data/users01.dbf";
restore
check readonly
clone database
;
}
executing Memory Script
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 01-MAY-04
using channel ORA_AUX_DISK_1
creating datafile fno=1 name=/u02/oradata/devs/data/system01.dbf
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 05/01/2004 14:39:29
RMAN-03015: error occurred in stored script Memory Script
RMAN-06136: ORACLE error from auxiliary database: ORA-01180: can not create datafile 1
ORA-01110: data file 1: '/u02/oradata/devs/data/system01.dbf'
May 01, 2004 - 7:55 pm UTC
does that path "exist"
can it be written to.
They do
Prince, May 02, 2004 - 3:16 pm UTC
Yes tom,
I already made sure the directories are created and also compared the file permissions.
% ls -l /u02/oradata/devs/ (standby directory)
drwxr-xr-x 2 oracle oinstall 4096 Apr 29 00:21 arch
drwxr-xr-x 2 oracle oinstall 4096 Apr 30 20:37 control
drwxr-xr-x 2 oracle oinstall 4096 Apr 28 22:10 data
drwxr-xr-x 3 oracle oinstall 4096 May 1 01:01 flash_recovery_area
drwxr-xr-x 2 oracle oinstall 4096 Apr 28 22:10 redo
drwxr-xr-x 2 oracle oinstall 4096 Apr 28 22:10 undo
% ls -l /u02/oradata/devp/ (primary directory)
drwxr-xr-x 2 oracle oinstall 4096 May 1 14:00 arch
drwxr-xr-x 2 oracle oinstall 4096 Apr 27 23:21 control
drwxr-xr-x 2 oracle oinstall 4096 Apr 27 23:23 data
drwxr-xr-x 3 oracle oinstall 4096 Apr 29 22:43 flash_recovery_area
drwxr-xr-x 2 oracle oinstall 4096 Apr 27 23:21 redo
drwxr-xr-x 2 oracle oinstall 4096 Apr 27 23:22 undo
This is from the standby, after the duplicate's mount stage.
SQL> select file#, STATUS, NAME from v$datafile ;
FILE# STATUS NAME
---------- ------- ----------------------------------------
1 SYSTEM /u02/oradata/devs/data/system01.dbf
2 ONLINE /u02/oradata/devs/undo/undotbs01.dbf
3 ONLINE /u02/oradata/devs/data/sysaux01.dbf
4 ONLINE /u02/oradata/devs/data/users01.dbf
SQL> select file#, status, error, name from v$datafile_header ;
FILE# STATUS ERROR NAME
---------- ------- ------------------------------ ---------- 1 ONLINE FILE NOT FOUND
2 ONLINE FILE NOT FOUND
3 ONLINE FILE NOT FOUND
4 ONLINE FILE NOT FOUND
I will try dropping the directories and start clean.
Thanks
May 02, 2004 - 4:42 pm UTC
can you follow the steps as documented in the recovery manager users guide for creating a standby with rman?
duplicate, not clone.
chapter 13 has the step by steps.
It works after I took the primary's backup
Prince, May 02, 2004 - 7:28 pm UTC
Thanks Tom. Now it is working.
Earlier, I just had the controlfile backup.
Steps:
=======
1, backup current controlfile for standby (I already did this and have the proper initstdby.ora)
2, backup database plus archivelog (I never did this step. My mistake. The error was misleading. It wasn't complaining about the backup)
3, rman target sys@primary auxiliary sys nocatalog
rman> duplicate target database for standby;
Note: duplicate issues "clone database"
Changing backup piece name?
Sai, June 12, 2004 - 7:40 pm UTC
Tom,
We have a scenario like:
1)On Host A: full backup of database was taken using rman but no recovery catalog.
2) Manually copied over all the rman backed files to Host B:.
3) backup controlfile to 'some_loc' on Host A, and copied it over to Host B.
4) On Host B: location of rman backed up files are different.
How can I tell/change backup piece names in the controlfile at Host B, using rman? In other words how can I restore my database at host B using the rman backed up files?
We dont use recovery catalog, because we use BCV split for db backups, we are trying to create a test database on Host B using copy of production database at Host A.
Any help is appreciated.
Thanks.
June 13, 2004 - 10:48 am UTC
create symbolic links so it appears they are in the place where rman put them.
reader
A reader, November 13, 2004 - 11:21 pm UTC
Tom,
Could you point to a documentation where a RMAN backup
taken at one site be used at another location which
is at a DIFFERENET MACHINE and DIFFERENT FILE SYSTEM
STRUCTURE and restored. This will be like a disaster
recovery exercise.
Thanks
November 14, 2004 - 9:52 am UTC
Maybe this is getting picky of me -- buuuttt -- did you even look in the table of contents for RMAN to see if it was obviously there?
</code>
http://docs.oracle.com/docs/cd/B10501_01/server.920/a96566/toc.htm <code>
chapter 10 Restoring and Recovering with Recovery Manager
....
Restoring Files to a New Location
Restoring Datafiles to a New Location
Restoring Control Files to a New Location
Restoring Archived Redo Logs to a New Location
Restoring the Database to a New Host
About Restoring a Database to a New Host
Specifying Filenames When Restoring to a New Host
.....
reader
A reader, November 14, 2004 - 11:21 pm UTC
<doc p10-25>
You cannot use RMAN to restore disk backups or image
copies created on one host to a new host. Nevertheless,
you can transfer the files with an operating system
utility.
<doc>
I have not tried to test this scenario yet. Is it not possible to
1. copy the backup sets to an identical location on the
new host
2. Connect to catalog with new host as the target
Perform various recovery scenarios as outlined in the
users guide
November 15, 2004 - 6:34 am UTC
if you put everything back the way it was, so it appears to be the "same machine with the same directory layouts" -- yes.
A reader, March 04, 2005 - 3:15 am UTC
Tom,
I am trying to recover a corrupted datafile.
8 0 Incr 7417852 28-FEB-05 C:\ORACLE\ORADATA\OEMREP\USERS01.DBF
Its there in the backupset, but could not recover.
RMAN> list backupset;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
489 Incr 0 412M DISK 00:01:32 28-FEB-05
BP Key: 490 Status: AVAILABLE Tag: TAG20050228T021551
Piece Name: C:\ORACLE\RMAN\_OEMREP_551450034_30_1_551450034
Controlfile Included: Ckp SCN: 7417849 Ckp time: 28-FEB-05
List of Datafiles in backup set 489
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 0 Incr 7417852 28-FEB-05 C:\ORACLE\ORADATA\OEMREP\SYSTEM01.DBF
2 0 Incr 7417852 28-FEB-05 C:\ORACLE\ORADATA\OEMREP\UNDOTBS01.DBF
3 0 Incr 7417852 28-FEB-05 C:\ORACLE\ORADATA\OEMREP\DRSYS01.DBF
4 0 Incr 7417852 28-FEB-05 C:\ORACLE\ORADATA\OEMREP\EXAMPLE01.DBF
5 0 Incr 7417852 28-FEB-05 C:\ORACLE\ORADATA\OEMREP\INDX01.DBF
6 0 Incr 7417852 28-FEB-05 C:\ORACLE\ORADATA\OEMREP\ODM01.DBF
7 0 Incr 6302756 23-FEB-05 C:\ORACLE\ORADATA\OEMREP\TOOLS01.DBF
8 0 Incr 7417852 28-FEB-05 C:\ORACLE\ORADATA\OEMREP\USERS01.DBF
9 0 Incr 7417852 28-FEB-05 C:\ORACLE\ORADATA\OEMREP\XDB01.DBF
10 0 Incr 7417852 28-FEB-05 C:\ORACLE\ORADATA\OEMREP\OEM_REPOSITORY.DBF
11 0 Incr 7417852 28-FEB-05 C:\ORACLE\ORADATA\OEMREP\TEST.ORA
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
504 Full 1M DISK 00:00:01 28-FEB-05
BP Key: 505 Status: AVAILABLE Tag:
Piece Name: C:\ORACLE\ORA81B\DATABASE\CONTROLFILE_C-3224933247-20050228-04
SPFILE Included: Modification time: 28-FEB-05
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
515 231M DISK 00:00:33 28-FEB-05
BP Key: 516 Status: AVAILABLE Tag: TAG20050228T021835
Piece Name: C:\ORACLE\RMAN\$HOST_OEMREP_20050228_ARC_32_1.BUS
List of Archived Logs in backup set 515
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 42 6755545 25-FEB-05 6775758 25-FEB-05
1 43 6775758 25-FEB-05 6775765 25-FEB-05
1 44 6775765 25-FEB-05 7057642 27-FEB-05
1 45 7057642 27-FEB-05 7339529 28-FEB-05
1 46 7339529 28-FEB-05 7383226 28-FEB-05
1 47 7383226 28-FEB-05 7383229 28-FEB-05
1 48 7383229 28-FEB-05 7388077 28-FEB-05
1 49 7388077 28-FEB-05 7388085 28-FEB-05
1 50 7388085 28-FEB-05 7411636 28-FEB-05
1 51 7411636 28-FEB-05 7418181 28-FEB-05
1 52 7418181 28-FEB-05 7418188 28-FEB-05
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
529 Full 1M DISK 00:00:01 28-FEB-05
BP Key: 530 Status: AVAILABLE Tag:
Piece Name: C:\ORACLE\ORA81B\DATABASE\CONTROLFILE_C-3224933247-20050228-05
SPFILE Included: Modification time: 28-FEB-05
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
546 Full 1M DISK 00:00:01 28-FEB-05
BP Key: 548 Status: AVAILABLE Tag:
Piece Name: C:\ORACLE\ORA81B\DATABASE\CONTROLFILE_C-3224933247-20050228-06
SPFILE Included: Modification time: 28-FEB-05
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
547 Full 1M DISK 00:00:01 28-FEB-05
BP Key: 549 Status: AVAILABLE Tag:
Piece Name: C:\ORACLE\ORA81B\DATABASE\CONTROLFILE_C-3224933247-20050228-07
SPFILE Included: Modification time: 28-FEB-05
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
563 Full 1M DISK 00:00:01 28-FEB-05
BP Key: 564 Status: AVAILABLE Tag:
Piece Name: C:\ORACLE\ORA81B\DATABASE\CONTROLFILE_C-3224933247-20050228-08
SPFILE Included: Modification time: 28-FEB-05
RMAN> show all;
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 5 DAYS;
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'controlfile_%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE 2 G FORMAT "c:\oracle\rman\_%d_%t_%s_%p_%t";
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'C:\ORACLE\ORA81B\DATABASE\SNCFOEMREP.ORA'; # default
RMAN> recover tablespace users;
Starting recover at 04-MAR-05
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 03/04/2005 03:06:17
RMAN-06004: ORACLE error from recovery catalog database: RMAN-20202: tablespace not found in the recovery catalog
RMAN-06019: could not translate tablespace name "USERS"
RMAN> recover datafile 8;
Starting recover at 04-MAR-05
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 03/04/2005 03:06:27
RMAN-06004: ORACLE error from recovery catalog database: RMAN-20201: datafile not found in the recovery catalog
RMAN-06010: error while looking up datafile: 8
I dont have maxcorrupt set for the datfile 8. Please help me in knowing how to recover the db.
Thanks for your consideration.
Please tom, i am waiting for your reply ...
A reader, March 04, 2005 - 12:45 pm UTC
March 04, 2005 - 1:56 pm UTC
contact support -- I don't see anything obvious, but i've see lots of times where something done wrong way before hand is the culprit (playing with system clocks and such)
if you are in a recovery situation, please utilize support.
Thank you
A reader, March 05, 2005 - 12:05 am UTC
A Reader March 04 & 05
Richard, April 18, 2005 - 6:56 am UTC
I wonder if "A Reader" forgot to register the database in the catalog? I only say this as I did just that a while ago, and it is a bit of a surprise to successfully back up one's database, then later try restoring from the backup (having logged into RMAN with the CATALOG option), only to find that the catalog hasn't a clue!
using restore database can we create a db in new host ?
A reader, May 12, 2005 - 8:27 am UTC
Tom,
Please let me know if i can restore a database from hostA to hostB. I did a duplicate, it worked. If its possible to restore (using restore database ) to a new host can you give us the steps.
I tried as below and got the error.
prdwsa - is the new database. i have the backups in tape.
RMAN> connect catalog rman/restore@prdrman;
connect target sys/restore@prdwsa;
RMAN-06008: connected to recovery catalog database
RMAN>
RMAN-06193: connected to target database (not started)
RMAN> startup nomount pfile= /u01/app/oracle/admin/prdwsa/pfile/initprdwsa.ora
RMAN-06196: Oracle instance started
Total System Global Area 17997984 bytes
Fixed Size 73888 bytes
Variable Size 16195584 bytes
Database Buffers 1638400 bytes
Redo Buffers 90112 bytes
RMAN> run {
allocate channel ch1 type disk;
restore controlfile;
alter database mount;
}
2> 3> 4> 5>
RMAN-03022: compiling command: allocate
RMAN-03023: executing command: allocate
RMAN-08030: allocated channel: ch1
RMAN-08500: channel ch1: sid=14 devtype=DISK
RMAN-03022: compiling command: restore
RMAN-03022: compiling command: IRESTORE
RMAN-03026: error recovery releasing channel resources
RMAN-08031: released channel: ch1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure during compilation of command
RMAN-03013: command type: restore
RMAN-03002: failure during compilation of command
RMAN-03013: command type: IRESTORE
RMAN-06004: ORACLE error from recovery catalog database: RMAN-20001: target database not found in recovery catalog
Thanks for your consideration and time !
May 12, 2005 - 12:16 pm UTC
Can we recover database forward using unbacked archived logs?
A Reader, May 13, 2005 - 11:58 am UTC
Hi Tom,
We have a scenario like the following.
We backup database, controlfile, spfile and archived logs using RMAN every night (the controlfile and spfile are backed up automatically) without using a recovery catalog. We dont backup archived log regularly because we setup three log destinations, log_archive_dest_n.
Now we lose the database server before we run the next backup. When we restore and recover the database using the backed controlfile, we can recover the database to last backup without problem. We had to use resetlogs.
Now, we want to roll the database forward using the archived logs on the dest_2 or 3, which did not crash. Can we do so?
I tried to find document related to rolling forward database using archived logs that were not backed up (RMAN) and could not find one. Can you please let me know if and how we can we roll the database forward? Do we have to backup the archived logs using RMAN to recover using RMAN? We used multi log archive destinations to reduce the backups.
By the way, we are testing our backup strategy now. This is the case we failed. If we cannot do the rolling forward, we would backup the archived log once in every 20 minute or so.
Thank you for your help.
May 13, 2005 - 12:44 pm UTC
restore rman backup on diff. host
A reader, July 14, 2005 - 1:18 pm UTC
Hi,
I have a production Server - A dbname = Prod
Catalog database server B dbname = Catl
Is it possible to restore the backup of Prod on a diff.
host. I have taken the full backup of "Prod" on A server.
If yes, Can you tell me the steps.
I have checked in Oracle Doc .. but no luck ..
Rman restore two time giving error
Jagjeet Singh, September 09, 2005 - 11:18 am UTC
Hi,
I have a tablespace of 10 gb with 1 datafile. I took the backup of this
tablespace through rman using controlfile.
--It was read only tablespace.
Later I need this I restored it successfully from RMAN on a diff.
location. -- I Need this for plug [ transport tablepsace ] into an
other database.
I used this
run
{
set newname for datafile '/uu01/tbs.dbf' to '/uu02/tbs.dbf' ;
restore tablespace tbs;
}
It restored it successfully.
The same command I am using next day but It is giving error.
can not identify file - ORA-19625 And it is giving the new file name
where I restored it earlier
Thanks,
Js
September 09, 2005 - 11:22 am UTC
can we see a cut and paste - command and all.
Cut and Paste
Jagjeet Singh, September 10, 2005 - 5:00 am UTC
Recovery Manager: Release 9.2.0.4.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: JS (DBID=2903310348)
RMAN> list backup;
using target database controlfile instead of recovery catalog
RMAN> backup tablespace "TEST" ;
Starting backup at 10-SEP-05
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=9 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00003 name=/ora9/db1/test_01.dbf
channel ORA_DISK_1: starting piece 1 at 10-SEP-05
channel ORA_DISK_1: finished piece 1 at 10-SEP-05
piece handle=/ora9/app/oracle/product/9.2.0/dbs/08ah5i40_1_1 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 10-SEP-05
RMAN> list backup;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
5 Full 852K DISK 00:00:01 10-SEP-05
BP Key: 5 Status: AVAILABLE Tag: TAG19990101T010152
Piece Name: /ora9/app/oracle/product/9.2.0/dbs/08ah5i40_1_1
List of Datafiles in backup set 5
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
3 Full 335843 10-SEP-05 /ora9/db1/test_01.dbf
RMAN> run
2> {
3> set newname for datafile '/ora9/db1/test_01.dbf' to '/tmp/test_01.dbf' ;
4> restore tablespace "TEST";
5> }
executing command: SET NEWNAME
Starting restore at 10-SEP-05
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00003 to /tmp/test_01.dbf
channel ORA_DISK_1: restored backup piece 1
piece handle=/ora9/app/oracle/product/9.2.0/dbs/08ah5i40_1_1 tag=TAG19990101T010152 params=NULL
channel ORA_DISK_1: restore complete
Finished restore at 10-SEP-05
## I have deleted file from this location '/tmp/test_01.dbf'
RMAN> run
2> {
3> set newname for datafile '/ora9/db1/test_01.dbf' to '/tmp/test_01.dbf' ;
4> restore tablespace "TEST";
5> }
executing command: SET NEWNAME
Starting restore at 10-SEP-05
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 01/01/1999 01:03:34
ORA-19625: error identifying file /tmp/test_01.dbf
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
RMAN> quit
September 10, 2005 - 9:08 am UTC
1999 ???
2005 ???
whats up with the time here.
You created a copy, RMAN knows that -- it knows the copy should exist and is upset it doesn't. So, it must be told it is gone, consider:
RMAN> run
2> {
3> set newname for datafile '/home/ora9ir2/oradata/ora9ir2/o1_mf_test_18cylw4r_.dbf' to '/tmp/o1_mf_test_18cylw4r_.dbf';4> restore tablespace "TEST";
5> }
executing command: SET NEWNAME
Starting restore at 10-SEP-05
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00010 to /tmp/o1_mf_test_18cylw4r_.dbf
channel ORA_DISK_1: restored backup piece 1
piece handle=/home/ora9ir2/dbs/02gu95ti_1_1 tag=TAG20050910T083250 params=NULL
channel ORA_DISK_1: restore complete
Finished restore at 10-SEP-05
RMAN> host;
[tkyte@desktop tkyte]$ msu - ora9ir2
[ora9ir2@desktop ora9ir2]$ rm -f /tmp/o1_mf_test_18cylw4r_.dbf
[ora9ir2@desktop ora9ir2]$ ls -l /tmp/o1*
ls: /tmp/o1*: No such file or directory
[ora9ir2@desktop ora9ir2]$ exit
[tkyte@desktop tkyte]$ exit
exit
host command complete
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-06135: error executing host command: Additional information: 256
Additional information: 11
RMAN> run
2> {
3> set newname for datafile '/home/ora9ir2/oradata/ora9ir2/o1_mf_test_18cylw4r_.dbf' to '/tmp/o1_mf_test_18cylw4r_.dbf';4> restore tablespace "TEST";
5> }
executing command: SET NEWNAME
Starting restore at 10-SEP-05
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 09/10/2005 08:49:15
ORA-19625: error identifying file /tmp/o1_mf_test_18cylw4r_.dbf
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Your issue.....
RMAN> crosscheck copy of datafile '/home/ora9ir2/oradata/ora9ir2/o1_mf_test_18cylw4r_.dbf';
released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=15 devtype=DISK
validation failed for datafile copy
datafile copy filename=/tmp/o1_mf_test_18cylw4r_.dbf recid=5 stamp=568630093
Crosschecked 1 objects
RMAN> list expired copy;
specification does not match any archive log in the recovery catalog
List of Datafile Copies
Key File S Completion Time Ckp SCN Ckp Time Name
------- ---- - --------------- ---------- --------------- ----
5 10 X 10-SEP-05 49976748 10-SEP-05 /tmp/o1_mf_test_18cylw4r_.dbf
RMAN> delete expired copy of datafile 10;
released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=15 devtype=DISK
List of Datafile Copies
Key File S Completion Time Ckp SCN Ckp Time Name
------- ---- - --------------- ---------- --------------- ----
5 10 X 10-SEP-05 49976748 10-SEP-05 /tmp/o1_mf_test_18cylw4r_.dbf
Do you really want to delete the above objects (enter YES or NO)? yes
deleted datafile copy
datafile copy filename=/tmp/o1_mf_test_18cylw4r_.dbf recid=5 stamp=568630093
Deleted 1 EXPIRED objects
the steps to fix...
RMAN> run
2> {
3> set newname for datafile '/home/ora9ir2/oradata/ora9ir2/o1_mf_test_18cylw4r_.dbf' to '/tmp/o1_mf_test_18cylw4r_.dbf';4> restore tablespace "TEST";
5> }
executing command: SET NEWNAME
Starting restore at 10-SEP-05
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00010 to /tmp/o1_mf_test_18cylw4r_.dbf
channel ORA_DISK_1: restored backup piece 1
piece handle=/home/ora9ir2/dbs/02gu95ti_1_1 tag=TAG20050910T083250 params=NULL
channel ORA_DISK_1: restore complete
Finished restore at 10-SEP-05
Thanks
Jagjeet Singh, September 11, 2005 - 8:45 am UTC
Thanks for your reply.
o But why does rman keep this information ?
Time Issue : Actually My system's motherboard's battery is
week and it set time to 01-jan-99 whenever I boot the
machine. I replaced this date with current date to hide
this but missed one and you noticed this :)
Thanks,
Js
September 11, 2005 - 10:24 am UTC
because RMAN is a book-keeper, that is one of it's primary goals. It is designed to remember stuff! It knows it put it there, and it want's to have access to it.
(replace the battery! :)
messed up dates can screw up lots of stuff.
Where it is storing this information ?
Jagjeet Singh, September 13, 2005 - 8:32 am UTC
Hi,
o I was trying to figure out where it is storing this
info. that It has restore a datafile on that location.
What I did
-----------
. Database A has tablespace test.
. Database B has schema REP for repository.
. Took the backup of tablespace test.
. Took the export of REP schema.
. Restore test's datafile to /tmp/test_01.dbf using set newname
. Removed it from OS Level and tried to restore it again.
. Got error as we discussed before. Then I dropped the
schema REP and created new one and imported the old exp
backup.
. Tried again to restore but getting same error.
-- It's mean it is not storing this info. in repository.
o Why does it need to remember this. What is the logic behind this.
Thanks,
Js
September 13, 2005 - 12:25 pm UTC
control files are used to store the metadata, things rman wants to remember.
Need to Resolve this issue!!!
A reader, October 13, 2005 - 4:36 am UTC
Hi Tom,
Oracle Version 8i Rel 3. Going To upgrade to 10g soon.
O/S: Windows 2000.
Was doing a restore and recovery operation from one host to another using RMAN in no catalog mode but with RMAN backups.
I had a copy of the controlfile.
a) I created the instance and mounted the database as per the docs.
But after it is mounted, it shows Ora-1990.
How do I register the password file with this database after creating it with Orapwd utility.
There is another database running on the same server.
b) After recovering it on one occasion after bypassing the Ora-1990 error it asked for the redolog files.
But the logfiles were not recovered. So how do i resolve this issue.
c) I tried this but did not work:
I recovered the Control file using RMAN Catalog.
Then I again logged into the target database using no catalog.
As the controfile is there the database started but the RMAN backups could not be found on the disk.
I did a crosscheck backup and it showed the backup files but while recovering it said the backups are missing.
I had copied the backups to the same folder as it existed on the database server.
Please
Thanks in advance.
October 13, 2005 - 10:38 am UTC
a) orapwd is the utility used to create password files. You don't "register" it, you just "have it there"
b) insufficient data here, no idea what you did or what you mean by "logfile were not recovered"
please utilize support, they'll collect the needed missing information here and help you work through your recover.
With Reference to the above question....
A reader, October 13, 2005 - 6:39 am UTC
Hi Tom,
Oracle 8i Rel 3
O/S Windows 2000
Another problem that I am facing:
I tried doing it both using catalog and nocatalog but it shows the same.
After mopunting the database when i do a crosscheck or list backup it shows all the backupsets.
But, while doing a restore it throws the error RMAN-6026.
I am using set until scn = <scn>;
I have no idea as to what to do.
Please advice.
Thanks a lot.
Sorry for the incomplete information!!
A reader, October 14, 2005 - 12:53 am UTC
Hi Tom,
Sorry for the incomplete information.
I know that the orapwd is a utility which is there and its use.
My question is:
When it throws the error Ora-1990, it does not quote the name of any pwd<sid> file. I want to know how do i use the orapwd utility to create a password file so that the particular instance can identify that pwd file.
There is another instance on the server which i use as a OEM repository.
As for the Logfiles:
On one ocassion after successfully restoring it on another host it stopped after saying the logfiles could not be found. I do not know how to resolve this issue.
Another problem that I am facing:
I tried doing it both using catalog and nocatalog but it shows the same error or message.
After mounting the database when i do a crosscheck or list backup it shows all the backupsets.
But, while doing a restore it throws the error RMAN-6026.
I am using set until scn = <scn>;
Also I am using Incremental backups to backup the database.
I have no idea as to what to do.
Please advice.
Thanks a lot.
October 14, 2005 - 7:48 am UTC
the location of the oracle password file is OS dependent but generally is in $ORACLE_HOME/dbs on unix and $ORACLE_HOME/database on windows and is named
ora$ORACLE_SID on unix
pw[%ORACLE_SID].ora on windows
please contact support for the rest - they can help you work through this, I don't know your setup. finding the logfiles is a matter of putting them where they used to be - where they belong, but support can gather the information about you and your setup and help you figure it out.
Why recovery need archives so far back?
Jerry, October 19, 2005 - 11:16 pm UTC
Hi, Tom,
I was trying to do a recovery today and ran into the following problem:
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: '/oracle/u01/oradata/tcip/system01.dbf'
SQL> recover datafile '/oracle/u01/oradata/tcip/system01.dbf';
ORA-00279: change 328578504 generated at 05/01/2005 21:57:01 needed for thread 1
ORA-00289: suggestion : /oracle/u07/oradata/tcip/arch/tcip_1_1865.arc
How come the system datafile fall so far behind? We only keep 30-day's backup. We are using RMAN to run hot backup. How can I avoid this in the future? Thanks!
October 20, 2005 - 7:55 am UTC
are you sure you restored a current copy of system. (verify you've been backing it up for example)
Backups are OK
Jerry, October 20, 2005 - 9:14 am UTC
Yes. I am backing it up everyday using both RMAN scripts on the server and BCVs on another server.
The system01.dbf are the current system file. The instance crashed and I was trying to bring up the database. Will a checkpoint command before every backup help?
October 20, 2005 - 10:28 am UTC
it is doubtful that such a long time elapsed between checkpoints - the act of checkpointing wouldn't "help" as far as I can see.
this is going back literally months into the past.
Not being overly sure of the process/procedure you are using - I won't be able to comment further. The only thing I know that would cause this would be the restoration of a really old datafile (meaning, I'm not yet convinced personally that the backups are OK)
possibilities
Jeff Richter, October 20, 2005 - 3:36 pm UTC
You said you're trying to bring the database up after a crash. Has the database been up without interruption for several months? Possibly the SYSTEM tablespace has been in backup mode the whole time with the checkpoint number frozen since May.
The other thing that comes to mind (although this is even more unlikely) is to make sure your system clock is set properly.
October 20, 2005 - 4:58 pm UTC
good point(s), thanks
restore to another database
A reader, May 08, 2006 - 11:09 am UTC
hi tom, i have a database running.
back is done online using RMAN.
now i want to test whether this backup works properly and incase of failure, i should be able to restore using backup.
now lets say i have another database available which is quiet old copy of the same dataase.
now using the backup of the latest database can i restore the other database to a particular point in time.
i have on 9207 database.
if you can give some pointers or sample or syntax it will be greatly appreciated.
May 08, 2006 - 1:29 pm UTC
the "another database available which is an old copy" - isn't relevant to test a restore, you restore databases - that old copy - not useful for anything here.
Using the BACKUP of the latest database, you can restore and do a point in time recovery of THAT BACKED UP database.
The procedures are fully documented, You will want to use that.
Thanks Tom.
A reader, May 08, 2006 - 9:27 pm UTC
Ok. i got it.
But using the backup of the latest database, i can clone another database to a point in time right ?
May 09, 2006 - 7:35 am UTC
yes, you would just be doing a "restore" (something you should be able to do in your sleep if you are the DBA) and a cancel based or incomplete time/scn based recovery (something you should only need to be partially awake to accomplish if you are the DBA)
Superb !!!
A reader, May 09, 2006 - 9:47 am UTC
Danke. Ideas are matching.
I just wanted to get confirmation from expert like you.
Steps in RMAN restore
A reader, May 18, 2006 - 10:13 am UTC
Hi,
This is the first step I am trying to use RMAN. This is my situation. I took an RMAN backup of a test database and I copied the backup files to another machine. Now I want to restore that backup on to that machine. This second machine does not have a database in it. Now what are the steps I have to follow in order to restore that backup on to the second machine. Should I create an sid like a normal restore? Please let me know.
Thanks,
Vidya.
Hi Tom, I still havent received any response for my post above.
A reader, May 19, 2006 - 9:37 am UTC
Alexander the ok, November 06, 2006 - 5:17 pm UTC
Hi Tom,
I was wondering if you can restore individual objects from RMAN backups, such as a table. Say someone screws up some data in a table, what's the best way to restore the data assuming we take regular backups. I know you can restore datafiles and tablespaces, but if you have a lot of tables in them, then your data will become all out of whack with production. Is your only choice to restore everything? Or restore a different database then export the table then import the table to be restored?
November 07, 2006 - 4:24 pm UTC
you would have considered this when laying out your storage and how you organized objects.
in order to restore a table you would have to restore that TABLESPACE to some other system (along with system and rollback/undo of course), open that database copy you just create and exp or expdp the data out.
Alexander the ok, December 01, 2006 - 2:56 pm UTC
Tom,
I have backups failing because RMAN thinks there are archive logs to be backed that don't exist anymore. I don't know how this happened but if I
RMAN> list copy;
List of Archived Log Copies
Key Thrd Seq S Low Time Name
------- ---- ------- - --------- ----
60 1 83 A 28-NOV-06 /ocp16p/arclogs/1_83_605516741.dbf
61 1 84 A 28-NOV-06 /ocp16p/arclogs/1_84_605516741.dbf
62 1 85 A 28-NOV-06 /ocp16p/arclogs/1_85_605516741.dbf
63 1 86 A 28-NOV-06 /ocp16p/arclogs/1_86_605516741.dbf
64 1 87 A 28-NOV-06 /ocp16p/arclogs/1_87_605516741.dbf
65 1 88 A 28-NOV-06 /ocp16p/arclogs/1_88_605516741.dbf
66 1 89 A 28-NOV-06 /ocp16p/arclogs/1_89_605516741.dbf
67 1 90 A 28-NOV-06 /ocp16p/arclogs/1_90_605516741.dbf
68 1 91 A 28-NOV-06 /ocp16p/arclogs/1_91_605516741.dbf
69 1 92 A 28-NOV-06 /ocp16p/arclogs/1_92_605516741.dbf
70 1 93 A 28-NOV-06 /ocp16p/arclogs/1_93_605516741.dbf
71 1 94 A 28-NOV-06 /ocp16p/arclogs/1_94_605516741.dbf
72 1 95 A 28-NOV-06 /ocp16p/arclogs/1_95_605516741.dbf
73 1 96 A 28-NOV-06 /ocp16p/arclogs/1_96_605516741.dbf
74 1 97 A 28-NOV-06 /ocp16p/arclogs/1_97_605516741.dbf
75 1 98 A 28-NOV-06 /ocp16p/arclogs/1_98_605516741.dbf
76 1 99 A 28-NOV-06 /ocp16p/arclogs/1_99_605516741.dbf
None of those are in the directory, the job fails with
Starting backup at 2006-12-01:14:30:04
released channel: t1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 12/01/2006 14:30:04
RMAN-06059: expected archived log not found, lost of archived log compromises recoverability
ORA-19625: error identifying file /ocp16p/arclogs/1_83_605516741.dbf
ORA-27037: unable to obtain file status
IBM AIX RISC System/6000 Error: 2: No such file or directory Additional information: 3
Do you know how I can clean this up? Thanks.
Alexnader the ok, December 01, 2006 - 4:04 pm UTC
Nevermind Tom, sorry to bother you I resolved this.
Create a test database with the backup of the standby database
Danny Chen, March 10, 2007 - 5:06 pm UTC
Hi Tom,
I took a backup on a standby database, and I would like to use this backup to create a test database on a different host. But I failed. I could restore the database, however, I couldn't recover or activate the test database. Could you tell me which controlfile, primary/standby, I should use for the recovery? I've looked through all the Oracle doc I could found for a step by step instruction, but I couldn't find it. Would you mind give more detail on this topic? Oracle says that you must use the recovery catalog to backup a standby database, is it true? Why?
March 12, 2007 - 6:46 pm UTC
which are the files are essential for the recovery?
Dawar, March 16, 2007 - 1:35 am UTC
Tom,
My database is in archive mode,
and I am doing hot backup.
I am using rman to do backup on the disk every nignt via cron job.
Now I need to copy backup recovery files to the tape.
which are the files are essential for the recovery?
In other words, which files I should copy to the tape every night for any recovery issue?
Dawar
March 17, 2007 - 2:31 pm UTC
all of them?
Aru
Aru, April 19, 2007 - 7:26 pm UTC
Hi Tom,
In the oracle 10g upgrade docs it says:-
'In Oracle 10g, you can use RMAN to apply incremental backups to data file image copies. With this recovery method, you can roll forward (recover) the image copy to the specified point in time by applying the incremental backups to the image copy.'
That means a point in time recovery of a single datafile.
How will the database be able to bring such a datafile online when it is going to be totally out of sync with the rest of the database??
Or have I missed some real basic concepts of backup and recovery (though I have read quite a few docs)..
Regards,
Aru.
April 20, 2007 - 6:43 am UTC
they are talking about catching backups up.
In the past, to do incremental backups, you would:
a) take a level 0 - full backup
b) take a level >0 incremental (all changes since the next lowest level - say you do a level 1 here, you would get all changes between A) and B) )
c) take a level >0 - say another level 1, you get all changes between B and C now)
d) repeat b, c, ....
Now, if you want to recover you would:
a) restore full backup of file
b) apply B) incremental to it
c) apply C) incremental to it
d) ......
e) apply archives to finish catching file up to rest of database
In 10g, we can "catch the backup up" now. So, the process can be:
a) take level 0 full
b) take level 1, APPLY IT TO A right now, don't save as separate thing, catch the backed up file up a bit
c) take level 1, APPLY IT ..........
d) repeat b, c, .....
Now, to restore we:
a) restore file that has already had incremental applied to it
b) apply archives to finish catching file up to rest of database.
*****
Aru, April 21, 2007 - 3:31 pm UTC
Thanks Tom, you're the best.
RMAN and resources used.
A reader, April 26, 2007 - 8:08 am UTC
Hi Tom,
I was wondering how exactly RMAN backups up a database. I have read, it uses the large_pool (if not adequate, the PGA) for its manipulation. Will it use sort_area or temporary segments?
Thanks and Regards,
April 26, 2007 - 1:03 pm UTC
it reads little bits of it at a time using a dedicated server process. Mostly using pga memory in the process.
RMAN- Internals
A reader, April 27, 2007 - 3:38 am UTC
Hi Tom,
It would be highly useful if you can throw some light on the internal working of RMAN utility.
The information I could get so far was: RMAN reads the used blocks reads it into memory and from ther writes to disk/tape, through input/output buffers. The checkpoint SCN and Fuzzy SCN records will help in identifying the recovery required redo and the fractured blocks are eliminated by re-reading the blocks. (One question here: If a block is found to be fractured, will RMAN stops writing this to backupset and wait till a consistent image is obtained? or is it stored in memory,(while RMAN continues reading other block)and revisited later -replaces it with consistent image and writted to backupset along with other blocks (read before and after). Correct me if I'm wrong. All these informations are from the bits obtained from several places.Any pointers to good documentation also will be helpfull.
Where are temporary segments employed? Can you please explain.
Once again thanks a lot for your knowledge sharing.
Regards,
April 27, 2007 - 10:49 am UTC
why would it be helpful to know internals for a backup tool like this?
if a block is fractured, as documented, RMAN will just read it again, it won't be fractured the second time. the OS will have completed its job by then.
what do temporary segments have to do with rman?
RMAN backup
sam, May 18, 2007 - 2:09 am UTC
Hi Tom,
i have recently configured tdp for oracle on AIX box 5.2 and successfully tested the controlfile backup.Now i am trying to take archivelog backup thru ksh script which is working fine on other servers.But running this script gives me the following error:
0403-029 There is not enough memory available.
size of 1 archive is 2GB
May 18, 2007 - 3:58 pm UTC
no clue what tdp is.
0403-029 is not an oracle error.
RMAN backup - TDP
Michel Cadot, May 19, 2007 - 2:01 am UTC
TDP for Oracle is Tivoli Data Protection for Oracle, a media manager for RMAN that interfaces with Tivoli Storage Manager.
See additional information in tdpoerror.log file.
Also see in TDPO manual for the error 0403-029 (but iirc TDP or TSM errors are like ANU% or ANS%).
Regards
Michel
Difference between RMAN backup set and backup piece
Delwin, July 12, 2007 - 3:49 am UTC
Hi Tom!!
Can you please describe the difference Between RMAN backup set and backup piece. An example will be appreciated.
July 12, 2007 - 10:14 am UTC
a set is a collection of pieces.
that is all. a set is the result of the backup command basically, that backup command might create many pieces depending on the options you use.
Can RMAN change schema names?
Mike, December 13, 2007 - 4:41 pm UTC
I've searched, so I don't think it can be done, but the business would like a backup of prod restored to test for user acceptance testing, but they want the main schema name changed from app_prod to app_test. They think that will help keep people from getting confused when they're connected to both (why they'd be connected to both, I'm not sure). I know impdp can convert schema names, but can RMAN?
December 14, 2007 - 12:32 pm UTC
there is no mechanism for renaming a schema, no.
that said, you could change your mode of operation - use a single schema to hold all of the data, use another schema to hold all of the code, use a third schema that is granted the correct access.
No one uses the first two schema's, they all use the third schema. The third schema is just an account with grants - you can easily create that anytime you wish - and name it differently in different databases.
Restore to a different location
A reader, February 27, 2008 - 9:35 am UTC
Tom,
If I want to restore the backup to a different location, I have to do SET NEWNAME FOR DATAFILE... for each datafile. This is can be cumbersome if there are couple of hundred datafiles. The situation is complicated if I have ASM aliases for some datafiles and some datafiles are in OMF naming format.
Is there a command I can issue which tells RMAN that I am restoring the entire backup to a different location instead of doing it on a per datafile basis? For example, the server where the backup was taken, the datafiles were store on ASM diskgroup +DATA1. The server where I am restoring to has diskgroup +DG1. Isn't there a simpler way to tell RMAN to restore everything to +DG1? Oracle 10gr2.
Thanks
Alexander, September 15, 2009 - 2:48 pm UTC
Tom,
We are in the process of converting our storage from tape to disk (tdp). It seems to be working well except on thing; In an attempt to get a transport ts or tspitr to work, I blew away all my disk backups and set my default channel to sbt_tape. It failed. So I ran a validate command, it failed. I switched back to disk as default, validate works fine. Makes no sense to me:
RMAN> show all;
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 18;
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/ora_exports/backup_files/%d_%F.bkp';
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE 'SBT_TAPE' TO '%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 4 BACKUP TYPE TO BACKUPSET;
CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE 'SBT_TAPE' TO 1;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE 'SBT_TAPE' TO 1;
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/ora_exports/backup_files/%d_%U' MAXPIECESIZE 2000 M;
CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' FORMAT 'backup_%d_%U' PARMS 'ENV=(TDPO_OPTFILE=/database/oracle/ctl/OCP25T.opt)';
CONFIGURE MAXSETSIZE TO UNLIMITED;
CONFIGURE ENCRYPTION FOR DATABASE OFF;
CONFIGURE ENCRYPTION ALGORITHM 'AES128';
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/oracle/product/102x/dbs/snapcf_OCP25T.f'; # default
RMAN> restore database validate;
Starting restore at 15-SEP-09
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=30 devtype=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 09/15/2009 12:23:03
RMAN-06026: some targets not found - aborting restore
RMAN-06100: no channel to restore a backup or copy of datafile 10
RMAN-06100: no channel to restore a backup or copy of datafile 9
RMAN-06100: no channel to restore a backup or copy of datafile 8
RMAN-06100: no channel to restore a backup or copy of datafile 7
RMAN-06100: no channel to restore a backup or copy of datafile 6
RMAN-06100: no channel to restore a backup or copy of datafile 5
RMAN-06100: no channel to restore a backup or copy of datafile 4
RMAN-06100: no channel to restore a backup or copy of datafile 3
RMAN-06100: no channel to restore a backup or copy of datafile 2
RMAN-06100: no channel to restore a backup or copy of datafile 1
RMAN> CONFIGURE DEFAULT DEVICE TYPE TO disk;
old RMAN configuration parameters:
CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
new RMAN configuration parameters:
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
new RMAN configuration parameters are successfully stored
released channel: ORA_DISK_1
RMAN> restore database validate;
Starting restore at 15-SEP-09
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=30 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=74 devtype=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: sid=19 devtype=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: sid=147 devtype=DISK
allocated channel: ORA_SBT_TAPE_1
channel ORA_SBT_TAPE_1: sid=90 devtype=SBT_TAPE
channel ORA_SBT_TAPE_1: Data Protection for Oracle: version 5.3.3.0
allocated channel: ORA_SBT_TAPE_2
channel ORA_SBT_TAPE_2: sid=22 devtype=SBT_TAPE
channel ORA_SBT_TAPE_2: Data Protection for Oracle: version 5.3.3.0
channel ORA_SBT_TAPE_1: starting validation of datafile backupset
channel ORA_SBT_TAPE_1: reading from backup piece backup_OCP25T_91kpa4gk_1_1
channel ORA_SBT_TAPE_2: starting validation of datafile backupset
channel ORA_SBT_TAPE_2: reading from backup piece backup_OCP25T_90kpa4gk_1_1
channel ORA_SBT_TAPE_1: restored backup piece 1
piece handle=backup_OCP25T_91kpa4gk_1_1 tag=TAG20090915T113548
channel ORA_SBT_TAPE_1: validation complete, elapsed time: 00:00:26
channel ORA_SBT_TAPE_2: restored backup piece 1
piece handle=backup_OCP25T_90kpa4gk_1_1 tag=TAG20090915T113548
channel ORA_SBT_TAPE_2: validation complete, elapsed time: 00:12:11
Finished restore at 15-SEP-09
September 15, 2009 - 2:58 pm UTC
you changed your default device from tape to disk - what is surprising? I'm not sure what I should be looking at here?
Alexander, September 15, 2009 - 3:15 pm UTC
I have NO disk backups, everything is on sbt_tape. So why would it fail to find backups if I changed the default to sbt_tape?
September 15, 2009 - 3:31 pm UTC
sounds identical to the problem reported in bug 4768353
... This works fine when the backuppieces are on disk and default device type is
disk.
This doesnt work when backuppieces are on tape and default device type is
tape.
....
Alexander, September 15, 2009 - 3:42 pm UTC
Ok, let me step back a minute here and take it from the top.
The bug you mentioned I do hit whenever I try dup db, transport ts, or tspitr.
What I described to you above was an attempt to AVOID this bug by putting everything in one place so it wouldn't have to use multiple devices (although it seems that doesn't work either).
Upon trying this work around, I discovered that I can't access backups while using default as sbt_tape, but setting to disk it does (even though they're on sbt_tape).
So maybe this is another bug? Did I make any sense?
September 15, 2009 - 4:34 pm UTC
I think it is a continuation of that bug, once you hit it - you hit it. It looked identical to me. Please utilize support for further research if you want, but it looks like a continuation of the same thing. The 'workaround' you did is the same and worked around the issue as well.
Before coldbackup I need to check if the db is down
Linda, September 15, 2009 - 4:21 pm UTC
Hi, I need to check if the database is up or down via a script for Windows. Thischeck needs to be done before sending the dbf¿s , controlfile and redo logs to another place.
I only need to check if db has been shutdown ¿ no oracle process, except for the listener, which will remain up.
The database will be shutdown via shutting down the OracleService. The stopping of the service shutsdown in an immediate way the database, but I need to include the checking anyway inside the script.
How to do it?
September 16, 2009 - 8:42 am UTC
use rman to script it
rman can not only tell you if db is down, it can take it down, it can do the backup
In the year 2009, if you are not using rman, you are doing it wrong.
Alexander, September 15, 2009 - 4:48 pm UTC
Yeah I agree Tom after looking at it more. I didn't realize that bug causes multiple problems when attempting any of those actions.
I contacted support for each one, they can't help. Basically you're screwed unless you're on 11g (and I'd be skeptical they work on that) or you keep months worth of disk backups around.
September 16, 2009 - 8:44 am UTC
or you do what you did?
Alexander, September 16, 2009 - 9:46 am UTC
What I did just got me around the default tape channel to tape part of the bug, there's no way around the piece that prematurely closes channels during the automated aux instance restore (that I've found).
Restoring after resetlogs
PC, September 22, 2009 - 7:22 pm UTC
Hi Tom
I just did a PITR (Point In Time Recovery) and opened the db with resetlogs. What are the steps involved in restoring the db prior to the resetlogs. I do have backups taken before and after resetlogs. The List Backup command displays only the current backup (post resetlogs) which is right.
RMAN> list incarnation;
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
16235 16236 SOL 1285631195 PARENT 1 15-SEP-09
16235 16433 SOL 1285631195 CURRENT 623620 22-SEP-09
Thanks in advance