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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Seeking help with RMAN

Re: Seeking help with RMAN

From: David Barbour <david.barbour1_at_gmail.com>
Date: Mon, 2 Jul 2007 23:22:53 -0400
Message-ID: <69eafc3f0707022022l3c0dbf5dt65dfb220ee3cceb6@mail.gmail.com>


You mentioned the restore is set to occur to a point in time "some time after the backupsare completed." Evidently, some of the redo needed to bring the db to the point in time you've specified isn't contained in either the backup or in the logs copied over. It's still in either an unarchived redo log, or one that's been archived but not either backed up or transferred to your second server.

Depending on your bandwidth - how long it will take to send archive logs from the first server to the second - you could, say 10 minutes before the restore kicks off, run a script on the first server that will cycle through you redo logs (alter system switch logfile) then scp all the files with a number higher than what you've got on the second server over to the archive directory on the second server.

There are ways to accomplish this within your current duplicate script and ways to use RMAN to do it, but I'll leave the mechanics up to you. The fact is it appears you just don't have enough redo on server 2 to get to the point-in-time specified.

On 7/2/07, William Wagman <wjwagman_at_ucdavis.edu> wrote:
>
> Greetings,
>
> I am running Oracle 9.2.0.8.0 on Solaris 9. I am working on a set of
> scripts to automate cloning of my production database to a second
> server. The cloning is to give developers a playground. I have gotten
> part way through the process. RMAN backup pieces and archived redo logs
> are copied nightly to the second server and the restore script runs to a
> point and that is where I am stuck, I'm sure do to my lack of
> understanding of RMAN. On the second server the script I run to clone
> the database is called from a shell script and...
>
> connect target sys/pwd_at_pinnacle
> connect auxiliary sys/pwd_at_pinnacle_stage
> connect catalog rmanusr/pwd_at_cr04_rmancat
> run {
> # set until time = "to_date(to_char(sysdate, 'yyyymmdd') || ' 02:00',
> 'YYYYMMDD HH24:MI')";
> set until time "to_date('2007-06-28 00:10:00','YYYY-MM-DD:HH24:MI:SS')";
> configure auxname for datafile 1 to
> '/u02/oracle/pinnstag/o1_mf_system_zbclfwvx_.dbf';
> .
> .
> .
> configure auxname for datafile 10 to
> '/u02/oracle/pinnstag/o1_mf_data_ts_2nyz8qb8_.dbf';
> duplicate target database to 'pinnstag'
> pfile=/home/oracle/920/dbs/initpinnstag.ora
> logfile
> '/u02/oracle/pinnstag/o1_mf_1_zbcl9op4_.log' SIZE 250M,
> '/u02/oracle/pinnstag/o1_mf_2_zbclbjcc_.log' SIZE 250M,
> '/u02/oracle/pinnstag/o1_mf_3_zbclccfn_.log' SIZE 250M,
> '/u02/oracle/pinnstag/o1_mf_4_zbcld65j_.log' SIZE 250M,
> '/u02/oracle/pinnstag/o1_mf_5_zbclf0lc_.log' SIZE 250M;
> }
> Exit
>
> The time in the set until time is some point after the backups are
> completed. The log looks like this...
>
> printing stored script: Memory Script
> {
> set until time "to_date('2007-06-28
> 00:10:00','YYYY-MM-DD:HH24:MI:SS')";
> recover
> clone database
> delete archivelog
> ;
> }
> executing script: Memory Script
>
> executing command: SET until clause
>
> Starting recover at 2007-06-28:11:43:51
> using channel ORA_AUX_DISK_1
>
> starting media recovery
>
> archive log thread 1 sequence 7715 is already on disk as file
> /u02/ora_bkp/pinnacle/arch0000007715.arc
> archive log thread 1 sequence 7716 is already on disk as file
> /u02/ora_bkp/pinnacle/arch0000007716.arc
> Oracle Error:
> ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error
> below
> ORA-01194: file 4 needs more recovery to be consistent
> ORA-01110: data file 4:
> '/u02/oracle/pinnstag/o1_mf_indexes_zbcm8zx4_.dbf'
>
> RMAN-00571: ===========================================================
> RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
> RMAN-00571: ===========================================================
> RMAN-03002: failure of Duplicate Db command at 06/28/2007 11:43:52
> RMAN-03015: error occurred in stored script Memory Script
> RMAN-06053: unable to perform media recovery because of missing log
> RMAN-06025: no backup of log thread 1 seq 7717 scn 3110146550330 found
> to restore
>
> I can do this...
>
> SQL> recover database using backup controlfile until cancel;
> ORA-00279: change 3110146012833 generated at 06/27/2007 22:00:06 needed
> for
> thread 1
> ORA-00289: suggestion : /u02/ora_bkp/pinnacle/arch0000007715.arc
> ORA-00280: change 3110146012833 for thread 1 is in sequence #7715
>
>
> Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
> cancel
> Media recovery cancelled.
> SQL> alter database open resetlogs;
>
> Database altered.
>
> I am puzzled as to what I must do to get this to work without manual
> intervention. I'd appreciate any suggestions.
>
> Thanks.
>
> Bill Wagman
> Univ. of California at Davis
> IET Campus Data Center
> wjwagman_at_ucdavis.edu
> (530) 754-6208
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Jul 02 2007 - 22:22:53 CDT

Original text of this message

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