Home » RDBMS Server » Backup & Recovery » Online Backup to tape using RMAN gets hung
Online Backup to tape using RMAN gets hung [message #73157] Sat, 21 February 2004 19:24 Go to next message
A Prasad Rao
Messages: 1
Registered: February 2004
Junior Member
After installation of LSM software on Tru64Unix 5.1a as per the documentation aND LINKING LIBRARIES, we have started oracle instance, mounted and opened database.

Also we enetered environment variable ORACLE_SID=tcl

Then we ran backup to disk using RMAN and was successfully completed.

 

 rman command to backup one datafile to tape, the command as follwows:

rman target / catalog rman/rman@prod debug trace=/oracle/log

rman>run { allocate channel sbt type 'sbt_tape';

backup datafile 1;

}

But when we executed the above command, series of message appears and then hang. Nothing further proceeded. I have inserted new tape into teh tape drive, but still not solved.It seems there is no communication establish between RMAN and TAPEdrive.

I have pasted log message below for your information.

Can any one tell me the solution how to resolve the problem.

Shall be extremely grateful if you could help us to resolve the problem .

We are using Oracle 8.1.7.0 and O.S.. is Tru64Unix 5.1A on Compaq ES45 Server.

Thanks and full regards

A Prasad Rao

aprao@tatachemicals.com

LOg Message

=========

Recovery Manager: Release 8.1.7.0.0 - Production

EXEC SQL AT TARGET select DECODE(status,'OPEN',1,0) into :b1  from V$INSTANCE
   sqlcode=0
      :b1 = 1

EXEC SQL AT TARGET begin :vsn_min := dbms_backup_restore . protocol_version_number_min ; :rel_min := dbms_backup_restore . protocol_release_number_min ; :upd_min := dbms_backup_restore . protocol_update_number_min ; :vsn_max := dbms_backup_restore . protocol_version_number_max ; :rel_max := dbms_backup_restore . protocol_release_number_max ; :upd_max := dbms_backup_restore . protocol_update_number_max ; end ;
   sqlcode=0
      :b1 = 8
      :b2 = 0
      :b3 = 4
      :b4 = 8
      :b5 = 1
      :b6 = 6

EXEC SQL AT TARGET declare vsn varchar2 ( 20 ) ; begin vsn := dbms_rcvman . getPackageVersion ; :pkg_vsn:pkg_vsn_i := vsn ; if vsn is not null then :pkg_vsnub4 := to_number ( substr ( vsn , 1 , 2 ) || substr ( vsn , 4 , 2 ) || substr ( vsn , 7 , 2 ) ) ; end if ; end ;
   sqlcode=0
      :b1 = "08.00.04"
      :b2 = 80004

EXEC SQL AT TARGET declare vsn varchar2 ( 20 ) ; begin vsn := dbms_rcvman . getPackageVersion ; :pkg_vsn:pkg_vsn_i := vsn ; if vsn is not null then :pkg_vsnub4 := to_number ( substr ( vsn , 1 , 2 ) || substr ( vsn , 4 , 2 ) || substr ( vsn , 7 , 2 ) ) ; end if ; end ;
   sqlcode=0
      :b1 = "08.00.05"
      :b2 = 80005

EXEC SQL AT TARGET declare vsn varchar2 ( 20 ) ; begin vsn := dbms_rcvman . getPackageVersion ; :pkg_vsn:pkg_vsn_i := vsn ; if vsn is not null then :pkg_vsnub4 := to_number ( substr ( vsn , 1 , 2 ) || substr ( vsn , 4 , 2 ) || substr ( vsn , 7 , 2 ) ) ; end if ; end ;
   sqlcode=0
      :b1 = "08.01.03"
      :b2 = 80103

EXEC SQL AT TARGET declare vsn varchar2 ( 20 ) ; begin vsn := dbms_rcvman . getPackageVersion ; :pkg_vsn:pkg_vsn_i := vsn ; if vsn is not null then :pkg_vsnub4 := to_number ( substr ( vsn , 1 , 2 ) || substr ( vsn , 4 , 2 ) || substr ( vsn , 7 , 2 ) ) ; end if ; end ;
   sqlcode=0
      :b1 = "08.01.05"
      :b2 = 80105

EXEC SQL AT TARGET declare vsn varchar2 ( 20 ) ; begin vsn := dbms_rcvman . getPackageVersion ; :pkg_vsn:pkg_vsn_i := vsn ; if vsn is not null then :pkg_vsnub4 := to_number ( substr ( vsn , 1 , 2 ) || substr ( vsn , 4 , 2 ) || substr ( vsn , 7 , 2 ) ) ; end if ; end ;
   sqlcode=0
      :b1 = "08.01.06"
      :b2 = 80106

EXEC SQL AT TARGET declare vsn varchar2 ( 20 ) ; begin vsn := dbms_rcvman . getPackageVersion ; :pkg_vsn:pkg_vsn_i := vsn ; if vsn is not null then :pkg_vsnub4 := to_number ( substr ( vsn , 1 , 2 ) || substr ( vsn , 4 , 2 ) || substr ( vsn , 7 , 2 ) ) ; end if ; end ;
   sqlcode=0
      :b1 = "08.01.07"
      :b2 = 80107

EXEC SQL AT TARGET declare vsn varchar2 ( 20 ) ; begin vsn := dbms_rcvman . getPackageVersion ; :pkg_vsn:pkg_vsn_i := vsn ; if vsn is not null then :pkg_vsnub4 := to_number ( substr ( vsn , 1 , 2 ) || substr ( vsn , 4 , 2 ) || substr ( vsn , 7 , 2 ) ) ; end if ; end ;
   sqlcode=0
      :b1 = NULL
      :b2 = 80107

EXEC SQL AT TARGET begin dbms_output . enable ( 500000 ) ; dbms_rcvman . setDebugOn ; end ;
   sqlcode=0

EXEC SQL AT TARGET select name ,resetlogs_time ,resetlogs_change# ,dbid ,rpad(name,8,'x') into :b1:b2,:b3,:b4,:b5:b6,:b7  from v$database
   sqlcode=0
      :b1 = "TCL"
      :b2 = "11-DEC-02"
      :b3 = 112718748
      :b4 = 4202879242
      :b5 = "TCLxxxxx"

EXEC SQL AT TARGET select decode(value,'TRUE',1,0) into :b1  from v$option where parameter='Parallel backup and recovery'
   sqlcode=0
      :b1 = 1

EXEC SQL AT TARGET select decode(value,'TRUE',1,0) into :b1  from v$option where parameter='Incremental backup and recovery'
   sqlcode=0
      :b1 = 1

EXEC SQL AT TARGET select decode(value,'TRUE',1,0) into :b1  from v$option where parameter='Duplexed backups'
   sqlcode=0
      :b1 = 1
RMAN-06005: connected to target database: TCL (DBID=4202879242)
RMAN-06008: connected to recovery catalog database
krmqopen: opening new channel context for channel default
krmxpos: xc=5371934920, sid=27
krmxcc: xc=5371934920, connstr=system/manager

EXEC SQL AT RCVCAT select max(version) into :b1:b2  from rcver
   sqlcode=0
      :b1 = "08.01.06"

EXEC SQL AT RCVCAT declare vsn varchar2 ( 20 ) ; begin vsn := dbms_rcvcat . getPackageVersion ; :pkg_vsn:pkg_vsn_i := vsn ; if vsn is not null then :pkg_vsnub4 := to_number ( substr ( vsn , 1 , 2 ) || substr ( vsn , 4 , 2 ) || substr ( vsn , 7 , 2 ) ) ; end if ; end ;
   sqlcode=0
      :b1 = "08.00.04"
      :b2 = 80004

EXEC SQL AT RCVCAT declare vsn varchar2 ( 20 ) ; begin vsn := dbms_rcvcat . getPackageVersion ; :pkg_vsn:pkg_vsn_i := vsn ; if vsn is not null then :pkg_vsnub4 := to_number ( substr ( vsn , 1 , 2 ) || substr ( vsn , 4 , 2 ) || substr ( vsn , 7 , 2 ) ) ; end if ; end ;
   sqlcode=0
      :b1 = "08.00.05"
      :b2 = 80005

EXEC SQL AT RCVCAT declare vsn varchar2 ( 20 ) ; begin vsn := dbms_rcvcat . getPackageVersion ; :pkg_vsn:pkg_vsn_i := vsn ; if vsn is not null then :pkg_vsnub4 := to_number ( substr ( vsn , 1 , 2 ) || substr ( vsn , 4 , 2 ) || substr ( vsn , 7 , 2 ) ) ; end if ; end ;
   sqlcode=0
      :b1 = "08.01.03"
      :b2 = 80103

EXEC SQL AT RCVCAT declare vsn varchar2 ( 20 ) ; begin vsn := dbms_rcvcat . getPackageVersion ; :pkg_vsn:pkg_vsn_i := vsn ; if vsn is not null then :pkg_vsnub4 := to_number ( substr ( vsn , 1 , 2 ) || substr ( vsn , 4 , 2 ) || substr ( vsn , 7 , 2 ) ) ; end if ; end ;
   sqlcode=0
      :b1 = "08.01.06"
      :b2 = 80106

EXEC SQL AT RCVCAT declare vsn varchar2 ( 20 ) ; begin vsn := dbms_rcvcat . getPackageVersion ; :pkg_vsn:pkg_vsn_i := vsn ; if vsn is not null then :pkg_vsnub4 := to_number ( substr ( vsn , 1 , 2 ) || substr ( vsn , 4 , 2 ) || substr ( vsn , 7 , 2 ) ) ; end if ; end ;
   sqlcode=0
      :b1 = "08.01.07"
      :b2 = 80107

EXEC SQL AT RCVCAT declare vsn varchar2 ( 20 ) ; begin vsn := dbms_rcvcat . getPackageVersion ; :pkg_vsn:pkg_vsn_i := vsn ; if vsn is not null then :pkg_vsnub4 := to_number ( substr ( vsn , 1 , 2 ) || substr ( vsn , 4 , 2 ) || substr ( vsn , 7 , 2 ) ) ; end if ; end ;
   sqlcode=0
      :b1 = NULL
      :b2 = 80107

EXEC SQL AT RCVCAT declare vsn varchar2 ( 20 ) ; begin vsn := dbms_rcvman . getPackageVersion ; :pkg_vsn:pkg_vsn_i := vsn ; if vsn is not null then :pkg_vsnub4 := to_number ( substr ( vsn , 1 , 2 ) || substr ( vsn , 4 , 2 ) || substr ( vsn , 7 , 2 ) ) ; end if ; end ;
   sqlcode=0
      :b1 = "08.00.04"
      :b2 = 80004

EXEC SQL AT RCVCAT declare vsn varchar2 ( 20 ) ; begin vsn := dbms_rcvman . getPackageVersion ; :pkg_vsn:pkg_vsn_i := vsn ; if vsn is not null then :pkg_vsnub4 := to_number ( substr ( vsn , 1 , 2 ) || substr ( vsn , 4 , 2 ) || substr ( vsn , 7 , 2 ) ) ; end if ; end ;
   sqlcode=0
      :b1 = "08.00.05"
      :b2 = 80005

EXEC SQL AT RCVCAT declare vsn varchar2 ( 20 ) ; begin vsn := dbms_rcvman . getPackageVersion ; :pkg_vsn:pkg_vsn_i := vsn ; if vsn is not null then :pkg_vsnub4 := to_number ( substr ( vsn , 1 , 2 ) || substr ( vsn , 4 , 2 ) || substr ( vsn , 7 , 2 ) ) ; end if ; end ;
   sqlcode=0
      :b1 = "08.01.03"
      :b2 = 80103

EXEC SQL AT RCVCAT declare vsn varchar2 ( 20 ) ; begin vsn := dbms_rcvman . getPackageVersion ; :pkg_vsn:pkg_vsn_i := vsn ; if vsn is not null then :pkg_vsnub4 := to_number ( substr ( vsn , 1 , 2 ) || substr ( vsn , 4 , 2 ) || substr ( vsn , 7 , 2 ) ) ; end if ; end ;
   sqlcode=0
      :b1 = "08.01.05"
      :b2 = 80105

EXEC SQL AT RCVCAT declare vsn varchar2 ( 20 ) ; begin vsn := dbms_rcvman . getPackageVersion ; :pkg_vsn:pkg_vsn_i := vsn ; if vsn is not null then :pkg_vsnub4 := to_number ( substr ( vsn , 1 , 2 ) || substr ( vsn , 4 , 2 ) || substr ( vsn , 7 , 2 ) ) ; end if ; end ;
   sqlcode=0
      :b1 = "08.01.06"
      :b2 = 80106

EXEC SQL AT RCVCAT declare vsn varchar2 ( 20 ) ; begin vsn := dbms_rcvman . getPackageVersion ; :pkg_vsn:pkg_vsn_i := vsn ; if vsn is not null then :pkg_vsnub4 := to_number ( substr ( vsn , 1 , 2 ) || substr ( vsn , 4 , 2 ) || substr ( vsn , 7 , 2 ) ) ; end if ; end ;
   sqlcode=0
      :b1 = "08.01.07"
      :b2 = 80107

EXEC SQL AT RCVCAT declare vsn varchar2 ( 20 ) ; begin vsn := dbms_rcvman . getPackageVersion ; :pkg_vsn:pkg_vsn_i := vsn ; if vsn is not null then :pkg_vsnub4 := to_number ( substr ( vsn , 1 , 2 ) || substr ( vsn , 4 , 2 ) || substr ( vsn , 7 , 2 ) ) ; end if ; end ;
   sqlcode=0
      :b1 = NULL
      :b2 = 80107

EXEC SQL AT RCVCAT begin dbms_output . enable ( 500000 ) ; dbms_rcvman . setDebugOn ; end ;
   sqlcode=0

EXEC SQL AT RCVCAT select user into :b1  from dual
   sqlcode=0
      :b1 = "RMAN"

RMAN> 2> 3> 4>
Node # 1

run
    1 JCL
          1 allocate
                1 CHID = sbt
                2 CHTYPE = sbt_tape
          2 backup
                1 BSLIST
                      1 BSPEC
                            1 DFILE
                                  1 DFNO = 1

RMAN-03022: compiling command: allocate

EXEC SQL AT RCVCAT yProxy := dbms_rcvman . getAnyProxy ; :getCfBackup := dbms_rcvman . getCfBackup ; :listCfCopy := dbms_rcvman . listCfCopy ; :listDfCopy := dbms_rcvman . listDfCopy ; :listCfBackup := dbms_rcvman . listCfBackup ; :listDfBackup := dbms_rcvman . listDfBackup ; :listAlBackup := dbms_rcvman . listAlBackup ; :listDfProxy := dbms_rcvman . listDfProxy ; :getRecovAction := dbms_rcvman . getRecovAction ; :getAlBackup := dbms_rcvman . getAlBackup ; :listAlCopy := dbms_rcvman . listAlCopy ; end ;
   sqlcode=0
      :b1 = 0
      :b2 = 2
      :b3 = 1
      :b4 = 3
      :b5 = 4
      :b6 = 1
      :b7 = 2
      :b8 = 4
      :b9 = 8
      :b10 = 16
      :b11 = 1
      :b12 = 2
      :b13 = 4
      :b14 = 8
      :b15 = 1
      :b16 = 2
      :b17 = 4
      :b18 = 8
      :b19 = 32
      :b20 = 16
      :b21 = 0
      :b22 = 1
      :b23 = 2
      :b24 = 3
      :b25 = 4
      :b26 = 5
      :b27 = 6
      :b28 = 7
      :b29 = 8
      :b30 = 9
      :b31 = 10
      :b32 = 11
      :b33 = 12
>> ENTERING setRAflags
>> setRAflags kindMask=255 containerMask=15 actionMask=63
>>  ENTERING setComputeRecoveryActionMasks816
>>   ENTERING setComputeRecoveryActionMasks
>>   EXITING setComputeRecoveryActionMasks
>>  EXITING setComputeRecoveryActionMasks816
>> EXITING setRAflags
krmknmtr:  the parse tree after name translation is:
    1 allocate
          1 CHID = sbt
          2 CHTYPE = SBT_TAPE

EXEC SQL AT TARGET select DECODE(status,'OPEN',1,0) into :b1  from V$INSTANCE
   sqlcode=0
      :b1 = 1
krmicomp: the compiled command tree is:
    1 CMD type=allocate id=1 status=NOT STARTED
          1 STEP id=1 status=NOT STARTED chid=sbt
                1 TEXTNOD = -- devalloc
                2 TEXTNOD = declare
                3 TEXTNOD =   devtype varchar2(255);
                4 TEXTNOD =   chid    varchar2(255);
                5 TEXTNOD =   debug   number := null;
                6 TEXTNOD =   options number := null;
                7 TEXTNOD =   node    varchar2(255);
                8 TEXTNOD =   maxsize binary_integer;
                9 TEXTNOD =   vendor  varchar2(256);
               10 TEXTNOD = begin
               11 TEXTNOD =  
               12 PRMVAL =  options := 5; chid := 'sbt';
               13 TEXTNOD =   if debug is not null then
               14 TEXTNOD =     krmicd.execSql(
               15 TEXTNOD =            'alter session set events ''immediate trace name krb_trace level '
               16 TEXTNOD =            ||debug||'''');
               17 TEXTNOD =   end if;
               18 TEXTNOD =   if options is not null then
               19 TEXTNOD =     krmicd.execSql(
               20 TEXTNOD =            'alter session set events ''immediate trace name krb_options level '
               21 TEXTNOD =            ||options||'''');
               22 TEXTNOD =   end if;
               23 TEXTNOD =   devtype := sys.dbms_backup_restore.deviceAllocate( ident => chid,
               24 TEXTNOD =      node => node,
               25 PRMVAL = type=>'SBT_TAPE',dupcnt=>1
               26 TEXTNOD =  );
               27 TEXTNOD =   maxsize := sys.dbms_backup_restore.deviceQuery
               28 TEXTNOD =     (sys.dbms_backup_restore.DEVICEQUERY_MAXSIZE);
               29 TEXTNOD =   if maxsize > 0 then
               30 TEXTNOD =      sys.dbms_backup_restore.setlimit
               31 TEXTNOD =        (sys.dbms_backup_restore.kbytes, maxsize);
               32 TEXTNOD =   end if;
               33 TEXTNOD =   krmicd.setChannelInfo
               34 TEXTNOD =     (devtype,
               35 TEXTNOD =      node,
               36 TEXTNOD =      maxsize,
               37 TEXTNOD =      sys.dbms_backup_restore.deviceQuery
               38 TEXTNOD =        (sys.dbms_backup_restore.DEVICEQUERY_PROXY),
               39 TEXTNOD =      sys.dbms_backup_restore.deviceQuery
               40 TEXTNOD =        (sys.dbms_backup_restore.DEVICEQUERY_MAXPROXY));
               41 TEXTNOD =   krmicd.writeMsg(8030, chid);
               42 TEXTNOD =   krmicd.writeMsg(8500, chid, to_char(krmicd.getSid), devtype);
               43 TEXTNOD =   vendor := sys.dbms_backup_restore.deviceQuery
               44 TEXTNOD =     (sys.dbms_backup_restore.DEVICEQUERY_VENDOR);
               45 TEXTNOD =   if vendor is not null then
               46 TEXTNOD =      krmicd.writemsg(8526, chid, vendor);
               47 TEXTNOD =   end if;
               48 TEXTNOD = end;
RMAN-03023: executing command: allocate
krmxpoq: xc=5371934920, action="0000001 FINISHED", col_l=16, ind=0, sid=27
krmqgns: looking for work for channel default
krmqgns: commands remaining to be executed:
CMD type=allocate id=1 status=NOT STARTED
          1 STEP id=1 status=NOT STARTED chid=sbt
krmqopen: opening new channel context for channel sbt
krmxpos: xc=5371944896, sid=30
krmxcc: xc=5371944896, connstr=system/manager
krmqgns: no work found for channel default

krmqgns: looking for work for channel sbt
krmqgns: commands remaining to be executed:
CMD type=allocate id=1 status=NOT STARTED
          1 STEP id=1 status=NOT STARTED chid=sbt
krmqgns: channel sbt assigned step 1

krmxcis: xc=5371944896 chid=sbt calling pcicmp
krmxr: xc=5371944896 chid=sbt calling peicnt
krmxrpc: xc=5371944896 kpurpc2 rc=0 db=target proc=DBMS_BACKUP_RESTORE.DEVICEALLOCATE
krmxrpc: xc=5371944896 RPC #1 completed immediately
krmxrpc: xc=5371944896 kpurpc2 rc=0 db=target proc=DBMS_BACKUP_RESTORE.DEVICEQUERY
krmxrpc: xc=5371944896 RPC #2 completed immediately
krmxrpc: xc=5371944896 kpurpc2 rc=0 db=target proc=DBMS_BACKUP_RESTORE.DEVICEQUERY
krmxrpc: xc=5371944896 RPC #3 completed immediately
krmxrpc: xc=5371944896 kpurpc2 rc=0 db=target proc=DBMS_BACKUP_RESTORE.DEVICEQUERY
krmxrpc: xc=5371944896 RPC #4 completed immediately
RMAN-08030: allocated channel: sbt
RMAN-08500: channel sbt: sid=30 devtype=SBT_TAPE
krmxrpc: xc=5371944896 kpurpc2 rc=0 db=target proc=DBMS_BACKUP_RESTORE.DEVICEQUERY
krmxrpc: xc=5371944896 RPC #5 completed immediately
RMAN-08526: channel sbt: MMS Version 2.2.0.1
krmxr: xc=5371944896 finished step
krmqgns: looking for work for channel default
krmqgns: commands remaining to be executed:
CMD type=allocate id=1 status=STARTED
          1 STEP id=1 status=FINISHED chid=sbt
krmqgns: no work found for channel default

krmqgns: channel sbt finished step 1
krmqgns: looking for work for channel sbt
krmqgns: commands remaining to be executed:
krmqgns: no work found for channel sbt

krmqgns: looking for work for channel default
krmqgns: commands remaining to be executed:
krmqgns: no work found for channel default

krmqgns: looking for work for channel sbt
krmqgns: commands remaining to be executed:
krmqgns: no work found for channel sbt

RMAN-03022: compiling command: backup

EXEC SQL AT TARGET select DECODE(status,'OPEN',1,0) into :b1  from V$INSTANCE
   sqlcode=0
      :b1 = 1

EXEC SQL AT TARGET select controlfile_type ,controlfile_change# ,controlfile_sequence# ,controlfile_created ,decode(offr.records_used,0,0,((offr.last_recid-offr.records_used)+1)) into :b1,:b2,:b3,:b4,:b5  from v$database ,v$controlfile_record_section offr where offr.type='OFFLINE RANGE'
   sqlcode=0
      :b1 = "CURRENT"
      :b2 = 166293885
      :b3 = 534664
      :b4 = "11-DEC-02"
      :b5 = 0

EXEC SQL AT TARGET select db.version_time ,db.controlfile_change# ,db.controlfile_sequence# ,df.last_recid ,rl.last_recid ,dc.last_recid ,al.last_recid ,bp.last_recid ,do.last_recid ,offr.last_recid into :b1,:b2,:b3,:b4,:b5,:b6,:b7,:b8,:b9,:b10  from v$database db ,v$controlfile_record_section df ,v$controlfile_record_section rl ,v$controlfile_record_section dc ,v$controlfile_record_section al ,v$controlfile_record_section bp ,v$controlfile_record_section do ,v$controlfile_record_section offr where ((((((df.type='DATAFILE' and rl.type='REDO LOG') and dc.type='DATAFILE COPY') and al.type='ARCHIVED LOG') and bp.type='BACKUP PIECE') and do.type='DELETED OBJECT') and offr.type='OFFLINE RANGE')
   sqlcode=0
      :b1 = "11-DEC-02"
      :b2 = 166293885
      :b3 = 534664
      :b4 = 28
      :b5 = 4
      :b6 = 26
      :b7 = 10032
      :b8 = 4
      :b9 = 0
      :b10 = 0

EXEC SQL AT TARGET select name ,resetlogs_time ,resetlogs_change# ,dbid ,rpad(name,8,'x') into :b1:b2,:b3,:b4,:b5:b6,:b7  from v$database
   sqlcode=0
      :b1 = "TCL"
      :b2 = "11-DEC-02"
      :b3 = 112718748
      :b4 = 4202879242
      :b5 = "TCLxxxxx"

EXEC SQL AT TARGET select decode(value,'TRUE',1,0) into :b1  from v$option where parameter='Parallel backup and recovery'
   sqlcode=0
      :b1 = 1

EXEC SQL AT TARGET select decode(value,'TRUE',1,0) into :b1  from v$option where parameter='Incremental backup and recovery'
   sqlcode=0
      :b1 = 1

EXEC SQL AT TARGET select decode(value,'TRUE',1,0) into :b1  from v$option where parameter='Duplexed backups'
   sqlcode=0
      :b1 = 1

EXEC SQL AT RCVCAT begin dbms_rcvman . setDatabase ( upper ( :dbname:dbname_i ) , :rlscn , :rltime , :fhdbi:fhdbi_i ) ; end ;
   sqlcode=0
      :b1 = "TCL"
      :b2 = 112718748
      :b3 = "11-DEC-02"
      :b4 = 4202879242
>> ENTERING setDatabase
>> setDatabase: db_id=4202879242
>> EXITING setDatabase

EXEC SQL AT RCVCAT begin dbms_rcvcat . setDatabase ( upper ( :dbname:dbname_i ) , :rlscn , :rltime , :fhdbi:fhdbi_i ) ; end ;
   sqlcode=0
      :b1 = "TCL"
      :b2 = 112718748
      :b3 = "11-DEC-02"
      :b4 = 4202879242

EXEC SQL AT RCVCAT begin :resync := dbms_rcvcat . ckptNeeded ( :cfscn , :cfseq , :vertime , :cftype , :dfhwm , :rlhwm , :dchwm , :alhwm , :bphwm , :dohwm , :offrhwm ) ; end ;
   sqlcode=0
      :b1 = 2
      :b2 = 166293885
      :b3 = 534664
      :b4 = "11-DEC-02"
      :b5 = 1
      :b6 = 28
      :b7 = 4
      :b8 = 26
      :b9 = 10032
      :b10 = 4
      :b11 = 0
      :b12 = 0
RMAN-03025: performing implicit partial resync of recovery catalog

EXEC SQL AT RCVCAT yProxy := dbms_rcvman . getAnyProxy ; :getCfBackup := dbms_rcvman . getCfBackup ; :listCfCopy := dbms_rcvman . listCfCopy ; :listDfCopy := dbms_rcvman . listDfCopy ; :listCfBackup := dbms_rcvman . listCfBackup ; :listDfBackup := dbms_rcvman . listDfBackup ; :listAlBackup := dbms_rcvman . listAlBackup ; :listDfProxy := dbms_rcvman . listDfProxy ; :getRecovAction := dbms_rcvman . getRecovAction ; :getAlBackup := dbms_rcvman . getAlBackup ; :listAlCopy := dbms_rcvman . listAlCopy ; end ;
   sqlcode=0
      :b1 = 0
      :b2 = 2
      :b3 = 1
      :b4 = 3
      :b5 = 4
      :b6 = 1
      :b7 = 2
      :b8 = 4
      :b9 = 8
      :b10 = 16
      :b11 = 1
      :b12 = 2
      :b13 = 4
      :b14 = 8
      :b15 = 1
      :b16 = 2
      :b17 = 4
      :b18 = 8
      :b19 = 32
      :b20 = 16
      :b21 = 0
      :b22 = 1
      :b23 = 2
      :b24 = 3
      :b25 = 4
      :b26 = 5
      :b27 = 6
      :b28 = 7
      :b29 = 8
      :b30 = 9
      :b31 = 10
      :b32 = 11
      :b33 = 12
>> ENTERING setRAflags
>> setRAflags kindMask=255 containerMask=15 actionMask=63
>>  ENTERING setComputeRecoveryActionMasks816
>>   ENTERING setComputeRecoveryActionMasks
>>   EXITING setComputeRecoveryActionMasks
>>  EXITING setComputeRecoveryActionMasks816
>> EXITING setRAflags
krmknmtr:  the parse tree after name translation is:
    1 partial resync
          1 NIL
krmkdps: this_db_key=1
krmkdps: this_dbinc_key=2
krmkdps: this_reset_scn=112718748
krmkdps: this_reset_time=11-DEC-02
krmkdps: untilSCN=
krmkdps: untilTime=
krmkdps: getRA_completedAfter=
krmkdps: getRA_completedBefore=
krmkdps: getRA_likePattern=
krmkdps: getRA_containerMask=15
krmkdps: getRA_actionMask=63
krmkdps: computeRA_allRecords=0
krmkdps: allIncarnations=0

EXEC SQL AT TARGET select DECODE(status,'OPEN',1,0) into :b1  from V$INSTANCE
   sqlcode=0
      :b1 = 1
krmicomp: the compiled command tree is:
    1 CMD type=partial resync id=1 status=NOT STARTED
          1 STEP id=1 status=NOT STARTED chid=default
                1 TEXTNOD = -- resync
                2 TEXTNOD = declare
                3 TEXTNOD =   mount_status varchar2(7);
                4 TEXTNOD =   cf_type      varchar2(7);
                5 TEXTNOD =   db_id       number;
                6 TEXTNOD =   db_name     varchar2(8);
                7 TEXTNOD =   reset_scn   number;
                8 TEXTNOD =   reset_time  date;
                9 TEXTNOD =   snapcf      varchar2(512);            -- snapshot controlfile name
               10 TEXTNOD =   name        varchar2(512);            -- default snapshot cf name
               11 TEXTNOD =   cfname      varchar2(512) := NULL;    -- backup cf name
               12 TEXTNOD =   ckp_scn     number;
               13 TEXTNOD =   ckp_time    date;
               14 TEXTNOD =   ckp_cf_seq  number;
               15 TEXTNOD =   cf_create_time date;
               16 TEXTNOD =   getckptscn  number;
               17 TEXTNOD =   cf_version  date;                     -- v$database.version_time
               18 TEXTNOD =   kccdivts    number;   -- date2stamp(cf_version)
               19 TEXTNOD =   recid number;
               20 TEXTNOD =   high_cp_recid number; -- 1
               21 TEXTNOD =   high_rt_recid number; -- 2
               22 TEXTNOD =   high_le_recid number; -- 3
               23 TEXTNOD =   high_fe_recid number; -- 4
               24 TEXTNOD =   high_fn_recid number; -- 5
               25 TEXTNOD =   high_ts_recid number; -- 6
               26 TEXTNOD =   high_r1_recid number; -- 7
               27 TEXTNOD =   high_r2_recid number; -- 8
               28 TEXTNOD =   high_lh_recid number; -- 9
               29 TEXTNOD =   high_or_recid number; -- 10
               30 TEXTNOD =   high_al_recid number; -- 11
               31 TEXTNOD =   high_bs_recid number; -- 12
               32 TEXTNOD =   high_bp_recid number; -- 13
               33 TEXTNOD =   high_bf_recid number; -- 14
               34 TEXTNOD =   high_bl_recid number; -- 15
               35 TEXTNOD =   high_dc_recid number; -- 16
               36 TEXTNOD =   high_fc_recid number; -- 17
               37 TEXTNOD =   high_cc_recid number; -- 18
               38 TEXTNOD =   high_dl_recid number; -- 19
               39 TEXTNOD =   high_pc_recid number; -- 20
               40 TEXTNOD =   high_r4_recid number; -- 21
               41 TEXTNOD =   full_resync boolean;    -- set by rman compiler
               42 TEXTNOD =   implicit    boolean;    -- set by rman compiler
               43 TEXTNOD =   debug_resync boolean;
               44 TEXTNOD =   read_retries number := 0;             -- retry counter for inconsistant_read
               45 TEXTNOD =   busy_retries number := 0;             -- retry counter for ss enqueue busy
               46 TEXTNOD =   sort_retries number := 0;             -- retry counter for sort_area_size
               47 TEXTNOD =   rbs_count    number := NULL;
               48 TEXTNOD =   b            boolean;
               49 TEXTNOD =   read_only    number;
               50 TEXTNOD =   sort_area_size   number;    -- sort_area_size from v$parameter
               51 TEXTNOD =   rec_size         number;    -- record_size from v$controlfile_record_section
               52 TEXTNOD =   total_recs       number;
               53 TEXTNOD =   rec_per_chunk    integer;
               54 TEXTNOD =   high             number;
               55 TEXTNOD =   low              number;
               56 TEXTNOD =   found            number;
               57 TEXTNOD =   sort_area_too_small EXCEPTION;
               58 TEXTNOD =   PRAGMA EXCEPTION_INIT(sort_area_too_small, -1220);
               59 TEXTNOD =   resync_not_needed exception;
               60 TEXTNOD =   pragma exception_init(resync_not_needed, -20034);
               61 TEXTNOD =   -- Each time a backup controlfile is mounted, the version_time is updated.
               62 TEXTNOD =   -- We rely on this to decide when to ignore the high water marks.  As of
               63 TEXTNOD =   -- 8.1.6, we also rely on the version_time to filter out old circular
               64 TEXTNOD =   -- records.  Old ones are the ones that existed when the controlfile
               65 TEXTNOD =   -- was made into a backup.  These may be stale records if the user has
               66 TEXTNOD =   -- since deleted them from the recovery catalog.  We do not want to process
               67 TEXTNOD =   -- such records because they might pollute the recover catalog.  If the
               68 TEXTNOD =   -- backup controlfile was created by RMAN, then we already resync those
               69 TEXTNOD =   -- records anyway.
               70 TEXTNOD =   --
               71 TEXTNOD =   cursor rs is
               72 TEXTNOD =     select type, last_recid from v$controlfile_record_section;
               73 TEXTNOD =   -- Bug 1058691: the old form of the ts query did not handle the case where
               74 TEXTNOD =   -- a datafile was added to a tablespace AFTER the system clock was reset
               75 TEXTNOD =   -- to a time earlier than when the tablespace was created.  In that case,
               76 TEXTNOD =   -- min(scn) and min(time) would no longer refer to the same row when the
               77 TEXTNOD =   -- v$datafile table was aggregated on group(ts#).
               78 TEXTNOD =   cursor ts is
               79 TEXTNOD =     select ts.ts#,
               80 TEXTNOD =            ts.name,
               81 TEXTNOD =            creation_change# create_scn,
               82 TEXTNOD =            creation_time create_time
               83 TEXTNOD =     from v$datafile df, v$tablespace ts
               84 TEXTNOD =     where ts.ts#=df.ts# and
               85 TEXTNOD =           plugged_in=0 and
               86 TEXTNOD =           file#=(select min(file#) from v$datafile where ts#=ts.ts# and
               87 TEXTNOD =                  creation_change#=(select min(creation_change#)
               88 TEXTNOD =                                    from v$datafile
               89 TEXTNOD =                                    where ts#=ts.ts#))
               90 TEXTNOD =     order by ts.ts#;
               91 TEXTNOD =   -- When a current controlfile is made into a backup:
               92 TEXTNOD =   --   all stop scns are cleared
               93 TEXTNOD =   --   all SOR bits are cleared, and the WCC bit is set if the SOR bit was on.
               94 TEXTNOD =   --
               95 TEXTNOD =   -- This query is only used during full resyncs, which are only taken from
               96 TEXTNOD =   -- backup controlfiles.  That is why
               97 TEXTNOD =   -- we use the checkpoint scn (fecps) for the stop scn rather than the
               98 TEXTNOD =   -- stop scn (fests), and check the WCC bit rather than the SOR bit.
               99 TEXTNOD =   --
              100 TEXTNOD =   -- Also note that we don't use the absence of the CGE bit to determine if
              101 TEXTNOD =   -- a file is read-only, because we always check the WCC bit first, which
              102 TEXTNOD =   -- will never be set concurrently with the CGE bit.
              103 TEXTNOD =   --
              104 TEXTNOD =   -- If fefdb <> 0, then this is a file that has been
              105 TEXTNOD =   -- plugged in but not yet converted (still has foreign dbid and reset scn).
              106 TEXTNOD =   -- Such files are ignored by RMAN.
              107 TEXTNOD =   cursor df(low_fno number, high_fno number) IS
              108 TEXTNOD =     SELECT fenum fileno,
              109 TEXTNOD =       to_number(fecrc_scn) create_scn,
              110 TEXTNOD =       to_date(fecrc_tim,'MM/DD/RR HH24:MI:SS') create_time,
              111 TEXTNOD =       fetsn tsnum,
              112 TEXTNOD =       fnnam fname,
              113 TEXTNOD =       fhfsz fsize,
              114 TEXTNOD =       febsz block_size,
              115 TEXTNOD =       to_number(feofs) offline_scn,
              116 TEXTNOD =       to_number(feonc_scn) online_scn,
              117 TEXTNOD =       to_date(feonc_tim,'MM/DD/RR HH24:MI:SS') online_time,
              118 TEXTNOD =       to_number(fecps) stop_scn,
              119 TEXTNOD =       to_date(festt, 'MM/DD/RR HH24:MI:SS') stop_time,
              120 TEXTNOD =       to_number(bitand(festa, 4096)) clean_flag, -- This is the KCCFEWCC bit
              121 TEXTNOD =       to_number(bitand(festa, 4)) read_enabled_flag,
              122 TEXTNOD =       to_number(bitand(festa, 64)) missing_file_flag, -- this is KCCFECKD
              123 TEXTNOD =       fefdb
              124 TEXTNOD =       FROM x$kccfe, x$kccfn, x$kcvfh
              125 TEXTNOD =       WHERE fnfno=fenum
              126 TEXTNOD =       AND   fnfno=hxfil
              127 TEXTNOD =       AND   fefnh=fnnum
              128 TEXTNOD =       AND   fedup<>0
              129 TEXTNOD =       AND   fntyp=4
              130 TEXTNOD =       AND   fnnam IS NOT NULL
              131 TEXTNOD =       AND   fenum between low_fno and high_fno
              132 TEXTNOD =       ORDER BY fenum;
              133 TEXTNOD =    
              134 TEXTNOD =   cursor rt is
              135 TEXTNOD =     select thread#, sequence# last_sequence#, enable_change# enable_scn,
              136 TEXTNOD =            enable_time, disable_change# disable_scn, disable_time,
              137 TEXTNOD =            decode(enabled, 'DISABLED', 'D', 'E') status
              138 TEXTNOD =     from v$thread
              139 TEXTNOD =     order by thread#;
              140 TEXTNOD =   cursor orl is
              141 TEXTNOD =     select l.thread#, lf.group#, lf.member fname
              142 TEXTNOD =     from v$log l, v$logfile lf
              143 TEXTNOD =     where l.group# = lf.group#
              144 TEXTNOD =     order by member;
              145 TEXTNOD =   cursor rlh(low_recid number, high_recid number) is
              146 TEXTNOD =     select recid, stamp, thread#, sequence#, first_change# low_scn,
              147 TEXTNOD =            first_time low_time, next_change# next_scn
              148 TEXTNOD =     from v$log_history
              149 TEXTNOD =     where recid between low_recid and high_recid
              150 TEXTNOD =     order by recid;
              151 TEXTNOD =   -- NB:  The circular record type cursors below filter out records
              152 TEXTNOD =   --      whose stamp is < kccdivts.  dbms_rcvcat ignored such records, so
              153 TEXTNOD =   --      there is no point in passing them to dbms_rcvcat.  Refer to
              154 TEXTNOD =   --      prvtrvct.sql for the reason why these are ignored.  However, we
              155 TEXTNOD =   --      always pass the record at the high_recid slot so that dbms_rcvcat
              156 TEXTNOD =   --      can set the high water mark.
              157 TEXTNOD =   cursor al(low_recid number, high_recid number, cf_type varchar2) is
              158 TEXTNOD =     select recid, stamp, name, thread#, sequence#, resetlogs_change#,
              159 TEXTNOD =            resetlogs_time, first_change#, first_time,
              160 TEXTNOD =            next_change#, next_time, blocks, block_size,
              161 TEXTNOD =            decode(archived, 'YES', 'Y', 'NO', 'N', 'UNKNOWN') archived,
              162 TEXTNOD =            decode(deleted, 'YES', 'D', 'NO', 'A', 'UNKNOWN') status,
              163 TEXTNOD =            completion_time,
              164 TEXTNOD =            decode(cf_type, 'STANDBY', 'Y', 'N') is_standby
              165 TEXTNOD =     from v$archived_log
              166 TEXTNOD =     where recid between low_recid and high_recid
              167 TEXTNOD =       and (stamp >= kccdivts OR recid = high_recid)
              168 TEXTNOD =       and standby_dest = 'NO'
              169 TEXTNOD =     order by recid;
              170 TEXTNOD =   -- This cursor does a outer join of v$offline_range to x$kccfe.
              171 TEXTNOD =   -- The reason is that x$kccfe does not show datafiles that have been dropped
              172 TEXTNOD =   -- and whose file# reused. It is possible that a offline range record belongs
              173 TEXTNOD =   -- to a dropped datafile.  In this case, we cannot know the creation SCN
              174 TEXTNOD =   -- of the datafile that owns the offline range.  So we make it zero and
              175 TEXTNOD =   -- insert it into the recovery catalog that way.  Such ranges are never
              176 TEXTNOD =   -- used.  It is also possible that an offline range belongs to a
              177 TEXTNOD =   -- dropped datafile, and for that datafile number to have been reused.
              178 TEXTNOD =   -- To avoid associating the offline range with the wrong datafile incarnation
              179 TEXTNOD =   -- we require that the datafile creation scn be < the offline range end.
              180 TEXTNOD =   -- We use the offline range end rather than the start because of issues
              181 TEXTNOD =   -- relating to V7->V8 migration of offline tablespaces, and because of
              182 TEXTNOD =   -- TSPITR of read-only tablespaces.  Under these circumstances, the datafile
              183 TEXTNOD =   -- creation SCN may be > than the offline range start.
              184 TEXTNOD =   cursor offr(low_recid number, high_recid number) is
              185 TEXTNOD =     select /*+ first_rows */ offr.recid, offr.stamp, offr.file#,
              186 TEXTNOD =            nvl(to_number(fe.fecrc_scn), 0) creation_change#,
              187 TEXTNOD =            offr.offline_change#, offr.online_change#, offr.online_time
              188 TEXTNOD =     from v$offline_range offr, x$kccfe fe
              189 TEXTNOD =     where offr.file# = fe.fenum(+)
              190 TEXTNOD =     and   offr.online_change# > to_number(fe.fecrc_scn(+))
              191 TEXTNOD =     and   offr.recid between low_recid and high_recid
              192 TEXTNOD =     and   (offr.stamp >= kccdivts OR recid = high_recid)
              193 TEXTNOD =     order by offr.recid;
              194 TEXTNOD =   cursor bs(low_recid number, high_recid number) is
              195 TEXTNOD =     select recid, stamp, set_stamp, set_count, backup_type, incremental_level,
              196 TEXTNOD =            pieces, start_time, completion_time, controlfile_included,
              197 TEXTNOD =            input_file_scan_only
              198 TEXTNOD =     from v$backup_set
              199 TEXTNOD =     where recid between low_recid and high_recid
              200 TEXTNOD =       and (stamp >= kccdivts OR recid = high_recid)
              201 TEXTNOD =     order by recid;
              202 TEXTNOD =   
              203 TEXTNOD =   cursor bp(low_recid number, high_recid number) is
              204 TEXTNOD =     select recid, stamp, set_stamp, set_count, piece#, copy#, tag,
              205 TEXTNOD =            device_type, handle,
              206 TEXTNOD =            comments, media, media_pool, concur,
              207 TEXTNOD =            start_time, completion_time, status
              208 TEXTNOD =     from v$backup_piece
              209 TEXTNOD =     where recid between low_recid and high_recid
              210 TEXTNOD =       and (stamp >= kccdivts OR recid = high_recid)
              211 TEXTNOD =     order by recid;
              212 TEXTNOD =   cursor bdf(low_recid number, high_recid number) is
              213 TEXTNOD =     select recid, stamp, set_stamp, set_count, file#,
              214 TEXTNOD =            creation_change#, creation_time,
              215 TEXTNOD =            resetlogs_change#, resetlogs_time, incremental_level,
              216 TEXTNOD =            incremental_change#, checkpoint_change#, checkpoint_time,
              217 TEXTNOD =            absolute_fuzzy_change#, datafile_blocks, blocks, block_size,
              218 TEXTNOD =            oldest_offline_range, completion_time, controlfile_type
              219 TEXTNOD =     from v$backup_datafile
              220 TEXTNOD =     where recid between low_recid and high_recid
              221 TEXTNOD =       and (stamp >= kccdivts OR recid = high_recid)
              222 TEXTNOD =     order by recid;
              223 TEXTNOD =   cursor bcb(low_recid number, high_recid number) is
              224 TEXTNOD =     select recid, stamp, set_stamp, set_count, piece#, file#, block#, blocks,
              225 TEXTNOD =            corruption_change#, marked_corrupt
              226 TEXTNOD =     from v$backup_corruption
              227 TEXTNOD =     where recid between low_recid and high_recid
              228 TEXTNOD =       and (stamp >= kccdivts OR recid = high_recid)
              229 TEXTNOD =     order by recid;
              230 TEXTNOD =   cursor brl(low_recid number, high_recid number) is
              231 TEXTNOD =     select recid, stamp, set_stamp, set_count, thread#, sequence#,
              232 TEXTNOD =            resetlogs_change#, resetlogs_time, first_change#, first_time,
              233 TEXTNOD =            next_change#, next_time, blocks, block_size
              234 TEXTNOD =     from v$backup_redolog
              235 TEXTNOD =     where recid between low_recid and high_recid
              236 TEXTNOD =       and (stamp >= kccdivts OR recid = high_recid)
              237 TEXTNOD =     order by recid;
              238 TEXTNOD =   cursor cdf(low_recid number, high_recid number) is
              239 TEXTNOD =     select recid, stamp, name fname, tag, file#, creation_change# create_scn,
              240 TEXTNOD =            creation_time create_time, resetlogs_change# reset_scn,
              241 TEXTNOD =            resetlogs_time reset_time, incremental_level incr_level,
              242 TEXTNOD =            checkpoint_change# ckp_scn,
              243 TEXTNOD =            checkpoint_time ckp_time, absolute_fuzzy_change# abs_fuzzy_scn,
              244 TEXTNOD =            online_fuzzy,
              245 TEXTNOD =            backup_fuzzy,
              246 TEXTNOD =            recovery_fuzzy_change# rcv_fuzzy_scn,
              247 TEXTNOD =            recovery_fuzzy_time rcv_fuzzy_time,
              248 TEXTNOD =            blocks, block_size, oldest_offline_range,
              249 TEXTNOD =            decode(deleted, 'YES', 'D', 'NO', 'A', 'UNKNOWN') status,
              250 TEXTNOD =            completion_time, controlfile_type
              251 TEXTNOD =     from v$datafile_copy
              252 TEXTNOD =     where recid between low_recid and high_recid
              253 TEXTNOD =       and (stamp >= kccdivts OR recid = high_recid)
              254 TEXTNOD =     order by recid;
              255 TEXTNOD =   cursor xdf(low_recid number, high_recid number) is
              256 TEXTNOD =     select recid, stamp, tag, file#, creation_change# create_scn,
              257 TEXTNOD =            creation_time create_time, resetlogs_change# reset_scn,
              258 TEXTNOD =            resetlogs_time reset_time, incremental_level incr_level,
              259 TEXTNOD =            checkpoint_change# ckp_scn,
              260 TEXTNOD =            checkpoint_time ckp_time, absolute_fuzzy_change# abs_fuzzy_scn,
              261 TEXTNOD =            online_fuzzy,
              262 TEXTNOD =            backup_fuzzy,
              263 TEXTNOD =            recovery_fuzzy_change# rcv_fuzzy_scn,
              264 TEXTNOD =            recovery_fuzzy_time rcv_fuzzy_time,
              265 TEXTNOD =            blocks, block_size, oldest_offline_range,
              266 TEXTNOD =            device_type, handle, comments, media, media_pool,
              267 TEXTNOD =            status, start_time, completion_time, controlfile_type
              268 TEXTNOD =     from v$proxy_datafile
              269 TEXTNOD =     where recid between low_recid and high_recid
              270 TEXTNOD =       and (stamp >= kccdivts OR recid = high_recid)
              271 TEXTNOD =     order by recid;
              272 TEXTNOD =   cursor ccb(low_recid number, high_recid number) is
              273 TEXTNOD =     select recid, stamp, copy_recid, copy_stamp, file#, block#, blocks,
              274 TEXTNOD =            corruption_change#, marked_corrupt
              275 TEXTNOD =     from v$copy_corruption
              276 TEXTNOD =     where recid between low_recid and high_recid
              277 TEXTNOD =       and (stamp >= kccdivts OR recid = high_recid)
              278 TEXTNOD =     order by recid;
              279 TEXTNOD =   cursor dl(low_recid number, high_recid number) is
              280 TEXTNOD =     select recid, stamp, type object_type, object_recid, object_stamp
              281 TEXTNOD =     from v$deleted_object
              282 TEXTNOD =     where recid between low_recid and high_recid
              283 TEXTNOD =       and (stamp >= kccdivts OR recid = high_recid)
              284 TEXTNOD =     order by recid;
              285 TEXTNOD = begin
              286 TEXTNOD =   debug_resync := FALSE;
              287 TEXTNOD =  
              288 PRMVAL =  full_resync := false; implicit := true; debug_resync := true;
              289 TEXTNOD =    if (debug_resync) then
              290 TEXTNOD =        krmicd.writeMsg(1005, 'deb> Starting resync');
              291 TEXTNOD =    end if;
              292 TEXTNOD =   if cfname is null then
              293 TEXTNOD =     select status into mount_status from v$instance;
              294 TEXTNOD =     if mount_status not in ('MOUNTED', 'OPEN') then
              295 TEXTNOD =       if full_resync then
              296 TEXTNOD =         krmicd.writeMsg(8034);
              297 TEXTNOD =       else
              298 TEXTNOD =         krmicd.writeMsg(8035);
              299 TEXTNOD =       end if;
              300 TEXTNOD =       return;
              301 TEXTNOD =     end if;
              302 TEXTNOD =   else
              303 TEXTNOD =     mount_status := 'BACKUP';                   -- resync from backup cf
              304 TEXTNOD =   end if;
              305 TEXTNOD =   <<snapshot>>  -- retry on makeAndUseSnapshot failure
              306 TEXTNOD = 
              307 TEXTNOD =   begin
              308 TEXTNOD =     -- use a snapshot controlfile for full resync unless a backup controlfile
              309 TEXTNOD =     -- is specified
              310 TEXTNOD =     if (full_resync) then 
              311 TEXTNOD =       if (cfname is null) then
              312 TEXTNOD =         -- bug-10581508: We don't check if there is a snapshot
              313 TEXTNOD =         -- filename in x$kccdi.
              314 TEXTNOD =         -- In case that x$kccdi has no snapshot filename,
              315 TEXTNOD =         -- the Oracle Server will use default location.
              316 TEXTNOD =         -- (see kccmus() and cfileMakeAndUseSnapsho in file kcc.c)
              317 TEXTNOD =    
              318 TEXTNOD =         -- make a snapshot of the current controlfile
              319 TEXTNOD =         sys.dbms_backup_restore.cfileMakeAndUseSnapshot;
              320 TEXTNOD =       else
              321 TEXTNOD =         -- use the backup controlfile
              322 TEXTNOD =         sys.dbms_backup_restore.cfileUseCopy(cfname);
              323 TEXTNOD =       end if;
              324 TEXTNOD =     end if;
              325 TEXTNOD =   exception
              326 TEXTNOD =     when sys.dbms_backup_restore.snapshot_enqueue_busy then
              327 TEXTNOD =       -- retry up to 5 times, waiting 10 seconds between retries
              328 TEXTNOD =       if busy_retries = 5 then
              329 TEXTNOD =         krmicd.writeMsg(20029, 'cannot make a snapshot controlfile');
              330 TEXTNOD =         raise;
              331 TEXTNOD =       end if;
              332 TEXTNOD =       busy_retries := busy_retries + 1;
              333 TEXTNOD =       krmicd.writeMsg(8512);
              334 TEXTNOD =       krmicd.sleep(10*busy_retries);
              335 TEXTNOD =       krmicd.clearErrors;
              336 TEXTNOD =       goto snapshot;   
              337 TEXTNOD =   end;  -- snapshot controlfile stuff
              338 TEXTNOD =   -- Here, the controlfile X$ tables are pointing at either
              339 TEXTNOD =   -- the snapshot controlfile, the current controlfile, or
              340 TEXTNOD =   -- a backup controlfile.
              341 TEXTNOD =   select controlfile_type into cf_type from v$database;
              342 TEXTNOD =   if cf_type = 'STANDBY' then
              343 TEXTNOD =     -- The user probably said: resync from backup controlfile.
              344 TEXTNOD =     -- We only want to do partial resyncs from a standby controlfile.
              345 TEXTNOD =     -- The datafile filenames in a standby cf are probably different from
              346 TEXTNOD =     -- those in the primary cf, so we don't want to process them.
              347 TEXTNOD =    
              348 TEXTNOD =     if debug_resync then
              349 TEXTNOD =        krmicd.writeMsg(1005, 'deb> Resyncing from a standby controlfile');
              350 TEXTNOD =     end if;
              351 TEXTNOD =     full_resync := FALSE;
              352 TEXTNOD =   elsif cf_type not in ('CURRENT','BACKUP') then
              353 TEXTNOD =     if full_resync then
              354 TEXTNOD =       krmicd.writeMsg(8040);
              355 TEXTNOD =     else
              356 TEXTNOD =       krmicd.writeMsg(8041);
              357 TEXTNOD =     end if;
              358 TEXTNOD =     return;
              359 TEXTNOD =   end if;
              360 TEXTNOD =   <<retry>>  -- retry on inconsistent read
              361 TEXTNOD = begin
              362 TEXTNOD =  
              363 TEXTNOD =   select value into sort_area_size
              364 TEXTNOD =   from v$parameter
              365 TEXTNOD =   where name='sort_area_size';
              366 TEXTNOD =   select dbid, name, resetlogs_change#, resetlogs_time, controlfile_created,
              367 TEXTNOD =          controlfile_sequence#, controlfile_change#, controlfile_time,
              368 TEXTNOD =          version_time
              369 TEXTNOD =   into   db_id, db_name, reset_scn, reset_time, cf_create_time, ckp_cf_seq,
              370 TEXTNOD =          ckp_scn, ckp_time, cf_version
              371 TEXTNOD =   from v$database;
              372 TEXTNOD =   kccdivts := date2stamp(cf_version); -- used by circular record queries
              373 TEXTNOD = 
              374 TEXTNOD =   if debug_resync then
              375 TEXTNOD =       krmicd.writeMsg(1005, 'deb> kccdivts= '||to_char(kccdivts));
              376 TEXTNOD =   end if;
              377 TEXTNOD =   sys.dbms_backup_restore.getCkpt(getckptscn
              378 TEXTNOD =                                  ,high_cp_recid
              379 TEXTNOD =                                  ,high_rt_recid
              380 TEXTNOD =                                  ,high_le_recid
              381 TEXTNOD =                                  ,high_fe_recid
              382 TEXTNOD =                                  ,high_fn_recid
              383 TEXTNOD =                                  ,high_ts_recid
              384 TEXTNOD =                                  ,high_r1_recid
              385 TEXTNOD =                                  ,high_r2_recid
              386 TEXTNOD =                                  ,high_lh_recid
              387 TEXTNOD =                                  ,high_or_recid
              388 TEXTNOD =                                  ,high_al_recid
              389 TEXTNOD =                                  ,high_bs_recid
              390 TEXTNOD =                                  ,high_bp_recid
              391 TEXTNOD =                                  ,high_bf_recid
              392 TEXTNOD =                                  ,high_bl_recid
              393 TEXTNOD =                                  ,high_dc_recid
              394 TEXTNOD =                                  ,high_fc_recid
              395 TEXTNOD =                                  ,high_cc_recid
              396 TEXTNOD =                                  ,high_dl_recid
              397 TEXTNOD =                                  ,high_pc_recid
              398 TEXTNOD =                                  ,high_r4_recid
              399 TEXTNOD =                                  );
              400 TEXTNOD =   if debug_resync then
              401 TEXTNOD =      krmicd.writeMsg(1005, 'deb> high_cp_recid= '||high_cp_recid);
              402 TEXTNOD =      krmicd.writeMsg(1005, 'deb> high_rt_recid= '||high_rt_recid);
              403 TEXTNOD =      krmicd.writeMsg(1005, 'deb> high_le_recid= '||high_le_recid);
              404 TEXTNOD =      krmicd.writeMsg(1005, 'deb> high_fe_recid= '||high_fe_recid);
              405 TEXTNOD =      krmicd.writeMsg(1005, 'deb> high_fn_recid= '||high_fn_recid);
              406 TEXTNOD =      krmicd.writeMsg(1005, 'deb> high_ts_recid= '||high_ts_recid);
              407 TEXTNOD =      krmicd.writeMsg(1005, 'deb> high_r1_recid= '||high_r1_recid);
              408 TEXTNOD =      krmicd.writeMsg(1005, 'deb> high_r2_recid= '||high_r2_recid);
              409 TEXTNOD =      krmicd.writeMsg(1005, 'deb> high_lh_recid= '||high_lh_recid);
              410 TEXTNOD =      krmicd.writeMsg(1005, 'deb> high_or_recid= '||high_or_recid);
              411 TEXTNOD =      krmicd.writeMsg(1005, 'deb> high_al_recid= '||high_al_recid);
              412 TEXTNOD =      krmicd.writeMsg(1005, 'deb> high_bs_recid= '||high_bs_recid);
              413 TEXTNOD =      krmicd.writeMsg(1005, 'deb> high_bp_recid= '||high_bp_recid);
              414 TEXTNOD =      krmicd.writeMsg(1005, 'deb> high_bf_recid= '||high_bf_recid);
              415 TEXTNOD =      krmicd.writeMsg(1005, 'deb> high_bl_recid= '||high_bl_recid);
              416 TEXTNOD =      krmicd.writeMsg(1005, 'deb> high_dc_recid= '||high_dc_recid);
              417 TEXTNOD =      krmicd.writeMsg(1005, 'deb> high_fc_recid= '||high_fc_recid);
              418 TEXTNOD =      krmicd.writeMsg(1005, 'deb> high_cc_recid= '||high_cc_recid);
              419 TEXTNOD =      krmicd.writeMsg(1005, 'deb> high_dl_recid= '||high_dl_recid);
              420 TEXTNOD =      krmicd.writeMsg(1005, 'deb> high_pc_recid= '||high_pc_recid);
              421 TEXTNOD =      krmicd.writeMsg(1005, 'deb> high_r4_recid= '||high_r4_recid);
              422 TEXTNOD =   end if;
              423 TEXTNOD =   if (not full_resync) then
              424 TEXTNOD =     ckp_scn := getckptscn;
              425 TEXTNOD =     ckp_time := NULL;
              426 TEXTNOD =   end if; 
              427 TEXTNOD =   dbms_rcvcat.setDatabase
              428 TEXTNOD =     (db_name, reset_scn, reset_time, db_id);
              429 TEXTNOD =   begin
              430 TEXTNOD =     if (full_resync) then
              431 TEXTNOD =       dbms_rcvcat.beginCkpt
              432 TEXTNOD =         (ckp_scn, ckp_cf_seq, cf_version, ckp_time, 'FULL', mount_status,
              433 TEXTNOD =          high_fe_recid);
              434 TEXTNOD =     else
              435 TEXTNOD =       dbms_rcvcat.beginCkpt
              436 TEXTNOD =         (ckp_scn, ckp_cf_seq, cf_version, ckp_time, 'PARTIAL',
              437 TEXTNOD =          mount_status, high_fe_recid);
              438 TEXTNOD =     end if;
              439 TEXTNOD =   exception
              440 TEXTNOD =     when resync_not_needed then
              441 TEXTNOD =       if implicit then
              442 TEXTNOD =         krmicd.clearErrors;
              443 TEXTNOD =         return;
              444 TEXTNOD =       else
              445 TEXTNOD =         raise;
              446 TEXTNOD =       end if;
              447 TEXTNOD =     when others then
              448 TEXTNOD =       raise;
              449 TEXTNOD =   end;
              450 TEXTNOD =  
              451 TEXTNOD =   if (full_resync) then
              452 TEXTNOD =      krmicd.writeMsg(8002);      -- full resync
              453 TEXTNOD =   else
              454 TEXTNOD =      krmicd.writeMsg(8003);      -- partial resync
              455 TEXTNOD =   end if;
              456 TEXTNOD =   if (full_resync) then
              457 TEXTNOD =      -- because we cannot detect if rollback segments have been created or
              458 TEXTNOD =      -- dropped since the previous full open database resync, we always
              459 TEXTNOD =      -- resync tablespace information when the database is open.
              460 TEXTNOD =      if (mount_status = 'OPEN') then
              461 TEXTNOD =         high_ts_recid := NULL;                 -- force tablespace resync
              462 TEXTNOD =      end if;
              463 TEXTNOD =      if debug_resync then
              464 TEXTNOD =         krmicd.writeMsg(1005, 'deb> Resyncing tablespaces since ts# '||
              465 TEXTNOD =                         nvl(high_ts_recid, 0));
              466 TEXTNOD =      end if;
              467 TEXTNOD =      if dbms_rcvcat.beginTableSpaceResync(high_ts_recid) then
              468 TEXTNOD =         for tsrec in ts loop
              469 TEXTNOD =            if (mount_status = 'OPEN') then
              470 TEXTNOD =               select count(us#) into rbs_count
              471 TEXTNOD =                 from undo$ u
              472 TEXTNOD =                where u.ts# = tsrec.ts# and u.status$ != 1;
              473 TEXTNOD =            end if;
              474 TEXTNOD =            if debug_resync then
              475 TEXTNOD =                krmicd.writeMsg(1005, 'deb> Calling checkTableSpace');
              476 TEXTNOD =                krmicd.writeMsg(1005, 'deb>   for ts: '||tsrec.name||' with '||
              477 TEXTNOD =                                rbs_count||' rollback segments');
              478 TEXTNOD =            end if;
              479 TEXTNOD =            dbms_rcvcat.checkTableSpace
              480 TEXTNOD =               (tsrec.name, tsrec.ts#, tsrec.create_scn, tsrec.create_time,
              481 TEXTNOD =                rbs_count);
              482 TEXTNOD =         end loop;
              483 TEXTNOD = 
              484 TEXTNOD =         dbms_rcvcat.endTableSpaceResync;
              485 TEXTNOD =      end if;
              486 TEXTNOD = 
              487 TEXTNOD =      IF dbms_rcvcat.beginDataFileResync(high_fe_recid) THEN
              488 TEXTNOD =         rec_size := 758 + 75;
              489 TEXTNOD =         rec_per_chunk := floor(sort_area_size / rec_size);
              490 TEXTNOD =         -- total number of records
              491 TEXTNOD =         select dindf into total_recs
              492 TEXTNOD =           from x$kccdi;
              493 TEXTNOD =         found := 0;
              494 TEXTNOD =         low := 0;
              495 TEXTNOD =         loop
              496 TEXTNOD =            high := low + rec_per_chunk - 1;
              497 TEXTNOD =            for dfrec in df(low, high) LOOP
              498 TEXTNOD =               if debug_resync then
              499 TEXTNOD =                  krmicd.writeMsg(1005, 'deb> Resyncing datafile '||
              500 TEXTNOD =                                  dfrec.fname);
              501 TEXTNOD =               end if;
              502 TEXTNOD =               IF (dfrec.fefdb = 0) THEN
              503 TEXTNOD =                  IF dfrec.clean_flag <> 0 THEN -- the clean bit is on
              504 TEXTNOD =                     IF dfrec.read_enabled_flag <> 0 THEN
              505 TEXTNOD =                        read_only := 1;
              506 TEXTNOD =                     ELSE
              507 TEXTNOD =                        read_only := 0;         -- offline clean
              508 TEXTNOD =                     END IF;
              509 TEXTNOD =                  ELSE -- the file is not clean
              510 TEXTNOD =                     dfrec.stop_scn := NULL;
              511 TEXTNOD =                     dfrec.stop_time := NULL;
              512 TEXTNOD =                     read_only := 0;
              513 TEXTNOD =                  END IF;
              514 TEXTNOD =                  IF dfrec.fsize = 0 THEN
              515 TEXTNOD =                     -- We don't have the filesize, so pass NULL so that we
              516 TEXTNOD =                     -- don't update the value in the catalog.
              517 TEXTNOD =                     dfrec.fsize := NULL;
              518 TEXTNOD =                  END IF;
              519 TEXTNOD =                  IF dfrec.missing_file_flag <> 0 THEN
              520 TEXTNOD =                     -- The file is missing, so the controlfile does not
              521 TEXTNOD =                     -- have the real filename.  Pass NULL to checkDatafile so
              522 TEXTNOD =                     -- that it does not change the filename in the catalog.
              523 TEXTNOD =                     dfrec.fname := NULL;
              524 TEXTNOD =                  END IF;
              525 TEXTNOD =                  if debug_resync then
              526 TEXTNOD =                     krmicd.writeMsg(1005,
              527 TEXTNOD =                                     'deb> Calling checkDataFile for fileno '||
              528 TEXTNOD =                                     dfrec.fileno||' size '||dfrec.fsize);
              529 TEXTNOD =                  end if;
              530 TEXTNOD =                  dbms_rcvcat.checkDataFile(
              531 TEXTNOD =                     dfrec.fileno, dfrec.fname, dfrec.create_scn,
              532 TEXTNOD =                     dfrec.create_time, dfrec.fsize, dfrec.block_size,
              533 TEXTNOD =                     dfrec.tsnum, dfrec.stop_scn, read_only, dfrec.stop_time);
              534 TEXTNOD =                  IF dfrec.offline_scn <> 0 then
              535 TEXTNOD =                     if debug_resync then
              536 TEXTNOD =                        krmicd.writeMsg(1005,
              537 TEXTNOD =                                   'deb> Calling checkOfflineRange: offline '||
              538 TEXTNOD =                                   dfrec.offline_scn||' online '||
              539 TEXTNOD =                                   dfrec.online_scn);
              540 TEXTNOD =                     end if;
              541 TEXTNOD =                     dbms_rcvcat.checkOfflineRange(
              542 TEXTNOD =                        null, null, dfrec.fileno, dfrec.create_scn,
              543 TEXTNOD =                        dfrec.offline_scn, dfrec.online_scn, dfrec.online_time,
              544 TEXTNOD =                        cf_create_time);
              545 TEXTNOD =                  END IF;
              546 TEXTNOD =               END IF;
              547 TEXTNOD =               found := found + 1;
              548 TEXTNOD =               IF (found = total_recs) THEN
              549 TEXTNOD =                  if debug_resync then
              550 TEXTNOD =                     krmicd.writeMsg(1005, 'deb> Processed '||found||
              551 TEXTNOD =                                     ' datafiles.  Done');
              552 TEXTNOD =                  end if;
              553 TEXTNOD =                  goto all_found;
              554 TEXTNOD =               END IF;
              555 TEXTNOD =            end loop;
              556 TEXTNOD =            low := low + rec_per_chunk;
              557 TEXTNOD =         end loop;
              558 TEXTNOD =         <<all_found>>
              559 TEXTNOD =         dbms_rcvcat.endDataFileResync;
              560 TEXTNOD =      end if;
              561 TEXTNOD = 
              562 TEXTNOD =      if dbms_rcvcat.beginThreadResync(high_rt_recid) then
              563 TEXTNOD =         for rtrec in rt loop
              564 TEXTNOD =            if debug_resync then
              565 TEXTNOD =               krmicd.writeMsg(1005, 'deb> Calling checkThread for thread '||
              566 TEXTNOD =                               rtrec.thread#||' with sequence '||
              567 TEXTNOD =                               rtrec.last_sequence#);
              568 TEXTNOD =            end if;
              569 TEXTNOD =            dbms_rcvcat.checkThread
              570 TEXTNOD =               (rtrec.thread#, rtrec.last_sequence#, rtrec.enable_scn,
              571 TEXTNOD =               rtrec.enable_time, rtrec.disable_scn, rtrec.disable_time,
              572 TEXTNOD =               rtrec.status);
              573 TEXTNOD =         end loop;
              574 TEXTNOD =         dbms_rcvcat.endThreadResync;
              575 TEXTNOD =      end if;
              576 TEXTNOD = 
              577 TEXTNOD =      if dbms_rcvcat.beginOnlineRedoLogResync(high_le_recid) then
              578 TEXTNOD =         for orlrec in orl loop
              579 TEXTNOD =            if debug_resync then
              580 TEXTNOD =               krmicd.writeMsg(1005,
              581 TEXTNOD =                             'deb> Calling checkOnlineRedoLog '||orlrec.fname);
              582 TEXTNOD =            end if;
              583 TEXTNOD =            dbms_rcvcat.checkOnlineRedoLog
              584 TEXTNOD =               (orlrec.thread#, orlrec.group#, orlrec.fname);
              585 TEXTNOD =         end loop;
              586 TEXTNOD =         dbms_rcvcat.endOnlineRedoLogResync;
              587 TEXTNOD =      end if;
              588 TEXTNOD = 
              589 TEXTNOD =   end if; -- full_resync
              590 TEXTNOD = 
              591 TEXTNOD =   -- If you add any more circular record types, and if the cursor
              592 TEXTNOD =   -- to get the records does a join, be sure to do an outer join so that
              593 TEXTNOD =   -- we see all the circular records, regardless of the joined table
              594 TEXTNOD =   -- state.
              595 TEXTNOD =   recid := dbms_rcvcat.beginLogHistoryResync;
              596 TEXTNOD =   if debug_resync then
              597 TEXTNOD =      krmicd.writeMsg(1005, 'deb> Log History last recid '||recid||
              598 TEXTNOD =                      '; high '||high_lh_recid);
              599 TEXTNOD =   end if;
              600 TEXTNOD =   if (high_lh_recid > recid) then
              601 TEXTNOD =      select record_size into rec_size
              602 TEXTNOD =        from v$controlfile_record_section
              603 TEXTNOD =       where type='LOG HISTORY';
              604 TEXTNOD =      high := recid;
              605 TEXTNOD =      low := recid + 1;
              606 TEXTNOD =      rec_per_chunk := floor(sort_area_size / rec_size);
              607 TEXTNOD =      total_recs := high_lh_recid - low + 1;
              608 TEXTNOD =      if debug_resync then
              609 TEXTNOD =         krmicd.writemsg(1005, 'deb> sort_area_size='||sort_area_size);
              610 TEXTNOD =         krmicd.writemsg(1005, 'deb> rec_size='||rec_size);
              611 TEXTNOD =         krmicd.writemsg(1005, 'deb> rec_per_chunk='||rec_per_chunk);
              612 TEXTNOD =         krmicd.writemsg(1005, 'deb> low= '||low||
              613 TEXTNOD =                         '    max_high='||high_lh_recid);
              614 TEXTNOD =         krmicd.writemsg(1005, 'deb> total_recs='||total_recs);
              615 TEXTNOD =      end if;
              616 TEXTNOD =      while (high < high_lh_recid) loop
              617 TEXTNOD =         high := least(low + rec_per_chunk -1, high_lh_recid);
              618 TEXTNOD =         for rlhrec in rlh(low, high) loop
              619 TEXTNOD =            if debug_resync then
              620 TEXTNOD =               krmicd.writeMsg(1005,
              621 TEXTNOD =                               'deb> Calling checkLogHistory with thread '||
              622 TEXTNOD =                               rlhrec.thread#||' sequence '||rlhrec.sequence#);
              623 TEXTNOD =            end if;
              624 TEXTNOD =            dbms_rcvcat.checkLogHistory(
              625 TEXTNOD =               rlhrec.recid, rlhrec.stamp, rlhrec.thread#,
              626 TEXTNOD =               rlhrec.sequence#, rlhrec.low_scn, rlhrec.low_time,
              627 TEXTNOD =               rlhrec.next_scn);
              628 TEXTNOD =         end loop;
              629 TEXTNOD =         low := low + rec_per_chunk;
              630 TEXTNOD =      end loop;
              631 TEXTNOD =   end if;
              632 TEXTNOD =   dbms_rcvcat.endLogHistoryResync;
              633 TEXTNOD =   recid := dbms_rcvcat.beginArchivedLogResync;
              634 TEXTNOD =   if debug_resync then
              635 TEXTNOD =      krmicd.writeMsg(1005, 'deb> Archive log last recid '||recid||
              636 TEXTNOD =                      '; high '||high_al_recid);
              637 TEXTNOD =   end if;
              638 TEXTNOD =   if (high_al_recid > recid) then
              639 TEXTNOD =      select record_size into rec_size
              640 TEXTNOD =        from v$controlfile_record_section
              641 TEXTNOD =       where type='ARCHIVED LOG';
              642 TEXTNOD =      high := recid;
              643 TEXTNOD =      low := recid + 1;
              644 TEXTNOD =      rec_per_chunk := floor(sort_area_size / rec_size);
              645 TEXTNOD =      total_recs := high_al_recid - low + 1;
              646 TEXTNOD =      if debug_resync then
              647 TEXTNOD =         krmicd.writemsg(1005, 'deb> sort_area_size='||sort_area_size);
              648 TEXTNOD =         krmicd.writemsg(1005, 'deb> rec_size='||rec_size);
              649 TEXTNOD =         krmicd.writemsg(1005, 'deb> rec_per_chunk='||rec_per_chunk);
              650 TEXTNOD =         krmicd.writemsg(1005, 'deb> low= '||low||
              651 TEXTNOD =                         '    max_high='||high_al_recid);
              652 TEXTNOD =         krmicd.writemsg(1005, 'deb> total_recs='||total_recs);
              653 TEXTNOD =      end if;
              654 TEXTNOD =      while (high < high_al_recid) loop
              655 TEXTNOD =         high := least(low + rec_per_chunk -1, high_al_recid);
              656 TEXTNOD =         for alrec in al(low, high, cf_type) loop
              657 TEXTNOD =            if debug_resync then
              658 TEXTNOD =               krmicd.writeMsg(1005, 'deb> Calling checkArchivedLog for '||
              659 TEXTNOD =                                     alrec.name);
              660 TEXTNOD =               krmicd.writeMsg(1005, 'deb>   with sequence '||alrec.sequence#||
              661 TEXTNOD =                               ' archived '||alrec.archived||
              662 TEXTNOD =                               ' status '||alrec.status||
              663 TEXTNOD =                               ' is_standby '||alrec.is_standby);
              664 TEXTNOD =            end if;
              665 TEXTNOD =            dbms_rcvcat.checkArchivedLog(
              666 TEXTNOD =               alrec.recid, alrec.stamp, alrec.thread#,
              667 TEXTNOD =               alrec.sequence#, alrec.resetlogs_change#, alrec.resetlogs_time,
              668 TEXTNOD =               alrec.first_change#, alrec.first_time, alrec.next_change#,
              669 TEXTNOD =               alrec.next_time, alrec.blocks, alrec.block_size, alrec.name,
              670 TEXTNOD =               alrec.archived, alrec.completion_time, alrec.status,
              671 TEXTNOD =               alrec.is_standby);
              672 TEXTNOD =         end loop;
              673 TEXTNOD =         low := low + rec_per_chunk;
              674 TEXTNOD =      end loop;
              675 TEXTNOD =   end if;
              676 TEXTNOD =   dbms_rcvcat.endArchivedLogResync;
              677 TEXTNOD =   recid := dbms_rcvcat.beginOfflineRangeResync;
              678 TEXTNOD =   if debug_resync then
              679 TEXTNOD =     krmicd.writeMsg(1005, 'deb> Offline range last recid '||recid||
              680 TEXTNOD =                     '; high '||high_or_recid);
              681 TEXTNOD =   end if;
              682 TEXTNOD =   if (high_or_recid > recid) then
              683 TEXTNOD =      select record_size into rec_size
              684 TEXTNOD =        from v$controlfile_record_section
              685 TEXTNOD =       where type='OFFLINE RANGE';
              686 TEXTNOD =      high := recid;
              687 TEXTNOD =      low := recid + 1;
              688 TEXTNOD =      rec_per_chunk := floor(sort_area_size / rec_size);
              689 TEXTNOD =      total_recs := high_or_recid - low + 1;
              690 TEXTNOD =      if debug_resync then
              691 TEXTNOD =         krmicd.writemsg(1005, 'deb> sort_area_size='||sort_area_size);
              692 TEXTNOD =         krmicd.writemsg(1005, 'deb> rec_size='||rec_size);
              693 TEXTNOD =         krmicd.writemsg(1005, 'deb> rec_per_chunk='||rec_per_chunk);
              694 TEXTNOD =         krmicd.writemsg(1005, 'deb> low= '||low||
              695 TEXTNOD =                         '    max_high='||high_or_recid);
              696 TEXTNOD =         krmicd.writemsg(1005, 'deb> total_recs='||total_recs);
              697 TEXTNOD =      end if;
              698 TEXTNOD =      while (high < high_or_recid) loop
              699 TEXTNOD =         high := least(low + rec_per_chunk -1, high_or_recid);
              700 TEXTNOD =         for offrrec in offr(low, high) LOOP
              701 TEXTNOD =            if debug_resync then
              702 TEXTNOD =               krmicd.writeMsg(1005, 'deb> Calling checOfflineRange for file '||
              703 TEXTNOD =                               offrrec.file#||' offline '||
              704 TEXTNOD =                               offrrec.offline_change#||
              705 TEXTNOD =                               ' online '||offrrec.online_change#);
              706 TEXTNOD =            end if;
              707 TEXTNOD =            dbms_rcvcat.checkOfflineRange(
              708 TEXTNOD =               offrrec.recid, offrrec.stamp, offrrec.file#,
              709 TEXTNOD =               offrrec.creation_change#,
              710 TEXTNOD =               offrrec.offline_change#, offrrec.online_change#,
              711 TEXTNOD =               offrrec.online_time, cf_create_time);
              712 TEXTNOD =         end loop;
              713 TEXTNOD =         low := low + rec_per_chunk;
              714 TEXTNOD =      end loop;
              715 TEXTNOD =   end if;
              716 TEXTNOD =   dbms_rcvcat.endOfflineRangeResync;
              717 TEXTNOD =   recid := dbms_rcvcat.beginBackupSetResync;
              718 TEXTNOD =   if debug_resync then
              719 TEXTNOD =     krmicd.writeMsg(1005, 'deb> Backup set last recid '||recid||
              720 TEXTNOD =                     '; high '||high_bs_recid);
              721 TEXTNOD =   end if;
              722 TEXTNOD =   if (high_bs_recid > recid) then
              723 TEXTNOD =      select record_size into rec_size
              724 TEXTNOD =        from v$controlfile_record_section
              725 TEXTNOD =       where type='BACKUP SET';
              726 TEXTNOD =      high := recid;
              727 TEXTNOD =      low := recid + 1;
              728 TEXTNOD =      rec_per_chunk := floor(sort_area_size / rec_size);
              729 TEXTNOD =      total_recs := high_bs_recid - low + 1;
              730 TEXTNOD =      if debug_resync then
              731 TEXTNOD =         krmicd.writemsg(1005, 'deb> sort_area_size='||sort_area_size);
              732 TEXTNOD =         krmicd.writemsg(1005, 'deb> rec_size='||rec_size);
              733 TEXTNOD =         krmicd.writemsg(1005, 'deb> rec_per_chunk='||rec_per_chunk);
              734 TEXTNOD =         krmicd.writemsg(1005, 'deb> low= '||low||
              735 TEXTNOD =                         '    max_high='||high_bs_recid);
              736 TEXTNOD =         krmicd.writemsg(1005, 'deb> total_recs='||total_recs);
              737 TEXTNOD =      end if;
              738 TEXTNOD =      while (high < high_bs_recid) loop
              739 TEXTNOD =         high := least(low + rec_per_chunk -1, high_bs_recid);
              740 TEXTNOD =         for bsrec in bs(low, high) loop
              741 TEXTNOD =            if debug_resync then
              742 TEXTNOD =               krmicd.writeMsg(1005,
              743 TEXTNOD =                               'deb> Calling checkBackupSet for set_stamp '||
              744 TEXTNOD =                               bsrec.set_stamp||' set_count '||bsrec.set_count||
              745 TEXTNOD =                               ' pieces: '||bsrec.pieces);
              746 TEXTNOD =            end if;
              747 TEXTNOD =            dbms_rcvcat.checkBackupSet(
              748 TEXTNOD =               bsrec.recid, bsrec.stamp, bsrec.set_stamp, bsrec.set_count,
              749 TEXTNOD =               bsrec.backup_type, bsrec.incremental_level, bsrec.pieces,
              750 TEXTNOD =               bsrec.start_time, bsrec.completion_time,
              751 TEXTNOD =               bsrec.controlfile_included, bsrec.input_file_scan_only);
              752 TEXTNOD =         end loop;
              753 TEXTNOD =         low := low + rec_per_chunk;
              754 TEXTNOD =      end loop;
              755 TEXTNOD =   end if;
              756 TEXTNOD =   dbms_rcvcat.endBackupSetResync;
              757 TEXTNOD =   recid := dbms_rcvcat.beginBackupPieceResync;
              758 TEXTNOD =   if debug_resync then
              759 TEXTNOD =     krmicd.writeMsg(1005, 'deb> Backup piece last recid '||recid||
              760 TEXTNOD =                     '; high '||high_bp_recid);
              761 TEXTNOD =   end if;
              762 TEXTNOD =   if (high_bp_recid > recid) then
              763 TEXTNOD =      select record_size into rec_size
              764 TEXTNOD =        from v$controlfile_record_section
              765 TEXTNOD =       where type='BACKUP PIECE';
              766 TEXTNOD =      high := recid;
              767 TEXTNOD =      low := recid + 1;
              768 TEXTNOD =      rec_per_chunk := floor(sort_area_size / rec_size);
              769 TEXTNOD =      total_recs := high_bp_recid - low + 1;
              770 TEXTNOD =      if debug_resync then
              771 TEXTNOD =         krmicd.writemsg(1005, 'deb> sort_area_size='||sort_area_size);
              772 TEXTNOD =         krmicd.writemsg(1005, 'deb> rec_size='||rec_size);
              773 TEXTNOD =         krmicd.writemsg(1005, 'deb> rec_per_chunk='||rec_per_chunk);
              774 TEXTNOD =         krmicd.writemsg(1005, 'deb> low= '||low||
              775 TEXTNOD =                         '    max_high='||high_bp_recid);
              776 TEXTNOD =         krmicd.writemsg(1005, 'deb> total_recs='||total_recs);
              777 TEXTNOD =      end if;
              778 TEXTNOD =      while (high < high_bp_recid) loop
              779 TEXTNOD =         high := least(low + rec_per_chunk -1, high_bp_recid);
              780 TEXTNOD =         for bprec in bp(low, high) loop
              781 TEXTNOD =            if debug_resync then
              782 TEXTNOD =               krmicd.writeMsg(1005,
              783 TEXTNOD =                               'deb> Calling checkBackupPiece for stamp '||
              784 TEXTNOD =                               bprec.stamp||' count '||bprec.recid);
              785 TEXTNOD =               krmicd.writeMsg(1005,
              786 TEXTNOD =                               'deb>   Handle '||bprec.handle||' status '||
              787 TEXTNOD =                               bprec.status||' piece# '||bprec.piece#);
              788 TEXTNOD =               krmicd.writeMsg(1005,
              789 TEXTNOD =                               'deb> set_stamp '||bprec.set_stamp||
              790 TEXTNOD =                               ' set_count '||bprec.set_count);
              791 TEXTNOD =            end if;
              792 TEXTNOD =            dbms_rcvcat.checkBackupPiece(
              793 TEXTNOD =               bprec.recid, bprec.stamp, bprec.set_stamp, bprec.set_count,
              794 TEXTNOD =               bprec.piece#, bprec.tag, bprec.device_type, bprec.handle,
              795 TEXTNOD =               bprec.comments, bprec.media, bprec.concur,
              796 TEXTNOD =               bprec.start_time, bprec.completion_time, bprec.status,
              797 TEXTNOD =               bprec.copy#, bprec.media_pool);
              798 TEXTNOD =         end loop;
              799 TEXTNOD =         low := low + rec_per_chunk;
              800 TEXTNOD =      end loop;
              801 TEXTNOD =   end if;
              802 TEXTNOD =   dbms_rcvcat.endBackupPieceResync;
              803 TEXTNOD =   recid := dbms_rcvcat.beginBackupDataFileResync;
              804 TEXTNOD =   if debug_resync then
              805 TEXTNOD =      krmicd.writeMsg(1005, 'deb> Backup DataFile last recid '||recid||
              806 TEXTNOD =                      '; high '||high_bf_recid);
              807 TEXTNOD =   end if;
              808 TEXTNOD =   if (high_bf_recid > recid) then
              809 TEXTNOD =      select record_size into rec_size
              810 TEXTNOD =        from v$controlfile_record_section
              811 TEXTNOD =       where type='BACKUP DATAFILE';
              812 TEXTNOD =      high := recid;
              813 TEXTNOD =      low := recid + 1;
              814 TEXTNOD =      rec_per_chunk := floor(sort_area_size / rec_size);
              815 TEXTNOD =      total_recs := high_bf_recid - low + 1;
              816 TEXTNOD =      if debug_resync then
              817 TEXTNOD =         krmicd.writemsg(1005, 'deb> sort_area_size='||sort_area_size);
              818 TEXTNOD =         krmicd.writemsg(1005, 'deb> rec_size='||rec_size);
              819 TEXTNOD =         krmicd.writemsg(1005, 'deb> rec_per_chunk='||rec_per_chunk);
              820 TEXTNOD =         krmicd.writemsg(1005, 'deb> low= '||low||
              821 TEXTNOD =                         '    max_high='||high_bf_recid);
              822 TEXTNOD =         krmicd.writemsg(1005, 'deb> total_recs='||total_recs);
              823 TEXTNOD =      end if;
              824 TEXTNOD =      while (high < high_bf_recid) loop
              825 TEXTNOD =         high := least(low + rec_per_chunk -1, high_bf_recid);
              826 TEXTNOD =         for bdfrec in bdf(low, high) loop
              827 TEXTNOD =            if debug_resync then
              828 TEXTNOD =               krmicd.writeMsg(1005,
              829 TEXTNOD =                            'deb> Calling checkBackupDataFile for set_stamp '||
              830 TEXTNOD =                            bdfrec.set_stamp||' set_count '||bdfrec.set_count);
              831 TEXTNOD =               krmicd.writeMsg(1005, 'deb>   file# '||bdfrec.file#);
              832 TEXTNOD =            end if;
              833 TEXTNOD =            dbms_rcvcat.checkBackupDataFile(
              834 TEXTNOD =               bdfrec.recid, bdfrec.stamp, bdfrec.set_stamp, bdfrec.set_count,
              835 TEXTNOD =               bdfrec.file#, bdfrec.creation_change#, bdfrec.creation_time,
              836 TEXTNOD =               bdfrec.resetlogs_change#, bdfrec.resetlogs_time,
              837 TEXTNOD =               bdfrec.incremental_level, bdfrec.incremental_change#,
              838 TEXTNOD =               bdfrec.checkpoint_change#, bdfrec.checkpoint_time,
              839 TEXTNOD =               bdfrec.absolute_fuzzy_change#, bdfrec.datafile_blocks,
              840 TEXTNOD =               bdfrec.blocks, bdfrec.block_size, bdfrec.oldest_offline_range,
              841 TEXTNOD =               bdfrec.completion_time, bdfrec.controlfile_type);
              842 TEXTNOD =         end loop;
              843 TEXTNOD =         low := low + rec_per_chunk;
              844 TEXTNOD =      end loop;
              845 TEXTNOD =   end if;
              846 TEXTNOD =   dbms_rcvcat.endBackupDataFileResync;
              847 TEXTNOD =   recid := dbms_rcvcat.beginBackupCorruptionResync;
              848 TEXTNOD =   if debug_resync then
              849 TEXTNOD =     krmicd.writeMsg(1005, 'deb> Backup Corruption last recid '||recid||
              850 TEXTNOD =                     '; high '||high_fc_recid);
              851 TEXTNOD =   end if;
              852 TEXTNOD =   if (high_fc_recid > recid) then
              853 TEXTNOD =      select record_size into rec_size
              854 TEXTNOD =        from v$controlfile_record_section
              855 TEXTNOD =       where type='BACKUP CORRUPTION';
              856 TEXTNOD =      high := recid;
              857 TEXTNOD =      low := recid + 1;
              858 TEXTNOD =      rec_per_chunk := floor(sort_area_size / rec_size);
              859 TEXTNOD =      total_recs := high_fc_recid - low + 1;
              860 TEXTNOD =      if debug_resync then
              861 TEXTNOD =         krmicd.writemsg(1005, 'deb> sort_area_size='||sort_area_size);
              862 TEXTNOD =         krmicd.writemsg(1005, 'deb> rec_size='||rec_size);
              863 TEXTNOD =         krmicd.writemsg(1005, 'deb> rec_per_chunk='||rec_per_chunk);
              864 TEXTNOD =         krmicd.writemsg(1005, 'deb> low= '||low||
              865 TEXTNOD =                         '    max_high='||high_fc_recid);
              866 TEXTNOD =         krmicd.writemsg(1005, 'deb> total_recs='||total_recs);
              867 TEXTNOD =      end if;
              868 TEXTNOD =      while (high < high_fc_recid) loop
              869 TEXTNOD =         high := least(low + rec_per_chunk -1, high_fc_recid);
              870 TEXTNOD =         for bcbrec in bcb(low, high) loop
              871 TEXTNOD =            if debug_resync then
              872 TEXTNOD =               krmicd.writeMsg(1005,
              873 TEXTNOD =                          'deb> Calling checkBackupCorruption for set_stamp '||
              874 TEXTNOD =                          bcbrec.set_stamp||' set_count '||bcbrec.set_count);
              875 TEXTNOD =               krmicd.writeMsg(1005, 'deb>   file# '||bcbrec.file#);
              876 TEXTNOD =            end if;
              877 TEXTNOD =            dbms_rcvcat.checkBackupCorruption(
              878 TEXTNOD =               bcbrec.recid, bcbrec.stamp, bcbrec.set_stamp, bcbrec.set_count,
              879 TEXTNOD =               bcbrec.piece#, bcbrec.file#, bcbrec.block#, bcbrec.blocks,
              880 TEXTNOD =               bcbrec.corruption_change#, bcbrec.marked_corrupt);
              881 TEXTNOD =         end loop;
              882 TEXTNOD =         low := low + rec_per_chunk;
              883 TEXTNOD =      end loop;
              884 TEXTNOD =   end if;
              885 TEXTNOD =   dbms_rcvcat.endBackupCorruptionResync;
              886 TEXTNOD =   recid := dbms_rcvcat.beginBackupRedoLogResync;
              887 TEXTNOD =   if debug_resync then
              888 TEXTNOD =      krmicd.writeMsg(1005, 'deb> Backup RedoLog last recid '||recid||
              889 TEXTNOD =                      '; high '||high_bl_recid);
              890 TEXTNOD =   end if;
              891 TEXTNOD =   if (high_bl_recid > recid) then
              892 TEXTNOD =      select record_size into rec_size
              893 TEXTNOD =        from v$controlfile_record_section
              894 TEXTNOD =       where type='BACKUP REDOLOG';
              895 TEXTNOD =      high := recid;
              896 TEXTNOD =      low := recid + 1;
              897 TEXTNOD =      rec_per_chunk := floor(sort_area_size / rec_size);
              898 TEXTNOD =      total_recs := high_bl_recid - low + 1;
              899 TEXTNOD =      if debug_resync then
              900 TEXTNOD =         krmicd.writemsg(1005, 'deb> sort_area_size='||sort_area_size);
              901 TEXTNOD =         krmicd.writemsg(1005, 'deb> rec_size='||rec_size);
              902 TEXTNOD =         krmicd.writemsg(1005, 'deb> rec_per_chunk='||rec_per_chunk);
              903 TEXTNOD =         krmicd.writemsg(1005, 'deb> low= '||low||
              904 TEXTNOD =                         '    max_high='||high_bl_recid);
              905 TEXTNOD =         krmicd.writemsg(1005, 'deb> total_recs='||total_recs);
              906 TEXTNOD =      end if;
              907 TEXTNOD =      while (high < high_bl_recid) loop
              908 TEXTNOD =         high := least(low + rec_per_chunk -1, high_bl_recid);
              909 TEXTNOD =         for brlrec in brl(low, high) loop
              910 TEXTNOD =            if debug_resync then
              911 TEXTNOD =               krmicd.writeMsg(1005,
              912 TEXTNOD =                            'deb> Calling checkBackupRedoLog for set_stamp '||
              913 TEXTNOD =                            brlrec.set_stamp||' set_count '||brlrec.set_count);
              914 TEXTNOD =               krmicd.writeMsg(1005, 'deb>   sequence '||brlrec.sequence#||
              915 TEXTNOD =                               ' first change '||brlrec.first_change#||
              916 TEXTNOD =                               ' next change '||brlrec.next_change#);
              917 TEXTNOD =            end if;
              918 TEXTNOD =            dbms_rcvcat.checkBackupRedoLog(
              919 TEXTNOD =               brlrec.recid, brlrec.stamp, brlrec.set_stamp, brlrec.set_count,
              920 TEXTNOD =               brlrec.thread#, brlrec.sequence#, brlrec.resetlogs_change#,
              921 TEXTNOD =               brlrec.resetlogs_time, brlrec.first_change#, brlrec.first_time,
              922 TEXTNOD =               brlrec.next_change#, brlrec.next_time, brlrec.blocks,
              923 TEXTNOD =               brlrec.block_size);
              924 TEXTNOD =         end loop;
              925 TEXTNOD =         low := low + rec_per_chunk;
              926 TEXTNOD =      end loop;
              927 TEXTNOD =   end if;
              928 TEXTNOD =   dbms_rcvcat.endBackupRedoLogResync;
              929 TEXTNOD =   recid := dbms_rcvcat.beginDataFileCopyResync;
              930 TEXTNOD =   if debug_resync then
              931 TEXTNOD =      krmicd.writeMsg(1005, 'deb> DataFIleCopy last recid '||recid||
              932 TEXTNOD =                      '; high '||high_dc_recid);
              933 TEXTNOD =   end if;
              934 TEXTNOD =   if (high_dc_recid > recid) then
              935 TEXTNOD =      select record_size into rec_size
              936 TEXTNOD =        from v$controlfile_record_section
              937 TEXTNOD =       where type='DATAFILE COPY';
              938 TEXTNOD =      high := recid;
              939 TEXTNOD =      low := recid + 1;
              940 TEXTNOD =      rec_per_chunk := floor(sort_area_size / rec_size);
              941 TEXTNOD =      total_recs := high_dc_recid - low + 1;
              942 TEXTNOD =      if debug_resync then
              943 TEXTNOD =         krmicd.writemsg(1005, 'deb> sort_area_size='||sort_area_size);
              944 TEXTNOD =         krmicd.writemsg(1005, 'deb> rec_size='||rec_size);
              945 TEXTNOD =         krmicd.writemsg(1005, 'deb> rec_per_chunk='||rec_per_chunk);
              946 TEXTNOD =         krmicd.writemsg(1005, 'deb> low= '||low||
              947 TEXTNOD =                         '    max_high='||high_dc_recid);
              948 TEXTNOD =         krmicd.writemsg(1005, 'deb> total_recs='||total_recs);
              949 TEXTNOD =      end if;
              950 TEXTNOD =      while (high < high_dc_recid) loop
              951 TEXTNOD =         high := least(low + rec_per_chunk -1, high_dc_recid);
              952 TEXTNOD =         for cdfrec in cdf(low, high) loop
              953 TEXTNOD =            if debug_resync then
              954 TEXTNOD =               krmicd.writeMsg(1005, 'deb> Calling checkDataFileCopy for '||
              955 TEXTNOD =                               cdfrec.fname);
              956 TEXTNOD =               krmicd.writeMsg(1005, 'deb>   file# '||cdfrec.file#||
              957 TEXTNOD =                               ' status '||cdfrec.status);
              958 TEXTNOD =            end if;
              959 TEXTNOD =            dbms_rcvcat.checkDataFileCopy(
              960 TEXTNOD =               cdfrec.recid, cdfrec.stamp, cdfrec.fname, cdfrec.tag,
              961 TEXTNOD =               cdfrec.file#, cdfrec.create_scn, cdfrec.create_time,
              962 TEXTNOD =               cdfrec.reset_scn, cdfrec.reset_time, cdfrec.incr_level,
              963 TEXTNOD =               cdfrec.ckp_scn, cdfrec.ckp_time, cdfrec.online_fuzzy,
              964 TEXTNOD =               cdfrec.backup_fuzzy, cdfrec.abs_fuzzy_scn, cdfrec.rcv_fuzzy_scn,
              965 TEXTNOD =               cdfrec.rcv_fuzzy_time, cdfrec.blocks, cdfrec.block_size,
              966 TEXTNOD =               cdfrec.oldest_offline_range, cdfrec.completion_time,
              967 TEXTNOD =               cdfrec.status, cdfrec.controlfile_type);
              968 TEXTNOD =         end loop;
              969 TEXTNOD =         low := low + rec_per_chunk;
              970 TEXTNOD =      end loop;
              971 TEXTNOD =   end if;
              972 TEXTNOD =   dbms_rcvcat.endDataFileCopyResync;
              973 TEXTNOD =   recid := dbms_rcvcat.beginCopyCorruptionResync;
              974 TEXTNOD =   if debug_resync then
              975 TEXTNOD =      krmicd.writeMsg(1005, 'deb> Copy Corruption last recid '||recid||
              976 TEXTNOD =                      '; high '||high_cc_recid);
              977 TEXTNOD =   end if;
              978 TEXTNOD =   if (high_cc_recid > recid) then
              979 TEXTNOD =      select record_size into rec_size
              980 TEXTNOD =        from v$controlfile_record_section
              981 TEXTNOD =       where type='COPY CORRUPTION';
              982 TEXTNOD =      high := recid;
              983 TEXTNOD =      low := recid + 1;
              984 TEXTNOD =      rec_per_chunk := floor(sort_area_size / rec_size);
              985 TEXTNOD =      total_recs := high_cc_recid - low + 1;
              986 TEXTNOD =      if debug_resync then
              987 TEXTNOD =         krmicd.writemsg(1005, 'deb> sort_area_size='||sort_area_size);
              988 TEXTNOD =         krmicd.writemsg(1005, 'deb> rec_size='||rec_size);
              989 TEXTNOD =         krmicd.writemsg(1005, 'deb> rec_per_chunk='||rec_per_chunk);
              990 TEXTNOD =         krmicd.writemsg(1005, 'deb> low= '||low||
              991 TEXTNOD =                         '    max_high='||high_cc_recid);
              992 TEXTNOD =         krmicd.writemsg(1005, 'deb> total_recs='||total_recs);
              993 TEXTNOD =      end if;
              994 TEXTNOD =      while (high < high_cc_recid) loop
              995 TEXTNOD =         high := least(low + rec_per_chunk -1, high_cc_recid);
              996 TEXTNOD =         for ccbrec in ccb(low, high) loop
              997 TEXTNOD =            if debug_resync then
              998 TEXTNOD =               krmicd.writeMsg(1005,
              999 TEXTNOD =                               'deb> Calling checkCopyCorruption for file '||
             1000 TEXTNOD =                               ccbrec.file#);
             1001 TEXTNOD =            end if;
             1002 TEXTNOD =            dbms_rcvcat.checkCopyCorruption(
             1003 TEXTNOD =               ccbrec.recid, ccbrec.stamp, ccbrec.copy_recid, ccbrec.copy_stamp,
             1004 TEXTNOD =               ccbrec.file#, ccbrec.block#, ccbrec.blocks,
             1005 TEXTNOD =               ccbrec.corruption_change#, ccbrec.marked_corrupt);
             1006 TEXTNOD =         end loop;
             1007 TEXTNOD =         low := low + rec_per_chunk;
             1008 TEXTNOD =      end loop;
             1009 TEXTNOD =   end if;
             1010 TEXTNOD =   dbms_rcvcat.endCopyCorruptionResync;
             1011 TEXTNOD =   recid := dbms_rcvcat.beginDeletedObjectResync;
             1012 TEXTNOD =   if debug_resync then
             1013 TEXTNOD =      krmicd.writeMsg(1005, 'deb> DeletedObject last recid '||recid||
             1014 TEXTNOD =                      '; high '||high_dl_recid);
             1015 TEXTNOD =   end if;
             1016 TEXTNOD =   if (high_dl_recid > recid) then
             1017 TEXTNOD =      select record_size into rec_size
             1018 TEXTNOD =        from v$controlfile_record_section
             1019 TEXTNOD =       where type='DELETED OBJECT';
             1020 TEXTNOD =      high := recid;
             1021 TEXTNOD =      low := recid + 1;
             1022 TEXTNOD =      rec_per_chunk := floor(sort_area_size / rec_size);
             1023 TEXTNOD =      total_recs := high_dl_recid - low + 1;
             1024 TEXTNOD =      if debug_resync then
             1025 TEXTNOD =         krmicd.writemsg(1005, 'deb> sort_area_size='||sort_area_size);
             1026 TEXTNOD =         krmicd.writemsg(1005, 'deb> rec_size='||rec_size);
             1027 TEXTNOD =         krmicd.writemsg(1005, 'deb> rec_per_chunk='||rec_per_chunk);
             1028 TEXTNOD =         krmicd.writemsg(1005, 'deb> low= '||low||
             1029 TEXTNOD =                         '    max_high='||high_dl_recid);
             1030 TEXTNOD =         krmicd.writemsg(1005, 'deb> total_recs='||total_recs);
             1031 TEXTNOD =      end if;
             1032 TEXTNOD =      while (high < high_dl_recid) loop
             1033 TEXTNOD =         high := least(low + rec_per_chunk -1, high_dl_recid);
             1034 TEXTNOD =         for dorec in dl(low, high) loop
             1035 TEXTNOD =            if debug_resync then
             1036 TEXTNOD =               krmicd.writeMsg(1005,
             1037 TEXTNOD =                               'deb> Calling checkDeletedObject for object '||
             1038 TEXTNOD =                               dorec.object_type|| ' with count '||
             1039 TEXTNOD =                               dorec.object_recid||' and  stamp '||
             1040 TEXTNOD =                               dorec.object_stamp);
             1041 TEXTNOD =            end if;
             1042 TEXTNOD =            dbms_rcvcat.checkDeletedObject(
             1043 TEXTNOD =               dorec.recid, dorec.stamp,
             1044 TEXTNOD =               dorec.object_type, dorec.object_recid, dorec.object_stamp);
             1045 TEXTNOD =         end loop;
             1046 TEXTNOD =         low := low + rec_per_chunk;
             1047 TEXTNOD =      end loop;
             1048 TEXTNOD =   end if;
             1049 TEXTNOD =   dbms_rcvcat.endDeletedObjectResync;
             1050 TEXTNOD =   recid := dbms_rcvcat.beginProxyResync;
             1051 TEXTNOD =   if debug_resync then
             1052 TEXTNOD =      krmicd.writeMsg(1005, 'deb> ProxyResync last recid '||recid||
             1053 TEXTNOD =                      '; high '||high_pc_recid);
             1054 TEXTNOD =   end if;
             1055 TEXTNOD =   if (high_pc_recid > recid) then
             1056 TEXTNOD =      select record_size into rec_size
             1057 TEXTNOD =        from v$controlfile_record_section
             1058 TEXTNOD =       where type='PROXY COPY';
             1059 TEXTNOD =      high := recid;
             1060 TEXTNOD =      low := recid + 1;
             1061 TEXTNOD =      rec_per_chunk := floor(sort_area_size / rec_size);
             1062 TEXTNOD =      total_recs := high_pc_recid - low + 1;
             1063 TEXTNOD =      if debug_resync then
             1064 TEXTNOD =         krmicd.writemsg(1005, 'deb> sort_area_size='||sort_area_size);
             1065 TEXTNOD =         krmicd.writemsg(1005, 'deb> rec_size='||rec_size);
             1066 TEXTNOD =         krmicd.writemsg(1005, 'deb> rec_per_chunk='||rec_per_chunk);
             1067 TEXTNOD =         krmicd.writemsg(1005, 'deb> low= '||low||
             1068 TEXTNOD =                         '    max_high='||high_pc_recid);
             1069 TEXTNOD =         krmicd.writemsg(1005, 'deb> total_recs='||total_recs);
             1070 TEXTNOD =      end if;
             1071 TEXTNOD =      while (high < high_pc_recid) loop
             1072 TEXTNOD =         high := least(low + rec_per_chunk - 1, high_pc_recid);
             1073 TEXTNOD =         for xdfrec in xdf(low, high) loop
             1074 TEXTNOD =            if debug_resync then
             1075 TEXTNOD =               krmicd.writeMsg(1005, 'deb> Calling checkDataFileCopy for '||
             1076 TEXTNOD =                               xdfrec.handle);
             1077 TEXTNOD =               krmicd.writeMsg(1005, 'deb>   file# '||xdfrec.file#||
             1078 TEXTNOD =                               ' status '||xdfrec.status);
             1079 TEXTNOD =            end if;
             1080 TEXTNOD =            dbms_rcvcat.checkProxyDataFile(xdfrec.recid,
             1081 TEXTNOD =                                           xdfrec.stamp,
             1082 TEXTNOD =                                           xdfrec.tag,
             1083 TEXTNOD =                                           xdfrec.file#,
             1084 TEXTNOD =                                           xdfrec.create_scn,
             1085 TEXTNOD =                                           xdfrec.create_time,
             1086 TEXTNOD =                                           xdfrec.reset_scn,
             1087 TEXTNOD =                                           xdfrec.reset_time,
             1088 TEXTNOD =                                           xdfrec.incr_level,
             1089 TEXTNOD =                                           xdfrec.ckp_scn,
             1090 TEXTNOD =                                           xdfrec.ckp_time,
             1091 TEXTNOD =                                           xdfrec.online_fuzzy,
             1092 TEXTNOD =                                           xdfrec.backup_fuzzy,
             1093 TEXTNOD =                                           xdfrec.abs_fuzzy_scn,
             1094 TEXTNOD =                                           xdfrec.rcv_fuzzy_scn,
             1095 TEXTNOD =                                           xdfrec.rcv_fuzzy_time,
             1096 TEXTNOD =                                           xdfrec.blocks,
             1097 TEXTNOD =                                           xdfrec.block_size,
             1098 TEXTNOD =                                           xdfrec.oldest_offline_range,
             1099 TEXTNOD =                                           xdfrec.device_type,
             1100 TEXTNOD =                                           xdfrec.handle,
             1101 TEXTNOD =                                           xdfrec.comments,
             1102 TEXTNOD =                                           xdfrec.media,
             1103 TEXTNOD =                                           xdfrec.media_pool,
             1104 TEXTNOD =                                           xdfrec.start_time,
             1105 TEXTNOD =                                           xdfrec.completion_time,
             1106 TEXTNOD =                                           xdfrec.status,
             1107 TEXTNOD =                                           xdfrec.controlfile_type);
             1108 TEXTNOD =         end loop;
             1109 TEXTNOD =         low := low + rec_per_chunk;
             1110 TEXTNOD =      end loop;
             1111 TEXTNOD =     -- put the checkProxyArchivedLog resync loop here
             1112 TEXTNOD =     -- Archivelog proxy backup support is complete in the dbms_backup_restore
             1113 TEXTNOD =     -- and all the layers in the kernel, but rman does not exploit it yet.
             1114 TEXTNOD =     -- That is why there are no recovery catalog tables or procedures for
             1115 TEXTNOD =     -- handling proxy archivelogs.
             1116 TEXTNOD =   end if;
             1117 TEXTNOD =   dbms_rcvcat.endProxyResync;
             1118 TEXTNOD =   if debug_resync then
             1119 TEXTNOD =      krmicd.writeMsg(1005, 'deb> Calling sanityCheck');
             1120 TEXTNOD =   end if;
             1121 TEXTNOD =   dbms_rcvcat.sanityCheck;
             1122 TEXTNOD =   if debug_resync then
             1123 TEXTNOD =      krmicd.writeMsg(1005, 'deb> Calling endCkpt');
             1124 TEXTNOD =   end if;
             1125 TEXTNOD =   dbms_rcvcat.endCkpt;
             1126 TEXTNOD =   if (full_resync) then
             1127 TEXTNOD =     -- release snapshot enqueue
             1128 TEXTNOD =     sys.dbms_backup_restore.cfileUseCurrent;
             1129 TEXTNOD =   end if;
             1130 TEXTNOD =   if (full_resync) then
             1131 TEXTNOD =     krmicd.writeMsg(8004);
             1132 TEXTNOD =   else
             1133 TEXTNOD =      krmicd.writeMsg(8005);
             1134 TEXTNOD =   end if; 
             1135 TEXTNOD = exception
             1136 TEXTNOD =   when sort_area_too_small then
             1137 TEXTNOD =     dbms_rcvcat.cancelCkpt;
             1138 TEXTNOD =     if (sort_retries < 5) then
             1139 TEXTNOD =       sort_retries := sort_retries + 1;
             1140 TEXTNOD =       krmicd.writeMsg(1005,
             1141 TEXTNOD =         'resync got ORA'||to_char(sqlcode)||
             1142 TEXTNOD =         ', retrying with sort_area_size = '||to_char(sort_retries)||'MB');
             1143 TEXTNOD =       krmicd.execSql(
             1144 TEXTNOD =         'alter session set sort_area_size = '||to_char(sort_retries*1024000));
             1145 TEXTNOD =       krmicd.clearErrors;
             1146 TEXTNOD =       goto retry;
             1147 TEXTNOD =     else
             1148 TEXTNOD =       krmicd.writeMsg(1005, 'resync got ORA-'||to_char(sqlcode)||
             1149 TEXTNOD =                           ', giving up');
             1150 TEXTNOD =       raise;
             1151 TEXTNOD =     end if;
             1152 TEXTNOD =   when sys.dbms_backup_restore.inconsistant_read then
             1153 TEXTNOD =     -- retry up to 5 times if resync gets the inconsistent_read exception
             1154 TEXTNOD =     dbms_rcvcat.cancelCkpt;
             1155 TEXTNOD =     if (read_retries < 5) then
             1156 TEXTNOD =       read_retries := read_retries + 1;
             1157 TEXTNOD =       krmicd.writeMsg(1005,
             1158 TEXTNOD =                       'resync got ORA-235, retry '||to_char(read_retries));
             1159 TEXTNOD =       krmicd.clearErrors;
             1160 TEXTNOD =       goto retry;
             1161 TEXTNOD =     else
             1162 TEXTNOD =       krmicd.writeMsg(1005, 'resync got ORA-235, giving up');
             1163 TEXTNOD =       raise;
             1164 TEXTNOD =     end if;
             1165 TEXTNOD =   when others then
             1166 TEXTNOD =     dbms_rcvcat.cancelCkpt;
             1167 TEXTNOD =     if (full_resync) then
             1168 TEXTNOD =       sys.dbms_backup_restore.cfileUseCurrent;
             1169 TEXTNOD =     end if;
             1170 TEXTNOD =     raise;
             1171 TEXTNOD = end;
             1172 TEXTNOD = end;
RMAN-03023: executing command: partial resync
krmxpoq: xc=5371934920, action="0000001 FINISHED", col_l=16, ind=0, sid=27
krmxpoq: xc=5371944896, action="0000005 FINISHED", col_l=16, ind=0, sid=30
krmqgns: looking for work for channel default
krmqgns: commands remaining to be executed:
CMD type=partial resync id=1 status=NOT STARTED
          1 STEP id=1 status=NOT STARTED chid=default
krmqgns: channel default assigned step 1

krmqgns: looking for work for channel sbt
krmqgns: commands remaining to be executed:
CMD type=partial resync id=1 status=STARTED
          1 STEP id=1 status=STARTED chid=default
krmqgns: no work found for channel sbt

krmxcis: xc=5371934920 chid=default calling pcicmp
krmxr: xc=5371934920 chid=default calling peicnt
RMAN-01005: deb> Starting resync
RMAN-01005: deb> kccdivts= 480354383
krmxrpc: xc=5371934920 kpurpc2 rc=0 db=target proc=DBMS_BACKUP_RESTORE.GETCKPT
krmxrpc: xc=5371934920 RPC #2 completed immediately
RMAN-01005: deb> high_cp_recid=
RMAN-01005: deb> high_rt_recid= 0
RMAN-01005: deb> high_le_recid= 4
RMAN-01005: deb> high_fe_recid= 28
RMAN-01005: deb> high_fn_recid=
RMAN-01005: deb> high_ts_recid= 13
RMAN-01005: deb> high_r1_recid=
RMAN-01005: deb> high_r2_recid=
RMAN-01005: deb> high_lh_recid= 12174
RMAN-01005: deb> high_or_recid= 0
RMAN-01005: deb> high_al_recid= 10032
RMAN-01005: deb> high_bs_recid= 4
RMAN-01005: deb> high_bp_recid= 4
RMAN-01005: deb> high_bf_recid= 23
RMAN-01005: deb> high_bl_recid= 0
RMAN-01005: deb> high_dc_recid= 26
RMAN-01005: deb> high_fc_recid= 0
RMAN-01005: deb> high_cc_recid= 0
RMAN-01005: deb> high_dl_recid= 0
RMAN-01005: deb> high_pc_recid= 0
RMAN-01005: deb> high_r4_recid=
krmxrpc: xc=5371934920 kpurpc2 rc=0 db=rcvcat proc=DBMS_RCVCAT.SETDATABASE
krmxrpc: xc=5371934920 kpurpc2 rc=0 db=rcvcat proc=DBMS_RCVCAT.BEGINCKPT
RMAN-08003: starting partial resync of recovery catalog
krmxrpc: xc=5371934920 kpurpc2 rc=0 db=rcvcat proc=DBMS_RCVCAT.BEGINLOGHISTORYRESYNC
RMAN-01005: deb> Log History last recid 12173; high 12174
RMAN-01005: deb> sort_area_size=2097152
RMAN-01005: deb> rec_size=36
RMAN-01005: deb> rec_per_chunk=58254
RMAN-01005: deb> low= 12174    max_high=12174
RMAN-01005: deb> total_recs=1
RMAN-01005: deb> Calling checkLogHistory with thread 1 sequence 12174
krmxrpc: xc=5371934920 kpurpc2 rc=0 db=rcvcat proc=DBMS_RCVCAT.CHECKLOGHISTORY
krmxrpc: xc=5371934920 kpurpc2 rc=0 db=rcvcat proc=DBMS_RCVCAT.ENDLOGHISTORYRESYNC
krmxrpc: xc=5371934920 kpurpc2 rc=0 db=rcvcat proc=DBMS_RCVCAT.BEGINARCHIVEDLOGRESYNC
RMAN-01005: deb> Archive log last recid 10031; high 10032
RMAN-01005: deb> sort_area_size=2097152
RMAN-01005: deb> rec_size=592
RMAN-01005: deb> rec_per_chunk=3542
RMAN-01005: deb> low= 10032    max_high=10032
RMAN-01005: deb> total_recs=1
RMAN-01005: deb> Calling checkArchivedLog for /usr3/oracle/TCL/saparch/TCLarch1_12174.dbf
RMAN-01005: deb>   with sequence 12174 archived Y status A is_standby N
krmxrpc: xc=5371934920 kpurpc2 rc=0 db=rcvcat proc=DBMS_RCVCAT.CHECKARCHIVEDLOG
krmxrpc: xc=5371934920 kpurpc2 rc=0 db=rcvcat proc=DBMS_RCVCAT.ENDARCHIVEDLOGRESYNC
krmxrpc: xc=5371934920 kpurpc2 rc=0 db=rcvcat proc=DBMS_RCVCAT.BEGINOFFLINERANGERESYNC
RMAN-01005: deb> Offline range last recid 0; high 0
krmxrpc: xc=5371934920 kpurpc2 rc=0 db=rcvcat proc=DBMS_RCVCAT.ENDOFFLINERANGERESYNC
krmxrpc: xc=5371934920 kpurpc2 rc=0 db=rcvcat proc=DBMS_RCVCAT.BEGINBACKUPSETRESYNC
RMAN-01005: deb> Backup set last recid 4; high 4
krmxrpc: xc=5371934920 kpurpc2 rc=0 db=rcvcat proc=DBMS_RCVCAT.ENDBACKUPSETRESYNC
krmxrpc: xc=5371934920 kpurpc2 rc=0 db=rcvcat proc=DBMS_RCVCAT.BEGINBACKUPPIECERESYNC
RMAN-01005: deb> Backup piece last recid 4; high 4
krmxrpc: xc=5371934920 kpurpc2 rc=0 db=rcvcat proc=DBMS_RCVCAT.ENDBACKUPPIECERESYNC
krmxrpc: xc=5371934920 kpurpc2 rc=0 db=rcvcat proc=DBMS_RCVCAT.BEGINBACKUPDATAFILERESYNC
RMAN-01005: deb> Backup DataFile last recid 23; high 23
krmxrpc: xc=5371934920 kpurpc2 rc=0 db=rcvcat proc=DBMS_RCVCAT.ENDBACKUPDATAFILERESYNC
krmxrpc: xc=5371934920 kpurpc2 rc=0 db=rcvcat proc=DBMS_RCVCAT.BEGINBACKUPCORRUPTIONRESYNC
RMAN-01005: deb> Backup Corruption last recid 0; high 0
krmxrpc: xc=5371934920 kpurpc2 rc=0 db=rcvcat proc=DBMS_RCVCAT.ENDBACKUPCORRUPTIONRESYNC
krmxrpc: xc=5371934920 kpurpc2 rc=0 db=rcvcat proc=DBMS_RCVCAT.BEGINBACKUPREDOLOGRESYNC
RMAN-01005: deb> Backup RedoLog last recid 0; high 0
krmxrpc: xc=5371934920 kpurpc2 rc=0 db=rcvcat proc=DBMS_RCVCAT.ENDBACKUPREDOLOGRESYNC
krmxrpc: xc=5371934920 kpurpc2 rc=0 db=rcvcat proc=DBMS_RCVCAT.BEGINDATAFILECOPYRESYNC
RMAN-01005: deb> DataFIleCopy last recid 26; high 26
krmxrpc: xc=5371934920 kpurpc2 rc=0 db=rcvcat proc=DBMS_RCVCAT.ENDDATAFILECOPYRESYNC
krmxrpc: xc=5371934920 kpurpc2 rc=0 db=rcvcat proc=DBMS_RCVCAT.BEGINCOPYCORRUPTIONRESYNC
RMAN-01005: deb> Copy Corruption last recid 0; high 0
krmxrpc: xc=5371934920 kpurpc2 rc=0 db=rcvcat proc=DBMS_RCVCAT.ENDCOPYCORRUPTIONRESYNC
krmxrpc: xc=5371934920 kpurpc2 rc=0 db=rcvcat proc=DBMS_RCVCAT.BEGINDELETEDOBJECTRESYNC
RMAN-01005: deb> DeletedObject last recid 0; high 0
krmxrpc: xc=5371934920 kpurpc2 rc=0 db=rcvcat proc=DBMS_RCVCAT.ENDDELETEDOBJECTRESYNC
krmxrpc: xc=5371934920 kpurpc2 rc=0 db=rcvcat proc=DBMS_RCVCAT.BEGINPROXYRESYNC
RMAN-01005: deb> ProxyResync last recid 0; high 0
krmxrpc: xc=5371934920 kpurpc2 rc=0 db=rcvcat proc=DBMS_RCVCAT.ENDPROXYRESYNC
RMAN-01005: deb> Calling sanityCheck
krmxrpc: xc=5371934920 kpurpc2 rc=0 db=rcvcat proc=DBMS_RCVCAT.SANITYCHECK
RMAN-01005: deb> Calling endCkpt
krmxrpc: xc=5371934920 kpurpc2 rc=0 db=rcvcat proc=DBMS_RCVCAT.ENDCKPT
RMAN-08005: partial resync complete
krmxr: xc=5371934920 finished step
krmqgns: channel default finished step 1
krmqgns: looking for work for channel default
krmqgns: commands remaining to be executed:
krmqgns: no work found for channel default

krmqgns: looking for work for channel sbt
krmqgns: commands remaining to be executed:
krmqgns: no work found for channel sbt

krmqgns: looking for work for channel default
krmqgns: commands remaining to be executed:
krmqgns: no work found for channel default

krmqgns: looking for work for channel sbt
krmqgns: commands remaining to be executed:
krmqgns: no work found for channel sbt

EXEC SQL AT RCVCAT yProxy := dbms_rcvman . getAnyProxy ; :getCfBackup := dbms_rcvman . getCfBackup ; :listCfCopy := dbms_rcvman . listCfCopy ; :listDfCopy := dbms_rcvman . listDfCopy ; :listCfBackup := dbms_rcvman . listCfBackup ; :listDfBackup := dbms_rcvman . listDfBackup ; :listAlBackup := dbms_rcvman . listAlBackup ; :listDfProxy := dbms_rcvman . listDfProxy ; :getRecovAction := dbms_rcvman . getRecovAction ; :getAlBackup := dbms_rcvman . getAlBackup ; :listAlCopy := dbms_rcvman . listAlCopy ; end ;
   sqlcode=0
      :b1 = 0
      :b2 = 2
      :b3 = 1
      :b4 = 3
      :b5 = 4
      :b6 = 1
      :b7 = 2
      :b8 = 4
      :b9 = 8
      :b10 = 16
      :b11 = 1
      :b12 = 2
      :b13 = 4
      :b14 = 8
      :b15 = 1
      :b16 = 2
      :b17 = 4
      :b18 = 8
      :b19 = 32
      :b20 = 16
      :b21 = 0
      :b22 = 1
      :b23 = 2
      :b24 = 3
      :b25 = 4
      :b26 = 5
      :b27 = 6
      :b28 = 7
      :b29 = 8
      :b30 = 9
      :b31 = 10
      :b32 = 11
      :b33 = 12
>> ENTERING setRAflags
>> setRAflags kindMask=255 containerMask=15 actionMask=63
>>  ENTERING setComputeRecoveryActionMasks816
>>   ENTERING setComputeRecoveryActionMasks
>>   EXITING setComputeRecoveryActionMasks
>>  EXITING setComputeRecoveryActionMasks816
>> EXITING setRAflags

EXEC SQL AT RCVCAT begin dbms_rcvman . translateDataFile ( :fno ) ; end ;
   sqlcode=0
      :b1 = 1
>> ENTERING translateDataFile_2
>>  OPENING cursor translateDatafileNumber in translateDataFile_2
>> EXITING translateDataFile_2
krmknmtr:  the parse tree after name translation is:
    1 backup
          1 BSLIST
                1 BSPEC
                      1 DFILE
                            1 DF fno=1 crescn=13027318 blksize=8192 blocks=25600
                              fn=/usr3/oracle/TCL/sapdata1/system_1/system.data1
                              ts=SYSTEM
krmkdps: this_db_key=1
krmkdps: this_dbinc_key=2
krmkdps: this_reset_scn=112718748
krmkdps: this_reset_time=11-DEC-02
krmkdps: untilSCN=
krmkdps: untilTime=
krmkdps: getRA_completedAfter=
krmkdps: getRA_completedBefore=
krmkdps: getRA_likePattern=
krmkdps: getRA_containerMask=15
krmkdps: getRA_actionMask=63
krmkdps: computeRA_allRecords=0
krmkdps: allIncarnations=0

EXEC SQL AT TARGET select DECODE(status,'OPEN',1,0) into :b1  from V$INSTANCE
   sqlcode=0
      :b1 = 1

EXEC SQL AT TARGET select controlfile_type ,controlfile_change# ,controlfile_sequence# ,controlfile_created ,decode(offr.records_used,0,0,((offr.last_recid-offr.records_used)+1)) into :b1,:b2,:b3,:b4,:b5  from v$database ,v$controlfile_record_section offr where offr.type='OFFLINE RANGE'
   sqlcode=0
      :b1 = "CURRENT"
      :b2 = 166293885
      :b3 = 534664
      :b4 = "11-DEC-02"
      :b5 = 0

EXEC SQL AT TARGET select name ,resetlogs_time ,resetlogs_change# ,dbid ,rpad(name,8,'x') into :b1:b2,:b3,:b4,:b5:b6,:b7  from v$database
   sqlcode=0
      :b1 = "TCL"
      :b2 = "11-DEC-02"
      :b3 = 112718748
      :b4 = 4202879242
      :b5 = "TCLxxxxx"

EXEC SQL AT TARGET select decode(value,'TRUE',1,0) into :b1  from v$option where parameter='Parallel backup and recovery'
   sqlcode=0
      :b1 = 1

EXEC SQL AT TARGET select decode(value,'TRUE',1,0) into :b1  from v$option where parameter='Incremental backup and recovery'
   sqlcode=0
      :b1 = 1

EXEC SQL AT TARGET select decode(value,'TRUE',1,0) into :b1  from v$option where parameter='Duplexed backups'
   sqlcode=0
      :b1 = 1

EXEC SQL AT TARGET begin dbms_rcvman . setDatabase ( upper ( :dbname:dbname_i ) , :rlscn , :rltime , :fhdbi:fhdbi_i ) ; end ;
   sqlcode=0
      :b1 = "TCL"
      :b2 = 112718748
      :b3 = "11-DEC-02"
      :b4 = 4202879242

EXEC SQL AT TARGET select fhscn ,to_date(fhtim,'MM/DD/RR HH24:MI:SS') ,fhcrs ,fhrls ,to_date(fhrlc,'MM/DD/RR HH24:MI:SS') ,fhafs ,hxerr ,fhfsz into :b1,:b2:b3,:b4,:b5,:b6:b7,:b8,:b9,:b10  from x$kcvfhall where hxfil=:b11
   sqlcode=0
      :b1 = 166293885
      :b2 = "22-FEB-04"
      :b3 = 13027318
      :b4 = 112718748
      :b5 = "11-DEC-02"
      :b6 = 0
      :b7 = 0
      :b8 = 25600
      :b9 = 1

EXEC SQL AT TARGET select device ,node  from x$krbaff where fno=:b1          
   sqlcode=0
      :b1 = 1

EXEC SQL at TARGET FETCH/CLOSE of prior statement
   sqlcode=0
      :b1 = NULL
      :b2 = NULL

EXEC SQL at TARGET FETCH/CLOSE of prior statement
   sqlcode=1403
krmkrfh:
DF fno=1 crescn=13027318 blksize=8192 blocks=25600
      fn=/usr3/oracle/TCL/sapdata1/system_1/system.data1
      ts=SYSTEM
      fhdata: ckpscn=166293885 rlgscn=112718748
      device=NULL_DEVICE blocks=25600
      node=NULL_NODE
krmkbck: files=2  blocks=26100  sets=1 setsize=26100
DF fno=1 crescn=13027318 blksize=8192 blocks=25600
fn=/usr3/oracle/TCL/sapdata1/system_1/system.data1
ts=SYSTEM
fhdata: ckpscn=166293885 rlgscn=112718748
device=NULL_DEVICE blocks=25600
node=NULL_NODE
krmkbck: backup set list:
    1 SL blocks=26100 files=2
          1 DF fno=1 crescn=13027318 blksize=8192 blocks=25600
            fn=/usr3/oracle/TCL/sapdata1/system_1/system.data1
            ts=SYSTEM
            fhdata: ckpscn=166293885 rlgscn=112718748
            device=NULL_DEVICE blocks=25600
            node=NULL_NODE
          2 CURCF
                1 NIL
krmicomp: the compiled command tree is:
    1 CMD type=backup id=1 status=NOT STARTED
          1 STEP id=1 status=NOT STARTED
                1 TEXTNOD = -- budf_start
                2 TEXTNOD = /* This must be retriable, which means a backup conversation may already
                3 TEXTNOD =  * be in progress when this step (re)executes.
                4 TEXTNOD =  */
                5 TEXTNOD = declare
                6 TEXTNOD =   /* backup conversation status variables */
                7 TEXTNOD =   state       binary_integer;
                8 TEXTNOD =   setid       number;
                9 TEXTNOD =   stamp       number;
               10 TEXTNOD =   pieceno     binary_integer;
               11 TEXTNOD =   files       binary_integer;
               12 TEXTNOD =   datafiles   boolean;
               13 TEXTNOD =   incremental boolean;
               14 TEXTNOD =   nochecksum  boolean;
               15 TEXTNOD =   device      boolean;
               16 TEXTNOD =   /* piece creation variables */
               17 TEXTNOD =   done        boolean;
               18 TEXTNOD =   concur      boolean;
               19 TEXTNOD =   /* Miscellaneous */
               20 TEXTNOD =   memnum      number;
               21 TEXTNOD =   dfnumber    number;
               22 TEXTNOD =   cfname      varchar2(512);
               23 TEXTNOD =   copy_recid  number;
               24 TEXTNOD =   copy_stamp  number;
               25 TEXTNOD =   busy_retries number := 0;
               26 TEXTNOD =   resetlogs_change  number;
               27 TEXTNOD =   creation_change   number;
               28 TEXTNOD =   checkpoint_change number;
               29 TEXTNOD =   blksize           number;
               30 TEXTNOD =   fname             varchar2(1024);
               31 TEXTNOD =   no_delete         binary_integer;
               32 TEXTNOD =   copy         number;
               33 TEXTNOD =   ncopies      number := 0;
               34 TEXTNOD =   handle       varchar2(512);
               35 TEXTNOD =   comment      varchar2(80);
               36 TEXTNOD =   media        varchar2(64);
               37 TEXTNOD =   wrong_format      exception;
               38 TEXTNOD =   first_time        boolean := TRUE;
               39 TEXTNOD =   backup_level      number;
               40 TEXTNOD =   set_type          varchar2(30);
               41 TEXTNOD =   elapsed     number;
               42 TEXTNOD =   stampd     date;
               43 TEXTNOD =   hours             number;
               44 TEXTNOD =   mins              number;
               45 TEXTNOD =   secs              number;
               46 TEXTNOD =   isstby            boolean;
               47 TEXTNOD = begin
               48 TEXTNOD =  
               49 PRMVAL =  backup_level := null;
               50 TEXTNOD =   if backup_level is not null then
               51 TEXTNOD =      set_type := 'incremental level ' || to_char(backup_level);
               52 TEXTNOD =   else
               53 TEXTNOD =      set_type := 'full';
               54 TEXTNOD =   end if;
               55 TEXTNOD =   sys.dbms_backup_restore.backupStatus(state, setid, stamp, pieceno, files,
               56 TEXTNOD =                                        datafiles, incremental, nochecksum,
               57 TEXTNOD =                                        device);
               58 TEXTNOD =   if state = sys.dbms_backup_restore.BACKUP_NO_CONVERSATION then
               59 TEXTNOD =     goto start_convo;
               60 TEXTNOD =   elsif state = sys.dbms_backup_restore.BACKUP_NAMING_FILES then
               61 TEXTNOD =     goto name_files;
               62 TEXTNOD =   else
               63 TEXTNOD =     goto create_piece;
               64 TEXTNOD =   end if;
               65 TEXTNOD = <<start_convo>>
               66 TEXTNOD =   sys.dbms_backup_restore.backupSetDatafile(stamp, setid,
               67 PRMVAL = incremental=>false,nochecksum=>false
               68 TEXTNOD = );
               69 TEXTNOD =   krmicd.writeMsg(8008, krmicd.getChid, set_type);
               70 TEXTNOD =   krmicd.writeMsg(8502, to_char(setid), to_char(stamp),
               71 TEXTNOD =                   to_char(stamp2date(stamp)));
               72 TEXTNOD = <<name_files>>
               73 TEXTNOD = -- budf_name
               74 TEXTNOD =  
               75 PRMVAL =  memnum := 1;
               76 TEXTNOD =  
               77 PRMVAL =  dfnumber := 1; fname := '/usr3/oracle/TCL/sapdata1/system_1/system.data1';
               78 TEXTNOD =   if (first_time) then
               79 TEXTNOD =      krmicd.writeMsg(8010, krmicd.getChid);
               80 TEXTNOD =      first_time := FALSE;
               81 TEXTNOD =   end if;
               82 TEXTNOD =   if files < memnum then
               83 TEXTNOD =     begin
               84 TEXTNOD =        sys.dbms_backup_restore.backupDataFile(dfnumber => dfnumber,
               85 PRMVAL = max_corrupt=>0,since_change=>0
               86 TEXTNOD = );
               87 TEXTNOD =        krmicd.writeMsg(8522, to_char(dfnumber, 'FM09999'), fname);
               88 TEXTNOD =     exception
               89 TEXTNOD =        when sys.dbms_backup_restore.inc_scn_matches_df_scn then
               90 TEXTNOD =           krmicd.writeMsg(8522, to_char(dfnumber, 'FM09999'), fname);
               91 TEXTNOD =           krmicd.writeMsg(8056, to_char(dfnumber, 'FM09999'));
               92 TEXTNOD =           krmicd.clearErrors;
               93 TEXTNOD =     end;
               94 TEXTNOD =     files := files + 1;
               95 TEXTNOD =   end if;
               96 TEXTNOD = -- bucf_name
               97 TEXTNOD =   isstby := FALSE;
               98 TEXTNOD =  
               99 PRMVAL =  memnum := 2;
              100 TEXTNOD =  
              101 PRMVAL =  cfname := null;
              102 TEXTNOD =   if (first_time) then
              103 TEXTNOD =      krmicd.writeMsg(8010, krmicd.getChid);
              104 TEXTNOD =      first_time := FALSE;
              105 TEXTNOD =   end if;
              106 TEXTNOD =   if files < memnum then
              107 TEXTNOD =       -- Refresh the snapshot controlfile so that it is reasonably current
              108 TEXTNOD =       -- before backing it up.  This is necessary because it is possible
              109 TEXTNOD =       -- that the snapshot controlfile SCN is zero, indicating that its
              110 TEXTNOD =       -- contents are not valid.
              111 TEXTNOD =       <<snapshot>>  -- retry on failure to get snapshot enqueue
              112 TEXTNOD =       begin
              113 TEXTNOD =         if cfname is null then -- backup current/standby controlfile
              114 TEXTNOD =           sys.dbms_backup_restore.cfileMakeAndUseSnapshot(isstby);
              115 TEXTNOD =           sys.dbms_backup_restore.cfileUseCurrent;
              116 TEXTNOD =         end if;
              117 TEXTNOD =         sys.dbms_backup_restore.backupControlFile(cfname => cfname);
              118 TEXTNOD =       exception
              119 TEXTNOD =         when sys.dbms_backup_restore.snapshot_enqueue_busy then
              120 TEXTNOD =           -- retry up to 5 times, waiting 10 seconds between retries
              121 TEXTNOD =           if busy_retries = 5 then
              122 TEXTNOD =             krmicd.writeMsg(20029, 'cannot make a snapshot controlfile');
              123 TEXTNOD =             raise;
              124 TEXTNOD =           end if;
              125 TEXTNOD =           busy_retries := busy_retries + 1;
              126 TEXTNOD =           krmicd.writeMsg(8512);
              127 TEXTNOD =           krmicd.sleep(10*busy_retries);
              128 TEXTNOD =           krmicd.clearErrors;
              129 TEXTNOD =           goto snapshot;
              130 TEXTNOD =       end;      -- snapshot controlfile stuff
              131 TEXTNOD =     files := files + 1;
              132 TEXTNOD =     if cfname is null then
              133 TEXTNOD =       if isstby then
              134 TEXTNOD =          krmicd.writeMsg(8020);
              135 TEXTNOD =       else
              136 TEXTNOD =          krmicd.writeMsg(8011);
              137 TEXTNOD =       end if;
              138 TEXTNOD =     else
              139 TEXTNOD =       krmicd.writeMsg(8524, cfname);
              140 TEXTNOD =     end if;
              141 TEXTNOD =   end if;
              142 TEXTNOD = -- bu_create
              143 TEXTNOD = <<create_piece>>
              144 TEXTNOD =   sys.dbms_backup_restore.backupStatus(state, setid, stamp, pieceno, files,
              145 TEXTNOD =                                          datafiles, incremental, nochecksum,
              146 TEXTNOD =                                          device);
              147 TEXTNOD =   -- If we get here and the files count is zero, then all files in this
              148 TEXTNOD =   -- backup set were skipped.
              149 TEXTNOD =   if (files = 0) then
              150 TEXTNOD =       sys.dbms_backup_restore.backupCancel;
              151 TEXTNOD =       krmicd.writeMsg(8057, krmicd.getChid);
              152 TEXTNOD =   else
              153 TEXTNOD =       loop
              154 TEXTNOD =           declare
              155 TEXTNOD =               type names is table of varchar2(512) index by binary_integer;
              156 TEXTNOD =               copyaux      number;
              157 TEXTNOD =               fnames       names;
              158 TEXTNOD =               busy_retries number := 0;
              159 TEXTNOD =               fmt          varchar2(512) := NULL;
              160 TEXTNOD =           begin
              161 TEXTNOD =           <<snapshot>>
              162 TEXTNOD =               begin
              163 TEXTNOD =               -- format will substituted for fmt := ' FORM TAG REMOVED at>'
              164 TEXTNOD =              
              165 TEXTNOD =               -- ncopies will substituted for ncopies := <number>
              166 TEXTNOD =              
              167 PRMVAL =  ncopies := 1;
              168 TEXTNOD =               -- Call genPieceName as many times as ncopies, stored
              169 TEXTNOD =               -- generated names into array of fnames.  Check in the
              170 TEXTNOD =               -- array for duplicated names
              171 TEXTNOD =               copy := 0;
              172 TEXTNOD =               while copy < ncopies loop
              173 TEXTNOD =                   begin
              174 TEXTNOD =                   fnames(copy) :=
              175 TEXTNOD =                       krmicd.genPieceName(pno => pieceno+1,
              176 TEXTNOD =                                           set_count => setid,
              177 TEXTNOD =                                           set_stamp => stamp,
              178 TEXTNOD =                                           format => fmt,
              179 TEXTNOD =                                           dupflg => copy+1);
              180 TEXTNOD =    
              181 TEXTNOD =                   -- check previous names for collision
              182 TEXTNOD =                   copyaux := 0;
              183 TEXTNOD =                   while copyaux < copy loop
              184 TEXTNOD =                       if fnames(copy) = fnames(copyaux) then
              185 TEXTNOD =                           raise wrong_format;
              186 TEXTNOD =                       end if;
              187 TEXTNOD =                       copyaux := copyaux + 1;
              188 TEXTNOD =                   end loop;
              189 TEXTNOD =                   -- Store the names of the second copy onwards
              190 TEXTNOD =                   if (copy > 0) then
              191 TEXTNOD =                       sys.dbms_backup_restore.backupPieceCrtDupSet(copy,
              192 TEXTNOD =                                                                 fnames(copy));
              193 TEXTNOD =                   end if;
              194 TEXTNOD =                   exception
              195 TEXTNOD =                       when wrong_format then
              196 TEXTNOD =                           krmicd.writeMsg(11004,
              197 TEXTNOD =                                           'format needs %c when duplexing');
              198 TEXTNOD =                           raise;
              199 TEXTNOD =                   end;
              200 TEXTNOD =                   copy := copy + 1;
              201 TEXTNOD =               end loop;
              202 TEXTNOD =               -- Ok, now do the actual piece creation, we use the 'old'
              203 TEXTNOD =               -- interface
              204 TEXTNOD =               copy := 0;
              205 TEXTNOD =               sys.dbms_backup_restore.backupPieceCreate(fnames(copy),
              206 TEXTNOD =                                                         pieceno,
              207 TEXTNOD =                                                         done,
              208 TEXTNOD =                                                         handle,
              209 TEXTNOD =                                                         comment,
              210 TEXTNOD =                                                         media,
              211 TEXTNOD =                                                         concur,
              212 TEXTNOD =                                                        
              213 PRMVAL = params=>null
              214 TEXTNOD = );
              215 TEXTNOD =               exception
              216 TEXTNOD =                   when sys.dbms_backup_restore.snapshot_enqueue_busy then
              217 TEXTNOD =                   -- retry up to 5 times, waiting 10 seconds between retries
              218 TEXTNOD =                       if busy_retries = 5 then
              219 TEXTNOD =                           krmicd.writeMsg(20029,
              220 TEXTNOD =                                         'cannot make a snapshot controlfile');
              221 TEXTNOD =                           raise;
              222 TEXTNOD =                       end if;
              223 TEXTNOD =    
              224 TEXTNOD =                       busy_retries := busy_retries + 1;
              225 TEXTNOD =                       krmicd.writeMsg(8512);
              226 TEXTNOD =                       krmicd.sleep(10*busy_retries);
              227 TEXTNOD =                       krmicd.clearErrors;
              228 TEXTNOD =                       goto snapshot;
              229 TEXTNOD =               end;
              230 TEXTNOD =           end; -- snapshot controlfile stuff
              231 TEXTNOD =           if ncopies = 1 then
              232 TEXTNOD =               krmicd.writeMsg(8013, krmicd.getChid, to_char(pieceno));
              233 TEXTNOD =           else
              234 TEXTNOD =               krmicd.writeMsg(8095, krmicd.getChid, to_char(pieceno),
              235 TEXTNOD =                               to_char(ncopies));
              236 TEXTNOD =           end if;
              237 TEXTNOD =           copy := 0;
              238 TEXTNOD =           while copy < ncopies loop
              239 TEXTNOD =               if (copy > 0) then
              240 TEXTNOD =                   -- Retrieve output parameters from server structures
              241 TEXTNOD =                   sys.dbms_backup_restore.backupPieceCrtDupGet(copy,
              242 TEXTNOD =                                                                handle,
              243 TEXTNOD =                                                                comment,
              244 TEXTNOD =                                                                media);
              245 TEXTNOD =               end if;
              246 TEXTNOD =               if comment is null then comment := 'NONE'; end if;
              247 TEXTNOD =               krmicd.writeMsg(8503, handle, comment);
              248 TEXTNOD =               copy := copy + 1;
              249 TEXTNOD =           end loop;
              250 TEXTNOD =           if done then
              251 TEXTNOD =              stampd := stamp2date(stamp);
              252 TEXTNOD =              select sysdate-stampd into elapsed from x$dual;
              253 TEXTNOD =       dur2time(elapsed, hours, mins, secs);
              254 TEXTNOD =              krmicd.writemsg(8525, to_char(hours, 'FM09') || ':' ||
              255 TEXTNOD =                               to_char(mins,  'FM09') || ':' ||
              256 TEXTNOD =                               to_char(secs,  'FM09'));
              257 TEXTNOD =              exit;
              258 TEXTNOD =           end if;
              259 TEXTNOD =       end loop;
              260 TEXTNOD =   end if;
              261 TEXTNOD =   first_time := TRUE;  -- in case we will be deleting what we backed up
              262 TEXTNOD = end;
RMAN-03023: executing command: backup

EXEC SQL AT TARGET begin sys . dbms_application_info . set_session_longops ( rindex => :rindex , slno => :slno , op_name => :op_name , context => :context , sofar => :sofar , totalwork => :totalwork , units => :units ) ; end ;
   sqlcode=0
      :b1 = 0
      :b2 = 1
      :b3 = "RMAN: aggregate input"
      :b4 = 3
      :b5 = 0
      :b6 = 25600
      :b7 = "blocks"
krmxpoq: xc=5371934920, action="0000002 FINISHED", col_l=16, ind=0, sid=27
krmxpoq: xc=5371944896, action="0000005 FINISHED", col_l=16, ind=0, sid=30
krmqgns: looking for work for channel default
krmqgns: commands remaining to be executed:
CMD type=backup id=1 status=NOT STARTED
          1 STEP id=1 status=NOT STARTED
krmqgns: no work found for channel default

krmqgns: looking for work for channel sbt
krmqgns: commands remaining to be executed:
CMD type=backup id=1 status=NOT STARTED
          1 STEP id=1 status=NOT STARTED
krmqgns: channel sbt assigned step 1

krmxcis: xc=5371944896 chid=sbt calling pcicmp
krmxr: xc=5371944896 chid=sbt calling peicnt
krmxrpc: xc=5371944896 kpurpc2 rc=0 db=target proc=DBMS_BACKUP_RESTORE.BACKUPSTATUS
krmxrpc: xc=5371944896 RPC #6 completed immediately
krmxrpc: xc=5371944896 kpurpc2 rc=0 db=target proc=DBMS_BACKUP_RESTORE.BACKUPSETDATAFILE
krmxrpc: xc=5371944896 RPC #7 completed immediately
RMAN-08008: channel sbt: starting full datafile backupset
RMAN-08502: set_count=16 set_stamp=518780850 creation_time=22-FEB-04
RMAN-08010: channel sbt: specifying datafile(s) in backupset
krmxrpc: xc=5371944896 kpurpc2 rc=0 db=target proc=DBMS_BACKUP_RESTORE.BACKUPDATAFILE
krmxrpc: xc=5371944896 RPC #8 completed immediately
RMAN-08522: input datafile fno=00001 name=/usr3/oracle/TCL/sapdata1/system_1/system.data1
krmxrpc: xc=5371944896 kpurpc2 rc=0 db=target proc=DBMS_BACKUP_RESTORE.CFILEMAKEANDUSESNAPSHOT
krmxrpc: xc=5371944896 RPC #9 completed immediately
krmxrpc: xc=5371944896 kpurpc2 rc=0 db=target proc=DBMS_BACKUP_RESTORE.CFILEUSECURRENT
krmxrpc: xc=5371944896 RPC #10 completed immediately
krmxrpc: xc=5371944896 kpurpc2 rc=0 db=target proc=DBMS_BACKUP_RESTORE.BACKUPCONTROLFILE
krmxrpc: xc=5371944896 RPC #11 completed immediately
RMAN-08011: including current controlfile in backupset
krmxrpc: xc=5371944896 kpurpc2 rc=0 db=target proc=DBMS_BACKUP_RESTORE.BACKUPSTATUS
krmxrpc: xc=5371944896 RPC #12 completed immediately
krmxrpc: xc=5371944896 kpurpc2 rc=3123 db=target proc=DBMS_BACKUP_RESTORE.BACKUPPIECECREATE
krmxrpc: xc=5371944896 starting longrunning RPC #13 to target: DBMS_BACKUP_RESTORE.BACKUPPIECECREATE
krmxr: xc=5371944896 started long running rpc
krmxpoq: xc=5371944896, action="0000013 STARTED", col_l=15, ind=0, sid=30
krmxr: callback returned TRUE, skipping sleep
krmxpoq: xc=5371944896, action="0000013 STARTED", col_l=15, ind=0, sid=30
krmxr: sleeping for 1 seconds
krmxpoq: xc=5371944896, action="0000013 STARTED", col_l=15, ind=0, sid=30
krmxr: sleeping for 2 seconds
krmxpoq: xc=5371944896, action="0000013 STARTED", col_l=15, ind=0, sid=30
krmxr: sleeping for 4 seconds
krmxpoq: xc=5371944896, action="0000013 STARTED", col_l=15, ind=0, sid=30
krmxr: sleeping for 8 seconds
krmxpoq: xc=5371944896, action="0000013 STARTED", col_l=15, ind=0, sid=30
krmxr: sleeping for 10 seconds
krmxpoq: xc=5371944896, action="0000013 STARTED", col_l=15, ind=0, sid=30
krmxr: sleeping for 10 seconds
krmxpoq: xc=5371944896, action="0000013 STARTED", col_l=15, ind=0, sid=30
krmxr: sleeping for 10 seconds
krmxpoq: xc=5371944896, action="0000013 STARTED", col_l=15, ind=0, sid=30
Re: Online Backup to tape using RMAN gets hung [message #73160 is a reply to message #73157] Mon, 23 February 2004 03:28 Go to previous message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
1.I beleive,
   One restriction IN light LMS (available along with oracle media) is 
   LSM , database and the tapes should be in the same machine.
   or
   tapes cannot be remote. 
   are you using one such software....?

2. is BACKUP_TAPE_IO_SLAVES to FALSE ?

3. Oracle provides a diagnostic tool called sbttest. 
   This utility performs a simple test of the media management software by 
   acting as the Oracle database server and attempting to communicate 
   with the media manager.
   sbttest utility is located in $ORACLE_HOME/bin. Please check that out.

4. did u go through all the steps?
   installing LSM
   integrate rman wiht api library
   create an oracle user in legato
   configure the device
   do rman configurations (like these )
	sqlnet connectivity,registering target databases...etc
	CONFIGURE DEVICE TYPE sbt PARALLELISM 2; 
	CONFIGURE DEFAULT DEVICE TYPE TO sbt;

   and now do backup..
   run { allocate channel channel1 sbt type 'sbt_tape';
         parms 'xxxx_yourvalues_xxxx'
 	 backup
       }

Previous Topic: RMAN for Oracle 7.1
Next Topic: Full backup occured when specified as Incremental
Goto Forum:
  


Current Time: Sat Nov 23 19:24:17 CST 2024