This discussion is archived
1 2 Previous Next 28 Replies Latest reply: Apr 8, 2013 10:15 PM by Hemant K Chitale RSS

Tablespace Point in Time Recovery fails with RMAN-06026:

1001066 Newbie
Currently Being Moderated
I have cataloged with RMAN the datafiles from Snapshot backup. Still it fails with the following error.


RMAN> RECOVER TABLESPACE TSPC UNTIL TIME "to_date('03-apr-2013 02:18:00','dd-mon-yyyy hh24:mi:ss')" AUXILIARY DESTINATION '/tmp/auxpran';

Starting recover at 03-APR-13
using channel ORA_DISK_1
RMAN-05026: WARNING: presuming following set of tablespaces applies to specified point-in-time

List of tablespaces expected to have UNDO segments
Tablespace SYSTEM
Tablespace UNDOTBS1

Creating automatic instance, with SID='Ebgt'

initialization parameters used for automatic instance:
db_name=ORCL
db_unique_name=Ebgt_tspitr_ORCL
compatible=11.2.0.0.0
db_block_size=8192
db_files=200
sga_target=280M
processes=50
db_create_file_dest=/tmp/auxpran
log_archive_dest_1='location=/tmp/auxpran'
#No auxiliary parameter file used


starting up automatic instance ORCL

Oracle instance started

Total System Global Area 292933632 bytes

Fixed Size 1336092 bytes
Variable Size 100666596 bytes
Database Buffers 184549376 bytes
Redo Buffers 6381568 bytes
Automatic instance created
Running TRANSPORT_SET_CHECK on recovery set tablespaces
TRANSPORT_SET_CHECK completed successfully

contents of Memory Script:
{
# set requested point in time
set until time "to_date('03-apr-2013 02:18:00','dd-mon-yyyy hh24:mi:ss')";
# restore the controlfile
restore clone controlfile;
# mount the controlfile
sql clone 'alter database mount clone database';
# archive current online log
sql 'alter system archive log current';
# avoid unnecessary autobackups for structural changes during TSPITR
sql 'begin dbms_backup_restore.AutoBackupFlag(FALSE); end;';
}
executing Memory Script

executing command: SET until clause

Starting restore at 03-APR-13
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=19 device type=DISK

channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: copied control file copy
input file name=/tmp/auxpran/controlbc.ctl
output file name=/tmp/auxpran/ORCL/controlfile/o1_mf_8opkv8v4_.ctl
Finished restore at 03-APR-13

sql statement: alter database mount clone database

sql statement: alter system archive log current

sql statement: begin dbms_backup_restore.AutoBackupFlag(FALSE); end;

contents of Memory Script:
{
# set requested point in time
set until time "to_date('03-apr-2013 02:18:00','dd-mon-yyyy hh24:mi:ss')";
# set destinations for recovery set and auxiliary set datafiles
set newname for clone datafile 1 to new;
set newname for clone datafile 3 to new;
set newname for clone datafile 2 to new;
set newname for clone tempfile 1 to new;
set newname for datafile 5 to
"+DG_DATA/orcl/datafile/tspc.268.811733685";
# switch all tempfiles
switch clone tempfile all;
# restore the tablespaces in the recovery set and the auxiliary set
restore clone datafile 1, 3, 2, 5;
switch clone datafile all;
}
executing Memory Script

executing command: SET until clause

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

renamed tempfile 1 to /tmp/auxpran/ORCL/datafile/o1_mf_temp_%u_.tmp in control file

Starting restore at 03-APR-13
using channel ORA_AUX_DISK_1

One or more auxiliary set datafiles could not be removed

Removing automatic instance
shutting down automatic instance
database dismounted
Oracle instance shut down
Automatic instance removed
auxiliary instance file /tmp/auxpran/ORCL/controlfile/o1_mf_8opkv8v4_.ctl deleted
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 04/03/2013 02:32:55
RMAN-03015: error occurred in stored script Memory Script
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore

Could anyone please reply ASAP?

Regards,
Pranam
  • 1. Re: Tablespace Point in Time Recovery fails with RMAN-06026:
    mseberg Guru
    Currently Being Moderated
    Hello;

    post output of

    RMAN> restore database preview;

    Doing a TSPITR requires a back up of that tablespace and the SYSTEM tablespace. If you don't have datafile 1 you cannot perform this.

    Datafile 1 is pretty much always SYSTEM, looks like you didn't back up system.

    Best Regards

    mseberg
  • 2. Re: Tablespace Point in Time Recovery fails with RMAN-06026:
    Amar_Singh Newbie
    Currently Being Moderated
    You will need system/sysaux/undo tablespace backups along with the tablespace backup of the actual tablespace you need to restore.
  • 3. Re: Tablespace Point in Time Recovery fails with RMAN-06026:
    Levi-Pereira Guru
    Currently Being Moderated
    What you mean "SNAPSHOT BACKUP" on phrase : "I have cataloged with RMAN the datafiles from Snapshot backup."

    Far I as know.. RMAN does not take SNAPSHOT BACKUP.
  • 4. Re: Tablespace Point in Time Recovery fails with RMAN-06026:
    Hemant K Chitale Oracle ACE
    Currently Being Moderated
    What is the relation of the UNTIL time specified versus the time of the datafiles ? (Is this a non-Oracle storage-based Snapshot ?)

    If the UNTIL time is earlier than the datafiles end time, you would get RMAN-06026.


    Hemant K Chitale
  • 5. Re: Tablespace Point in Time Recovery fails with RMAN-06026:
    1001066 Newbie
    Currently Being Moderated
    Snapshot backup is using a third party to create a backup. In my case I created the snapshot of the datafiles and archivelog and cataloged the snapshot datafiles. I am not using RMAN backups.
  • 6. Re: Tablespace Point in Time Recovery fails with RMAN-06026:
    1001066 Newbie
    Currently Being Moderated
    I had created a snapshot of the database(datafiles and archivelogs) and cataloged them.
    CATALOG START WITH "+TBL_DG_DATA/ORCL/DATAFILE/" NOPROMPT;
    catalog start with "+DG_ARCH/ORCL/ARCHIVELOG/" NOPROMPT;

    The time i gave was after the snapshot was created.

    When it failed the first time I created another controlfile using
    sql "alter database backup controlfile to ''/tmp/auxpran/controlbc.ctl''";

    And ran the recover command after the time after i generated this controlfile. Changed nothing else. TSPITR completed successfully. But it had failed first time. Cannot figure how it ran the second time but failed the first time.

    Removing automatic instance
    Automatic instance removed
    auxiliary instance file /tmp/auxpran/ORCL/datafile/o1_mf_temp_8opndd87_.tmp deleted
    auxiliary instance file /tmp/auxpran/ORCL/onlinelog/o1_mf_3_8opnd1o6_.log deleted
    auxiliary instance file /tmp/auxpran/ORCL/onlinelog/o1_mf_2_8opncy32_.log deleted
    auxiliary instance file /tmp/auxpran/ORCL/onlinelog/o1_mf_1_8opncv7d_.log deleted
    auxiliary instance file /tmp/auxpran/ORCL/datafile/o1_mf_sysaux_8opn516p_.dbf deleted
    auxiliary instance file /tmp/auxpran/ORCL/datafile/o1_mf_undotbs1_8opn4j14_.dbf deleted
    auxiliary instance file /tmp/auxpran/ORCL/datafile/o1_mf_system_8opmyvly_.dbf deleted
    auxiliary instance file /tmp/auxpran/ORCL/controlfile/o1_mf_8opmy14q_.ctl deleted
    Finished recover at 03-APR-13
  • 7. Re: Tablespace Point in Time Recovery fails with RMAN-06026:
    1001066 Newbie
    Currently Being Moderated
    Hi Hemanth,

    I didnt get your question.
    I created the snapshot at time :03-apr-2013 02:15:00
    Did recovery at time : 03-apr-2013 02:18:00

    Regards,
    Pranam
  • 8. Re: Tablespace Point in Time Recovery fails with RMAN-06026:
    Hemant K Chitale Oracle ACE
    Currently Being Moderated
    The controlfile must be "aware" of the datafile backups -- i.e. it must be after the end backup (or snapshot in your case).


    Hemant K Chitale
  • 9. Re: Tablespace Point in Time Recovery fails with RMAN-06026:
    1001066 Newbie
    Currently Being Moderated
    Hi Hemanth,

    I took the controlfile backup immediately after snapshot creation using the command ie after snapshot had completed.

    alter database backup controlfile to '/tmp/auxpran/controlbc.ctl'

    Still the controlfile is not aware of the snapshot files.
    I catalog them.Still it is not able to find them.

    Is there any special extra requiste when we use snapshot backup?controlfile pre-requiste?
    Because i see that recovery succeeds the second time as mentioned in one of my replies above.

    Any idea on this would be extremely helpful.

    Edited by: 998063 on Apr 5, 2013 3:12 AM
  • 10. Re: Tablespace Point in Time Recovery fails with RMAN-06026:
    Hemant K Chitale Oracle ACE
    Currently Being Moderated
    The controlfile isn't aware that a "snapshot" has been created. Of course, a CATALOG would register the snapshotted datafiles into the controlfile.

    Recovery should work with the first controlfile backup. There should be no difference between the two controlfile backups.

    However, a snapshot like that isn't either an RMAN Backup or a proper User-Managed Backup (unless you combine it with ALTER DATABASE BEGIN BACKUP and ALTER DATABASE END BACKUP commands).

    Hemant K Chitale

    Edited by: Hemant K Chitale on Apr 8, 2013 9:51 AM
  • 11. Re: Tablespace Point in Time Recovery fails with RMAN-06026:
    1001066 Newbie
    Currently Being Moderated
    Hi Hemanth,

    "a snapshot like that isn't either an RMAN Backup or a proper User-Managed Backup (unless you combine it with ALTER DATABASE BEGIN BACKUP and ALTER DATABASE END BACKUP commands)."

    By this do u mean that while talking a user managed backup the following steps need to be performed?

    ALTER DATABASE BEGIN BACKUP
    Take backup(snapshot in my case)
    ALTER DATABASE END BACKUP
    alter database backup controlfile to '/tmp/auxpran/controlbc.ctl'

    I did the above set of commands, still the auxiliary instance fails to locate the backup datafiles even though I had cataloged the backup datafiles.

    Could you please help me out here if I have missed any step.?

    Regards,
    Pranam
  • 12. Re: Tablespace Point in Time Recovery fails with RMAN-06026:
    Hemant K Chitale Oracle ACE
    Currently Being Moderated
    Yes.

    ALTER DATABASE BEGIN BACKUP
    Create Backup (snapshot)
    ALTER DATABASE END BACKUP
    ALTER DATABASE BACKUP CONTROLFILE
    at Auxiliary instance, mount controlfile
    CATALOG START WITH


    should suffice for a DUPLICATE DATABASE.

    If it is failing in your environment, something is going wrong.

    Hemant K Chitale
  • 13. Re: Tablespace Point in Time Recovery fails with RMAN-06026:
    1001066 Newbie
    Currently Being Moderated
    Hi Hemanth,

    "at Auxiliary instance, mount controlfile
    CATALOG START WITH"

    Do you mean I need to catalog controlfile also?
    How to mount specifically to the duplicate database?
    While using the 'auxiliary destination' clause TSPITR does not allow to mount the controlfile. It picks up the controlfile from backup piece area and restores the controlfile to the auxiliary destination.
    Do I need to manually create the auxiliary instance and manually start the auxiliary database from RMAN?

    Regards,
    Pranam

    Edited by: 998063 on Apr 7, 2013 11:40 PM
  • 14. Re: Tablespace Point in Time Recovery fails with RMAN-06026:
    Hemant K Chitale Oracle ACE
    Currently Being Moderated
    As I've said, the controlfile (and it's backup) is not aware of the snapshot that you've created (it only knows the original datafiles in the original filesystem).

    To make it aware of the snapshot as datafile backups, you have to CATALOG the datafiles into the controlfile. So, you'll have to replace the controlfile backup with a new one that has the datafile backups CATALOGged in it.


    (In a normal RMAN Backupset scenario, the controlfile backup / autobackup created at the end of the database backup is aware of the RMAN Backupsets so you do not have to re-CATALOG the Backuppieces. However, your snapshot scenario is different).


    Hemant K Chitale

    Edited by: Hemant K Chitale on Apr 8, 2013 2:44 PM
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points