dbTalk Databases Forums  

Trying to restore RMAN backup in new server, got error RMAN-06172

comp.databases.oracle.server comp.databases.oracle.server


Discuss Trying to restore RMAN backup in new server, got error RMAN-06172 in the comp.databases.oracle.server forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Big George
 
Posts: n/a

Default Trying to restore RMAN backup in new server, got error RMAN-06172 - 06-21-2011 , 03:29 PM






Hello,
We are using Oracle 10g R2 in Windows Server 2003. I'm trying to
restore a database in a new server, using RMAN backups.
Our external consultant configured RMAN scripts for full and
incremental backups but never tested them . Since he just doesn't show
up, I'm forced to tested them, restoring the whole database in a new
server.
My instance is named MTDPROD, and I will create all from scratch.

At new server, I run all these commands:

C:\>oradim -new -sid MTDPROD -intpwd mtdprod
Instance created

-- I created the relevant folder hierarchy under <ORACLE_BASE>
directory
-- Then, I created the relevant directories for Oracle Database, as
follows:
--a. Create BDUMP, CDUMP, and UDUMP directories under '<ORACLE_ BASE>
\admin'
-- directory,
-- b. Create <DATABASE_NAME> directory under '<ORACLE_BASE>\oradata'
directory; in my
-- case MTDPROD

C:\> set oracle_sid=MTDPROD

C:\> rman

RMAN> connect target sys
connected to target database (not started)

-- My DBID is 2169285856
RMAN> set dbid=2169285856

RMAN> startup force nomount;

RMAN> restore spfile from autobackup db_recovery_file_dest='//
192.168.1.149/g$/XXXSRV4-ArcLogs/MTDPROD/RMAN' db_name='MTDPROD';

Messages:

Starting restore at 21-JUN-11
using channel ORA_DISK_1

recovery area destination: //192.168.1.149/g$/XXXSRV4-ArcLogs/MTDPROD/
RMAN
database name (or database unique name) used for search: MTDPROD
channel ORA_DISK_1: no autobackups found in the recovery area
channel ORA_DISK_1: looking for autobackup on day: 20110621
channel ORA_DISK_1: looking for autobackup on day: 20110620
channel ORA_DISK_1: looking for autobackup on day: 20110619
channel ORA_DISK_1: looking for autobackup on day: 20110618
channel ORA_DISK_1: looking for autobackup on day: 20110617
channel ORA_DISK_1: looking for autobackup on day: 20110616
channel ORA_DISK_1: looking for autobackup on day: 20110615
channel ORA_DISK_1: no autobackup in 7 days found
RMAN-00571:
================================================== =========
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS
===============
RMAN-00571:
================================================== =========
RMAN-03002: failure of restore command at 06/21/2011 12:50:28
RMAN-06172: no autobackup found or specified handle is not a valid
copy or piece


The RMAN backups are generating in //192.168.1.149/g$/XXXSRV4-ArcLogs/
MTDPROD/RMAN.
By instance, I see a lot of this kind of files:
- FULL_MTDPROD_20110529_386_1.BAK
- INCR_MTDPROD_20110621_480_7.BAK

And only see these two files:
- C-2169285856-20110527-03
- C-2169285856-20110527-04
It seems that this C-2169285856-.... files only were on 27/05/2011 and
then no more.

However, the FULL_... and INCR_.. files are generated every day.
The FULL is generated at the end of each month and INCR is generated
every day.

This is the backfull.sql:
run {
allocate channel c1 type disk maxpiecesize=4G;
CROSSCHECK archivelog all;
backup
incremental level 0
format '\\192.168.1.149\g$\XXXSRV4-arclogs\MTDPROD\RMAN\FULL_
%d_%T_%s_%p.bak'
filesperset 8
database include current controlfile;
SQL 'alter system archive log current';
backup
format '\\192.168.1.149\g$\XXXSRV4-arclogs\MTDPROD\RMAN\ARC_
%d_%T_%s_%p.bak'
archivelog all delete all input;
}

This is the backincr.sql:

run {
allocate channel c1 type disk maxpiecesize=4G;
CROSSCHECK archivelog all;
backup
incremental level 1 cumulative
format '\\192.168.1.149\g$\XXXSRV4-arclogs\MTDPROD\RMAN\INCR_
%d_%T_%s_%p.bak'
filesperset 8
database include current controlfile;
SQL 'alter system archive log current';
backup
format '\\192.168.1.149\g$\XXXSRV4-arclogs\MTDPROD\RMAN\ARC_
%d_%T_%s_%p.bak'
archivelog all delete all input;
}

Reply With Quote
  #2  
Old   
John Hurley
 
Posts: n/a

Default Re: Trying to restore RMAN backup in new server, got error RMAN-06172 - 06-21-2011 , 08:22 PM






On Jun 21, 4:29*pm, Big George <jbet... (AT) gmail (DOT) com> wrote:
Quote:
Hello,
We are using Oracle 10g R2 in Windows Server 2003. I'm trying to
restore a database in a new server, using RMAN backups.
Our external consultant configured RMAN scripts for full and
incremental backups but never tested them . Since he just doesn't show
up, I'm forced to tested them, restoring the whole database in a new
server.
My instance is named MTDPROD, and I will create all from scratch.

At new server, I run all these commands:

C:\>oradim -new -sid MTDPROD -intpwd mtdprod
Instance created

-- I created the relevant folder hierarchy under <ORACLE_BASE
directory
-- Then, I created the relevant directories for Oracle Database, as
follows:
--a. Create BDUMP, CDUMP, and UDUMP directories under '<ORACLE_ BASE
\admin'
-- directory,
-- b. Create <DATABASE_NAME> directory under '<ORACLE_BASE>\oradata'
directory; in my
-- case MTDPROD

C:\> set oracle_sid=MTDPROD

C:\> rman

RMAN> connect target sys
connected to target database (not started)

-- *My DBID is 2169285856
RMAN> set dbid=2169285856

RMAN> startup force nomount;

RMAN> restore spfile from autobackup db_recovery_file_dest='//
192.168.1.149/g$/XXXSRV4-ArcLogs/MTDPROD/RMAN' db_name='MTDPROD';

Messages:

Starting restore at 21-JUN-11
using channel ORA_DISK_1

recovery area destination: //192.168.1.149/g$/XXXSRV4-ArcLogs/MTDPROD/
RMAN
database name (or database unique name) used for search: MTDPROD
channel ORA_DISK_1: no autobackups found in the recovery area
channel ORA_DISK_1: looking for autobackup on day: 20110621
channel ORA_DISK_1: looking for autobackup on day: 20110620
channel ORA_DISK_1: looking for autobackup on day: 20110619
channel ORA_DISK_1: looking for autobackup on day: 20110618
channel ORA_DISK_1: looking for autobackup on day: 20110617
channel ORA_DISK_1: looking for autobackup on day: 20110616
channel ORA_DISK_1: looking for autobackup on day: 20110615
channel ORA_DISK_1: no autobackup in 7 days found
RMAN-00571:
================================================== =========
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS
===============
RMAN-00571:
================================================== =========
RMAN-03002: failure of restore command at 06/21/2011 12:50:28
RMAN-06172: no autobackup found or specified handle is not a valid
copy or piece

The RMAN backups are generating in //192.168.1.149/g$/XXXSRV4-ArcLogs/
MTDPROD/RMAN.
By instance, I see a lot of this kind of files:
- FULL_MTDPROD_20110529_386_1.BAK
- INCR_MTDPROD_20110621_480_7.BAK

And only see these two files:
- C-2169285856-20110527-03
- C-2169285856-20110527-04
It seems that this C-2169285856-.... files only were on 27/05/2011 and
then no more.

However, the FULL_... and INCR_.. files are generated every day.
The FULL is generated at the end of each month and INCR is generated
every day.

This is the backfull.sql:
run *{
* * * * allocate channel c1 type disk maxpiecesize=4G;
* * * * CROSSCHECK archivelog all;
* * * * backup
* * * * *incremental level 0
* * * * *format '\\192.168.1.149\g$\XXXSRV4-arclogs\MTDPROD\RMAN\FULL_
%d_%T_%s_%p.bak'
* * * * *filesperset 8
* * * * *database include current controlfile;
* * * * SQL 'alter system archive log current';
* * * * backup
* * * * *format '\\192.168.1.149\g$\XXXSRV4-arclogs\MTDPROD\RMAN\ARC_
%d_%T_%s_%p.bak'
* * * * *archivelog all delete all input;
* * * *}

This is the backincr.sql:

run *{
* * * * allocate channel c1 type disk maxpiecesize=4G;
* * * * CROSSCHECK archivelog all;
* * * * backup
* * * * *incremental level 1 cumulative
* * * * *format '\\192.168.1.149\g$\XXXSRV4-arclogs\MTDPROD\RMAN\INCR_
%d_%T_%s_%p.bak'
* * * * *filesperset 8
* * * * *database include current controlfile;
* * * * SQL 'alter system archive log current';
* * * * backup
* * * * * format '\\192.168.1.149\g$\XXXSRV4-arclogs\MTDPROD\RMAN\ARC_
%d_%T_%s_%p.bak'
* * * * * archivelog all delete all input;
* * * *}
If your existing server that this backup is based on is still running
I would create a copy of the spfile from that server and startup your
instance with a startup pfile= type thing.

You can always recreate the spfile from a pfile.

I follow all my rman backups with ( at least ) 2 commands ...

sqlplus based ...
create pfile='/somewhere/something_pfile_backup.ora' from spfile;

rman based ...
copy current controlfile to '/somewhere/something_ctrlfile_copy.ctl';

This gives you a file based copy of both the spfile and the control
file. You probably want a copy of both of these after each backup.

Reply With Quote
  #3  
Old   
onedbguru
 
Posts: n/a

Default Re: Trying to restore RMAN backup in new server, got error RMAN-06172 - 06-21-2011 , 09:05 PM



On Jun 21, 9:22*pm, John Hurley <hurleyjo... (AT) yahoo (DOT) com> wrote:
Quote:
On Jun 21, 4:29*pm, Big George <jbet... (AT) gmail (DOT) com> wrote:









Hello,
We are using Oracle 10g R2 in Windows Server 2003. I'm trying to
restore a database in a new server, using RMAN backups.
Our external consultant configured RMAN scripts for full and
incremental backups but never tested them . Since he just doesn't show
up, I'm forced to tested them, restoring the whole database in a new
server.
My instance is named MTDPROD, and I will create all from scratch.

At new server, I run all these commands:

C:\>oradim -new -sid MTDPROD -intpwd mtdprod
Instance created

-- I created the relevant folder hierarchy under <ORACLE_BASE
directory
-- Then, I created the relevant directories for Oracle Database, as
follows:
--a. Create BDUMP, CDUMP, and UDUMP directories under '<ORACLE_ BASE
\admin'
-- directory,
-- b. Create <DATABASE_NAME> directory under '<ORACLE_BASE>\oradata'
directory; in my
-- case MTDPROD

C:\> set oracle_sid=MTDPROD

C:\> rman

RMAN> connect target sys
connected to target database (not started)

-- *My DBID is 2169285856
RMAN> set dbid=2169285856

RMAN> startup force nomount;

RMAN> restore spfile from autobackup db_recovery_file_dest='//
192.168.1.149/g$/XXXSRV4-ArcLogs/MTDPROD/RMAN' db_name='MTDPROD';

Messages:

Starting restore at 21-JUN-11
using channel ORA_DISK_1

recovery area destination: //192.168.1.149/g$/XXXSRV4-ArcLogs/MTDPROD/
RMAN
database name (or database unique name) used for search: MTDPROD
channel ORA_DISK_1: no autobackups found in the recovery area
channel ORA_DISK_1: looking for autobackup on day: 20110621
channel ORA_DISK_1: looking for autobackup on day: 20110620
channel ORA_DISK_1: looking for autobackup on day: 20110619
channel ORA_DISK_1: looking for autobackup on day: 20110618
channel ORA_DISK_1: looking for autobackup on day: 20110617
channel ORA_DISK_1: looking for autobackup on day: 20110616
channel ORA_DISK_1: looking for autobackup on day: 20110615
channel ORA_DISK_1: no autobackup in 7 days found
RMAN-00571:
================================================== =========
RMAN-00569: =============== ERROR MESSAGESTACK FOLLOWS
===============
RMAN-00571:
================================================== =========
RMAN-03002: failure of restore command at 06/21/2011 12:50:28
RMAN-06172: no autobackup found or specified handle is not a valid
copy or piece

The RMAN backups are generating in //192.168.1.149/g$/XXXSRV4-ArcLogs/
MTDPROD/RMAN.
By instance, I see a lot of this kind of files:
- FULL_MTDPROD_20110529_386_1.BAK
- INCR_MTDPROD_20110621_480_7.BAK

And only see these two files:
- C-2169285856-20110527-03
- C-2169285856-20110527-04
It seems that this C-2169285856-.... files only were on 27/05/2011 and
then no more.

However, the FULL_... and INCR_.. files are generated every day.
The FULL is generated at the end of each month and INCR is generated
every day.

This is the backfull.sql:
run *{
* * * * allocate channel c1 type disk maxpiecesize=4G;
* * * * CROSSCHECK archivelog all;
* * * * backup
* * * * *incremental level 0
* * * * *format '\\192.168.1.149\g$\XXXSRV4-arclogs\MTDPROD\RMAN\FULL_
%d_%T_%s_%p.bak'
* * * * *filesperset 8
* * * * *database include current controlfile;
* * * * SQL 'alter system archive log current';
* * * * backup
* * * * *format '\\192.168.1.149\g$\XXXSRV4-arclogs\MTDPROD\RMAN\ARC_
%d_%T_%s_%p.bak'
* * * * *archivelog all delete all input;
* * * *}

This is the backincr.sql:

run *{
* * * * allocate channel c1 type disk maxpiecesize=4G;
* * * * CROSSCHECK archivelog all;
* * * * backup
* * * * *incremental level 1 cumulative
* * * * *format '\\192.168.1.149\g$\XXXSRV4-arclogs\MTDPROD\RMAN\INCR_
%d_%T_%s_%p.bak'
* * * * *filesperset 8
* * * * *database include current controlfile;
* * * * SQL 'alter system archive log current';
* * * * backup
* * * * * format '\\192.168.1.149\g$\XXXSRV4-arclogs\MTDPROD\RMAN\ARC_
%d_%T_%s_%p.bak'
* * * * * archivelog all delete all input;
* * * *}

If your existing server that this backup is based on is still running
I would create a copy of the spfile from that server and startup your
instance with a startup pfile= type thing.

You can always recreate the spfile from a pfile.

I follow all my rman backups with ( at least ) 2 commands ...

sqlplus based ...
create pfile='/somewhere/something_pfile_backup.ora' from spfile;

rman based ...
copy current controlfile to '/somewhere/something_ctrlfile_copy.ctl';

This gives you a file based copy of both the spfile and the control
file. *You probably want a copy of both of these after each backup.

Sounds like you need an new external consultant.

Look at the documentation for DUPLICATE DATABASE - there are tons of
real-world examples on how to restore your db.

Reply With Quote
  #4  
Old   
Big George
 
Posts: n/a

Default Re: Trying to restore RMAN backup in new server, got error RMAN-06172 - 06-22-2011 , 02:41 PM



Thank you John, I could mount my database in target server.
Now I'm facing another problem with RMAN backups, they don't get
recognized. I will open a new question for that.

Quote:
If your existing server that this backup is based on is still running
I would create a copy of the spfile from that server and startup your
instance with a startup pfile= type thing.

You can always recreate the spfile from a pfile.

I follow all my rman backups with ( at least ) 2 commands ...

sqlplus based ...
create pfile='/somewhere/something_pfile_backup.ora' from spfile;

rman based ...
copy current controlfile to '/somewhere/something_ctrlfile_copy.ctl';

This gives you a file based copy of both the spfile and the control
file. *You probably want a copy of both of these after each backup.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.