Home » RDBMS Server » Backup & Recovery » Recover database on the other host (Oracle 10g - Red Hat 5)
Recover database on the other host [message #326442] Wed, 11 June 2008 09:24 Go to next message
marcossantos
Messages: 123
Registered: June 2008
Senior Member
I have to recover my database on the other host.

In my source machine(linux) I installed oracle 10g (10.2.0.1), sid=orapro, archive_mode=on,
flash_area_recovery=default.

RMAN - AUTOBACKUP=ON, CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F';

In new host (zlinux) I install oracle 10g (10.2.0.2.0). I has used DBCA and create a new database, with the same SID=orapro,
archive_mode=on, flash_area_recovery=default.

RMAN - AUTOBACKUP=ON, CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F';


Backup:

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 '%F'; # default
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 '/dados/db/oracle/product/10.2.0/db_1/dbs/snapcf_orapro.f'; # default


RMAN> list backup;

.........

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
6 Full 522.79M DISK 00:00:06 10-JUN-08
BP Key: 6 Status: AVAILABLE Compressed: NO Tag: TAG20080610T112043
Piece Name:

/dados/db/oracle/flash_recovery_area/ORAPRO/backupset/2008_06_10/o1_mf_nnndf_TAG20080610T112043_44x6ycvx_.bkp
List of Datafiles in backup set 6
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 Full 608723 10-JUN-08 /dados/oradata/orapro/system01.dbf
2 Full 608723 10-JUN-08 /dados/oradata/orapro/undotbs01.dbf
3 Full 608723 10-JUN-08 /dados/oradata/orapro/sysaux01.dbf
4 Full 608723 10-JUN-08 /dados/oradata/orapro/users01.dbf
5 Full 608723 10-JUN-08 /dados/oradata/orapro/rman_ts

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
7 Full 6.80M DISK 00:00:01 10-JUN-08
BP Key: 7 Status: AVAILABLE Compressed: NO Tag: TAG20080610T112050
Piece Name: /dados/db/oracle/flash_recovery_area/ORAPRO/autobackup/2008_06_10/o1_mf_s_657026450_44x6ylyd_.bkp
Control File Included: Ckp SCN: 608730 Ckp time: 10-JUN-08
SPFILE Included: Modification time: 10-JUN-08


I sent the backupset and autobackup files from source machine to new host.

And alter the name of server parameter file 'spfileorapro.ora' on new host for 'spfileorapro-1.ora'.


Recover:

$rman target /

RMAN> set dbid 'dbid_source_machine'

RMAN> startup nomount

LRM-00109: could not open parameter file '/dados/u01/app/oracle/product/10.2.0/db_1/dbs/initorapro.ora'

RMAN> restore spfile to pfile '/dados/u01/app/oracle/product/10.2.0/db_1/dbs/initorapro.ora' from
'/dados/u01/app/oracle/flash_recovery_area/ORAPRO/autobackup/2008_06_10/o1_mf_s_657026450_44x6ylyd_.bkp';


Starting restore at 11-JUN-08
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=36 devtype=DISK

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/11/2008 09:10:01
RMAN-06172: no autobackup found or specified handle is not a valid copy or piece

I get the error above.

Can anybody help me?

Thanks!





Re: Recover database on the other host [message #326452 is a reply to message #326442] Wed, 11 June 2008 09:43 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Quote:
RMAN> restore spfile to pfile '/dados/u01/app/oracle/product/10.2.0/db_1/dbs/initorapro.ora' from 



Not sure why you are restoring the spfile for a new database?
The new database you created will have an spfile / pfile.
Edit the file to reflect the entries to match the source database.
Just use it to nomount.
Restore and recover.
Re: Recover database on the other host [message #326485 is a reply to message #326442] Wed, 11 June 2008 12:43 Go to previous messageGo to next message
marcossantos
Messages: 123
Registered: June 2008
Senior Member
Hy,

thanks for your answer!

Even I ignore the step of restore spfile, I get the error:

RMAN-03002: failure of restore command at 06/11/2008 13:25:48
RMAN-06172: no autobackup found or specified handle is not a valid copy or piece


For example, when I execute:

RMAN>restore controlfile from '/dados/u01/app/oracle/flash_recovery_area/ORAPRO/o1_mf_s_657114938_44zxctjt_.bkp';

Starting restore at 11-JUN-08
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/11/2008 13:25:48
RMAN-06172: no autobackup found or specified handle is not a valid copy or piece


I cannot restore.

Marcos
Re: Recover database on the other host [message #326486 is a reply to message #326442] Wed, 11 June 2008 12:50 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
6172, 1, "no autobackup found or specified handle is not a valid copy or piece"
// *Cause:  A restore could not proceed because no autobackup was found or
//          specified handle is not a valid copy or backup piece.
//          In case of restore from autobackup, it may be the case that a
//          backup exists, but it does not satisfy the criteria specified in
//          the user's restore operands.
//          In case of restore from handle, it may be the handle is not a backup
//          piece or controflile copy. In may be that it does not exist.
// *Action: Modify autobackup search criteria or verify the handle.
Re: Recover database on the other host [message #326491 is a reply to message #326485] Wed, 11 June 2008 13:03 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
http://download.oracle.com/docs/cd/B19306_01/backup.102/b14191/rcmrecov003.htm#sthref731
try with a maxdays option
or
Just until time
something like this.
restore until time 'sysdate-x' CONTROLFILE to 'your new area' from autobackup;
Re: Recover database on the other host [message #326496 is a reply to message #326442] Wed, 11 June 2008 15:18 Go to previous messageGo to next message
marcossantos
Messages: 123
Registered: June 2008
Senior Member
I try now:

RMAN> run{
2> set controlfile autobackup format for device type disk to
3> '/dados/u01/app/oracle/flash_recovery_area/%F';
4> restore controlfile from autobackup;}

executing command: SET CONTROLFILE AUTOBACKUP FORMAT

Starting restore at 11-JUN-08
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/11/2008 15:51:04
ORA-19625: erro ao identificar arquivo /dados/u01/app/oracle/flash_recovery_area/ORAPRO/autobackup/2008_06_11/o1_mf_s_657128589_450bvsnq_.bkp
ORA-27047: UNABLE TO READ THE HEADER BLOCK OF FILE
Additional information: 2


Corrupt file? Version problem?

Source machine 10.2.0.1 and new host 10.2.0.2.

Compatibility?



Marcos



Re: Recover database on the other host [message #326497 is a reply to message #326496] Wed, 11 June 2008 15:26 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
>>In my source machine(linux)
>>In new host (zlinux) I install oracle 10g (10.2.0.2.0).
I completely ignored this. Need to check what i been drinking lately.Smile
Both the OS should be same.
Re: Recover database on the other host [message #326504 is a reply to message #326496] Wed, 11 June 2008 15:53 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
I have not worked with zlinux.
Not sure how exactly things go good with linux/zlinux.
Usually, RMAN backupsets are OS dependent.
It may be an issue.
Also
>>I sent the backupset and autobackup files from source machine to new host.
How exactly did you "send"?
FTP? Did you use the bin option?
May be the files are corrupted during transfer.
Do a block check.
Re: Recover database on the other host [message #326507 is a reply to message #326496] Wed, 11 June 2008 16:04 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
As Mahesh eluded to, your problem is the Endian format between the two platforms. You can consider Transporting Tablespaces.
Re: Recover database on the other host [message #327485 is a reply to message #326504] Mon, 16 June 2008 09:52 Go to previous messageGo to next message
marcossantos
Messages: 123
Registered: June 2008
Senior Member
I have used:

scp user@ip_adress:/path_source /path_new_host


Marcos
Re: Recover database on the other host [message #447954 is a reply to message #326442] Thu, 18 March 2010 12:35 Go to previous message
sunil bhola
Messages: 58
Registered: July 2002
Member
Seems issue with backup set: -

while taking backup you used:-

/dados/db/oracle/flash_recovery_area/ORAPRO/autobackup

but in time of restoring you are using:-

/dados/u01/app/oracle/flash_recovery_area/ORAPRO/autobackup

Both server should have same directory structure in order to restore from backup piece.

Solution:-

catalog that backup piece
Previous Topic: Restore Performance
Next Topic: Media Library Status Checking In RMAN
Goto Forum:
  


Current Time: Thu Mar 28 14:42:37 CDT 2024