Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RMAN - creating a copy of a database from hot backup

RMAN - creating a copy of a database from hot backup

From: Schauss, Peter <peter.schauss_at_ngc.com>
Date: Thu, 10 May 2007 15:59:04 -0400
Message-ID: <6591F529444E9748A546718B3D1A67010701A4E5@xcgv2605.northgrum.com>


Environment: Oracle 8.1.7.4 on Solaris 5.8

I am trying to create a copy of a database from an rman hot backup running in nocatalog mode, following the example in the Duplcate command section of the Oracle "Recovery Manager Users Guide and Reference".

Here is my script:



#!/bin/ksh
#
# Create a new database from an rman backup.
#
# Parameters:
# old database sid
# userid
# password
# new database sid
#
#

export ORACLE_SID=$4
export NLS_DATE_FORMAT='DD-MON-YYYY hh24:mi:ss' export NLS_LANG='american_america.WE8MSWIN1252' rman target $2/$3@$1 nocatalog <<EOF
connect auxiliary sys/sys_$4
run{
set until time='10-MAY-2007 15:45:00';
allocate auxiliary channel ch1 type disk;
allocate auxiliary channel ch2 type disk;
allocate auxiliary channel ch3 type disk;
allocate auxiliary channel ch4 type disk;
allocate auxiliary channel ch5 type disk;
allocate auxiliary channel ch6 type disk;
set newname for datafile 1 to '/mnt1/oradata/psnew/system01.dbf';
set newname for datafile 2 to '/mnt2/oradata/psnew/tools01.dbf';
set newname for datafile 3 to '/mnt1/oradata/psnew/rbs01.dbf';
set newname for datafile 4 to '/mnt2/oradata/psnew/temp01.dbf';
set newname for datafile 5 to '/mnt3/oradata/psnew/users01.dbf'; set newname for datafile 6 to '/mnt3/oradata/psnew/indx01.dbf'; duplicate target database to psnew

        logfile '/mnt1/oradata/psnew/redo01.log' SIZE 500K,     '/mnt2/oradata/psnew/redo02.log' SIZE 500K,     '/mnt3/oradata/psnew/redo03.log' SIZE 500K; }
exit
EOF



==

At the end of the script it give me the sequence of messages shown below. My last archive log file was arch_1_181 so I would not expect the script to find 182. I tried to connec from sqlplus as system and got the message "initialization in progress" so I connected " / as sysdba" and issued "alter database open resetlogs;".

Did I do this correctly?

Thanks,
Peter Schauss



===
RMAN-08054: starting media recovery

RMAN-03022: compiling command: recover(4) RMAN-06050: archivelog thread 1 sequence 181 is already on disk as file /arch/pstest/arch_1_181.arc
RMAN-03023: executing command: recover(4) RMAN-08515: archivelog filename=/arch/pstest/arch_1_181.arc thread=1 sequence=181

RMAN-08060: unable to find archivelog
RMAN-08510: archivelog thread=1 sequence=182
RMAN-03026: error recovery releasing channel resources
--
http://www.freelists.org/webpage/oracle-l
Received on Thu May 10 2007 - 14:59:04 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US