Database restore with just one backup set

Hallo experts,
I got a big problem with restoring my XE database. I have a newly created full backup from my XE. While saving the flashback_area I got a hard crash on my system but I saved the last backup set file on a server. Unfortunately I was not able to save other backup sets and I think, there was a special backup of my control files. The restore on another system does not work because of invalid piece.
The data of this database is necessary for my work. Is there anybody out there who can help to restore the data with the existing backup set.
I did not change the entire structure of my original XE database. I only created to schemas with data in. is there any solution to restore the data.
Thanks for any help.
Holger

Hi you all,
I think that somebody will be interested in the solution of my problem,so I post it here and in german on my website (www.datacubus.de).
My XEdatabase is successfully restored and I walked through some undocumented and not supported features of ORACLE to win the challenge.
The first fact is, that ORACLE XE has a very static structure if you use it as is. The datafiles are predefined and so a manual restore with a foreign backup piece seems to be possible.
Here is my way:
Create a backup of your controlfile
ALTER DATABASE BACKUP CONTROLFILE TO TRACE;
Shutdown your database
shutdown immediate
Start the database in nomount mode
[holger@MSA04071]$ rman nocatalog target /
RMAN> startup force nomount;
RMAN> quit
Restore the datafiles
I used the following script to restore the datafiles from the backup piece without any check:
declare
devtype varchar2(256);
v_file varchar2(255);
done boolean;
begin
v_file:='/usr/lib/oracle/xe/app/oracle/flash_recovery_area/XE/backupset/o1_mf_nnndf_TAG20070420T234848_32lfb0w9_.bkp';
devtype:= dbms_backup_restore.DeviceAllocate(type => '',ident => 'D1');
dbms_backup_restore.RestoreSetDatafile;
dbms_backup_restore.RestoreDatafileTo(dfnumber => 1,toname=>'/usr/lib/oracle/xe/oradata/XE/system.dbf');
dbms_backup_restore.RestoreDatafileTo(dfnumber => 2,toname=>'/usr/lib/oracle/xe/oradata/XE/undo.dbf');
dbms_backup_restore.RestoreDatafileTo(dfnumber => 3,toname=>'/usr/lib/oracle/xe/oradata/XE/sysaux.dbf');
dbms_backup_restore.RestoreDatafileTo(dfnumber => 4,toname=>'/usr/lib/oracle/xe/oradata/XE/users.dbf');
dbms_backup_restore.RestoreBackupPiece(done => done,handle => v_file,params => null);
dbms_backup_restore.DeviceDeallocate;
end;
Start this script as sysdba. But by carefull. This only works if no entire change of datafiles had taken place!
Reset DBID
Because of the saved DBID within the datafile, the database can't be opened. But there is a little trick for resetting the DBID.
shutdown;
startup mount;
execute dbms_backup_restore.zeroDbid(0);
shutdown normal;
Delete or rename existing Controlfile
Edit trace file
You have to modify your controlfile script as follows:
1. Only use the CREATE CONTROLFILE... block
2. Delete RECOVER DATABASE block
3. Replace REUSE with SET
4. Replace NORESETLOGS with RESETLOGS
Create new control file
Use the CREATE CONTROLFILE block for creation of a new control file.
Open Database
alter database open resetlogs;
Much work but all my data is back and now I will backup the whole flashback_area to avoid further nightmares.
Bye
Holger

Similar Messages

  • Database restore  from a particular backup set using rman

    Hi all,
    My OS: UNIX
    DB : 10.2.0.1
    As i checked the database it will indicate datafile 5 is header corruption.
    yesterday i take complete online backup of the database using RMAN but now when i run restore database command it will show as
    ORA-19870: error reading backup piece /cms/BACKUP/ora_BSCS_set149_piece1_20111206_4lmth1qj_1_1
    ORA-19573: cannot obtain exclusive enqueue for datafile 6
    Database is open and datafile is physically present there
    So can anyone tell what to do next
    Edited by: Vikas Kohli on Dec 9, 2011 9:58 AM

    here are the result for the same:
    Starting restore at 09-DEC-11
    using channel ORA_DISK_1
    List of Backup Sets
    ===================
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    147 Incr 0 1.10G DISK 00:14:10 06-DEC-11
    BP Key: 147 Status: AVAILABLE Compressed: YES Tag: TAG20111206T085858
    Piece Name: /cms/BACKUP/ora_BSCS_set149_piece1_20111206_4lmth1qj_1_1
    List of Datafiles in backup set 147
    File LV Type Ckp SCN Ckp Time Name
    1 0 Incr 9068988016235 06-DEC-11 /u01/app/oracle/oradata/BSCS/system01.dbf
    2 0 Incr 9068988016235 06-DEC-11 /u01/app/oracle/oradata/BSCS/undotbs01.dbf
    3 0 Incr 9068988016235 06-DEC-11 /u01/app/oracle/oradata/BSCS/sysaux01.dbf
    4 0 Incr 9068988016235 06-DEC-11 /u01/app/oracle/oradata/BSCS/users01.dbf
    5 0 Incr 9068988016235 06-DEC-11 /u01/app/oracle/oradata/BSCS/DATA.dbf
    6 0 Incr 9068988016235 06-DEC-11 /u01/app/oracle/oradata/BSCS/users02.dbf
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    149 Incr 1 11.49M DISK 00:00:07 07-DEC-11
    BP Key: 149 Status: AVAILABLE Compressed: YES Tag: TAG20111207T082737
    Piece Name: /cms/BACKUP/ora_BSCS_set151_piece1_20111207_4nmtjkbr_1_1
    List of Datafiles in backup set 149
    File LV Type Ckp SCN Ckp Time Name
    1 1 Incr 9068988069143 07-DEC-11 /u01/app/oracle/oradata/BSCS/system01.dbf
    2 1 Incr 9068988069143 07-DEC-11 /u01/app/oracle/oradata/BSCS/undotbs01.dbf
    3 1 Incr 9068988069143 07-DEC-11 /u01/app/oracle/oradata/BSCS/sysaux01.dbf
    4 1 Incr 9068988069143 07-DEC-11 /u01/app/oracle/oradata/BSCS/users01.dbf
    5 1 Incr 9068988069143 07-DEC-11 /u01/app/oracle/oradata/BSCS/DATA.dbf
    6 1 Incr 9068988069143 07-DEC-11 /u01/app/oracle/oradata/BSCS/users02.dbf
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    151 Incr 1 115.07M DISK 00:01:24 08-DEC-11
    BP Key: 151 Status: AVAILABLE Compressed: YES Tag: TAG20111208T075327
    Piece Name: /cms/BACKUP/ora_BSCS_set153_piece1_20111208_4pmtm6nn_1_1
    List of Datafiles in backup set 151
    File LV Type Ckp SCN Ckp Time Name
    1 1 Incr 9068988123314 08-DEC-11 /u01/app/oracle/oradata/BSCS/system01.dbf
    2 1 Incr 9068988123314 08-DEC-11 /u01/app/oracle/oradata/BSCS/undotbs01.dbf
    3 1 Incr 9068988123314 08-DEC-11 /u01/app/oracle/oradata/BSCS/sysaux01.dbf
    4 1 Incr 9068988123314 08-DEC-11 /u01/app/oracle/oradata/BSCS/users01.dbf
    5 1 Incr 9068988123314 08-DEC-11 /u01/app/oracle/oradata/BSCS/DATA.dbf
    6 1 Incr 9068988123314 08-DEC-11 /u01/app/oracle/oradata/BSCS/users02.dbf
    no backup of log thread 1 seq 411 lowscn 9068988025356 found to restore
    no backup of log thread 1 seq 412 lowscn 9068988167985 found to restore
    no backup of log thread 1 seq 413 lowscn 9068988203392 found to restore
    List of Archived Log Copies
    Key Thrd Seq S Low Time Name
    263 1 3 A 05-DEC-11 /u01/app/oracle/admin/BSCS/arch/BSCS/1_3_769127125.dbf
    273 1 13 A 07-DEC-11 /u01/app/oracle/admin/BSCS/arch/BSCS/1_13_769127125.dbf
    Media recovery start SCN is 9068988123314
    Recovery must be done beyond SCN 9068988123314 to clear data files fuzziness
    Finished restore at 09-DEC-11

  • RESTORE detected an error on page (0:0) in database as read from the backup set

    Hello Experts-
    I am facing a very bizarre situations here, I was trying to restore a database from server 1 to server 2, first I take backup manually and then copy the backup to the server 2 location and restore it easily, I do this all the time but now I am getting this
    error:"RESTORE detected an error on page (0:0) in database <database>as read from the backup set</database>". So I tried to verify the backup with restore verify only and I get the message the data is invalid. Here is the bizarre part,
    I tried to restore the same database from the backup taken by my backup job automatically and it worked and I restore verify the data and it is valid. So, anytime I took a manual backup and try to restore it I get an error, but I can restore the backup from
    my backup job, please advise and share your experience , thank you.

    it is a dynamic query that runs and take backup of all the dbs except the one we don't want, and the version is sql server 2012 sp1 on server. Part of the backup query
    SET
    @fileName = @path 
    +'\'+
    @name+'_'
    + @fileDate
    +
    '.BAK';
    BACKUP
    DATABASE @name
    TO
    DISK
    = @fileName
    WITH
    COMPRESSION,
    INIT   
    end

  • With just ONE inatentive sweep of my finger one page of my note was disappeared! Is there any way it can be recovered without using the help of iCloud backup?

    1. With just ONE inattentive sweep of my finger one page of my note disappered. Further more, the same page in my iPad was deleted automatically too! How could this happen? Is there any way it can be recovered without using the backup feature from iCloud? The data is vey important to me?
    2. I havn't connect the power code to my iPad yet, the backup copy in the iClout was before the accident as I checked in iPad. Is there any way that I could open my notes in iCloud backup so that I can copy the missing page and move back to my iPad and iPhone?
    Thanks a lot for any help!
    Xueyu

    Sorry, no. The only way to restore this note is to restore from a backup that contains it.

  • Can not restore data files from backup set

    I am trying to restore Server A's backup data to Server B (they are all oracle11g) using rman. The restore commands is below:
    rman target /;
    shutdown immediate;
    startup nomount;
    restore controlfile from '/usr/local/oracle/backup/20100418/ctl_xxx'
    alter database mount;
    catalog start with '/usr/local/oracle/backup/20100418/';
    restore database;
    recover database;
    alter database open resetlogs;
    For the first time, it works. But when i tried to restore another backup data by the same way:
    rman target /;
    shutdown immediate;
    startup nomount;
    restore controlfile from '/usr/local/oracle/backup/20100425/ctl_xxx'
    alter database mount;
    catalog start with '/usr/local/oracle/backup/20100425/';
    restore database;
    recover database;
    alter database open resetlogs;
    The second time, i found that rman restore the old backup data, which means that it restore the data file under '/usr/local/oracle/backup/20100418/' instead of '/usr/local/oracle/backup/20100425/'.
    So I run 'list backup of database summary' to see the backup set lists in control file.
    List of Backups
    ===============
    Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
    910 B 0 A DISK 18-APR-10 1 1 NO TAG20100418T020007
    945 B 0 A DISK 25-APR-10 1 1 NO TAG20100425T020007
    But when i run ‘restore database preview summary’ to see the backup set list to restore
    List of Backups
    ===============
    Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
    910 B 0 A DISK 18-APR-10 1 1 NO TAG20100418T020007
    there's no backup set 945 at all. that's why i could not restore data file under '/usr/local/oracle/backup/20100425/' at the second time.
    So, why two backup list is different ? how can i restore datafile under '/usr/local/oracle/backup/20100425/' ?
    My backup script is below:
    run{
    allocate channel c1 type disk;
    backup incremental level 0 as backupset format '$DIR/`date +%Y%m%d`/data_%d_c0_%T_%u' database;
    sql 'alter system archive log current';
    backup archivelog from time 'sysdate-14' format '$DIR/`date +%Y%m%d`/log_%d_%T_%u';
    backup current controlfile format '$DIR/`date +%Y%m%d`/ctl_%d_%T_%I_%u';
    release channel c1;
    Thanks
    Edited by: user13055376 on 2010-4-29 上午1:20

    yeah, I am sure Tag: TAG20100425T020007 exists
    RMAN> list backupset 945;
    List of Backup Sets
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    945 Incr 0 6.40G DISK 00:05:46 25-APR-10
    BP Key: 945 Status: AVAILABLE Compressed: NO Tag: TAG20100425T020007
    Piece Name: /usr/local/oracle/backup/20100425/data_QIANGL_c0_20100425_thlbvjt7
    List of Datafiles in backup set 945
    File LV Type Ckp SCN Ckp Time Name
    1 0 Incr 2498880165194 25-APR-10 /usr/local/oracle/oradata/qiangl/system01.dbf
    2 0 Incr 2498880165194 25-APR-10 /usr/local/oracle/oradata/qiangl/sysaux01.dbf
    3 0 Incr 2498880165194 25-APR-10 /usr/local/oracle/oradata/qiangl/undotbs01.dbf
    4 0 Incr 2498880165194 25-APR-10 /usr/local/oracle/oradata/qiangl/users01.dbf
    5 0 Incr 2498880165194 25-APR-10 /usr/local/oracle/oradata/qiangl/dict01.dbf
    6 0 Incr 2498880165194 25-APR-10 /usr/local/oracle/oradata/qiangl/support01.dbf
    7 0 Incr 2498880165194 25-APR-10 /usr/local/oracle/oradata/qiangl/supportindex01.dbf
    8 0 Incr 2498880165194 25-APR-10 /usr/local/oracle/oradata/qiangl/log01.dbf
    9 0 Incr 2498880165194 25-APR-10 /usr/local/oracle/oradata/qiangl/logindex01.dbf
    10 0 Incr 2498880165194 25-APR-10 /usr/local/oracle/oradata/qiangl/lobindex01.dbf
    11 0 Incr 2498880165194 25-APR-10 /usr/local/oracle/oradata/qiangl/data01.dbf
    12 0 Incr 2498880165194 25-APR-10 /usr/local/oracle/oradata/qiangl/indexes01.dbf
    13 0 Incr 2498880165194 25-APR-10 /usr/local/oracle/oradata/qiangl/image001.dbf
    14 0 Incr 2498880165194 25-APR-10 /usr/local/oracle/oradata/qiangl/tongbuimage001.dbf
    15 0 Incr 2498880165194 25-APR-10 /usr/local/oracle/oradata/qiangl/imagebackup001.dbf
    My purpose is to use the newest backupset of Server A to update Server B. So if Server A crush, Server B will be useful. Is there any other way to do that ?
    retention policy :'configure retention policy to redundancy 4'
    And Server A do LV0 backup every 7 day, and do LV1 backup ervery other day.
    Edited by: user13055376 on 2010-4-29 上午3:45

  • You can download past purchases on this computer with just one Apple ID every 90 days

    I have a mac which my fiancee and I share. There are 2 separate accounts and 2 separate apple ids used to buy different music (i.e. we have 2 separate iphones and music collections).
    I received the following error (see uploaded image) which states that, "you can download past purchases on this computer with just one Apple ID every 90 days".
    Now, when I sync my iTunes and iPhone only some music that I have previously purchases is affected. For some reason they failed to sync with my iPhone and become unavailable in my iTunes ("file cannot be found"). When I deleted the record I saw that it became available for download in iTunes and then discovered this issue.
    I have legally purchased the music and just want to be able to sync the files legitimately. It just seems very restrictive to say that you have to have 2 different machines for every account (i.e. you cannot have multiple users on a device with their own accounts which each have their own Apple IDs).
    Mikhail

    Hi
    No - that is the issue - both my husband and I use the same computer and want to be able to use our individual Apple IDs so can access our download content e.g. I-books that we have purchased through our other MAC devices such as I-Pad.  In the past, we had four people using one computer with no problem regarding Apple ID.   In the newer operating system, we are now restricted to one at a time - it means one of us is blocked out from accessing our content for a period of 90 days.   Have you any suggestions on how we can both use our individual Apple IDs with the same lap-top?  We have set up discrete accounts so we log on to the computer individually.  Many thanks for any help.

  • You can download past purchases on this computer with just one Apple ID every 90 days. This computer can be used with a different Apple ID in 71 days. Whats the deal???

    You can download past purchases on this computer with just one Apple ID every 90 days. This computer can be used with a different Apple ID in 71 days. Whats the deal???

    You can use multiple AppleIDs to purchase new music but you are limited as to how frequently you can change authorizations for re-downloading  past purchases.  It may well be a measure to deter piracy by stopping a group of people from going around to a friend's computer and downloading purchases on the other person's computer.  It is easy to avoid by making sure you have backup copies on drives at home so you never need to redownload anything.

  • You can download past purchases on this computer with just one Apple ID every 90 days. You cannot associate this computer with a different Apple ID for 60 days. Why?

    You can download past purchases on this computer with just one Apple ID every 90 days. You cannot associate this computer with a different Apple ID for 60 days.  How can I use more than one apple ID with one MacBook pro ?

    Hi
    No - that is the issue - both my husband and I use the same computer and want to be able to use our individual Apple IDs so can access our download content e.g. I-books that we have purchased through our other MAC devices such as I-Pad.  In the past, we had four people using one computer with no problem regarding Apple ID.   In the newer operating system, we are now restricted to one at a time - it means one of us is blocked out from accessing our content for a period of 90 days.   Have you any suggestions on how we can both use our individual Apple IDs with the same lap-top?  We have set up discrete accounts so we log on to the computer individually.  Many thanks for any help.

  • You can download past purchases on this computer with just one Apple ID every 90 days. This computer can be used with a different Apple ID in 60 days. This is the message I get when trying to view purchased material!  My ID hasn't changed!

    I can't pull up purchased content without this - You can download past purchases on this computer with just one Apple ID every 90 days. This computer can be used with a different Apple ID in 60 days. - my ID hasn't changed

    You can use multiple AppleIDs to purchase new music but you are limited as to how frequently you can change authorizations for re-downloading  past purchases.  It may well be a measure to deter piracy by stopping a group of people from going around to a friend's computer and downloading purchases on the other person's computer.  It is easy to avoid by making sure you have backup copies on drives at home so you never need to redownload anything.

  • You can download past purchases on this computer with just one Apple ID every 90 days. You cannot associate this computer with a different Apple ID for 74 days.

    You can download past purchases on this computer with just one Apple ID every 90 days. You cannot associate this computer with a different Apple ID for 74 days.
    What does that mean ???

    Hi
    No - that is the issue - both my husband and I use the same computer and want to be able to use our individual Apple IDs so can access our download content e.g. I-books that we have purchased through our other MAC devices such as I-Pad.  In the past, we had four people using one computer with no problem regarding Apple ID.   In the newer operating system, we are now restricted to one at a time - it means one of us is blocked out from accessing our content for a period of 90 days.   Have you any suggestions on how we can both use our individual Apple IDs with the same lap-top?  We have set up discrete accounts so we log on to the computer individually.  Many thanks for any help.

  • HT204053 I want to play newly purchased music but cant, i get the message "You can use iTunes Match on this computer with just one Apple ID every 90 days. (mobileme family pack is the problem i think)

    I purchase a new album on my phone but then cannot download it to my laptop -  I get the message:
    "You can use iTunes Match on this computer with just one Apple ID every 90 days. All I can think is that the problem stems from purchasing a mobileme family & some of the music being my daughters. (she is 9 & I need to be ble to listen to more than Katy Perry & Justin Bieber) Please help! :-(

    Welcome to the Apple Community.
    Youll get that message when you change the iTunes account you are logged into, you can't keep changing it.

  • I have a Mac OSX version 10.75 with just one Thunderbolt port. and it has been my Thunderbolt port to connect with Blackmagic wear my intensity. and I no longer can use the port for mini-DVI adapter to connect with me. I do not want to ask any other way f

    i have a Mac OSX version 10.75 with just one Thunderbolt port. and it has been my Thunderbolt port to connect with Blackmagic wear my intensity. and I no longer can use the port for mini-DVI adapter to connect with me. I do not want to ask any other way for me to use to use my monitor. I monitor LG FLATRON E2041 brand .. PLEASE Helpp ME

    i have a Mac OSX version 10.75 with just one Thunderbolt port. and it has been my Thunderbolt port to connect with Blackmagic wear my intensity. and I no longer can use the port for mini-DVI adapter to connect with me. I do not want to ask any other way for me to use to use my monitor. I monitor LG FLATRON E2041 brand .. PLEASE Helpp ME

  • You can download past purchases on this computer with just one Apple ID every 90 days. You cannot associate this computer with a different Apple ID for 90 days.

    So i signed into my other itunes account to download some purchase i had made on that account, went to sign back into my new account and download purchases i had made on my iphone adn it tells me "You can download past purchases on this computer with just one Apple ID every 90 days. You cannot associate this computer with a different Apple ID for 90 days.". This is a shared family computer with multiple Apple IDs being used on it. Not cool apple. This needs to be figured out. Not acceptable for families that have more than one apple ID to have to wait 3 months to download old purchases. Get real. Any way i can 'override' this?

    http://support.apple.com/kb/ht4627
    http://www.apple.com/feedback/
    Contact itunes support.  They may grant a one time exception at their discretion.
    https://getsupport.apple.com

  • I have two Apple IDs - one associated with iPad and iPhone and the other associated with iMac and MacAir. I am going to lose the former e-mail address imminently and would like to associate all devices with just one ID. How do I do this? Thanks

    I have two Apple IDs - one associated with iPad and iPhone and the other associated with iMac and MacAir. I am going to lose the former e-mail address imminently and would like to associate all devices with just one ID. How do I do this? Thanks

    Thanks - I guess it is like there were two of me!
    I bought the iPhone first and it seemed natural to link it to the (work) e-mail address which was in constant use. The iMac for home use came next and it seemed natural to use my home e-mail address, particularly as I knew by then that I would lose the work address after my imminent retirement. The same logic went for the recent puchase of the MacAir. I am not sure what happened with the iPad (also a recent purchase) - iTunes seemed to puch me towards the same ID as the iPhone.
    It is not a huge problem - just makes my persona look schizoid! Otherwise very happy with everything Apple.

  • HT201272 I just updated to itunes 10.3 & iOS 6.1 and I cannot download a song to my library! I get the error "This computer is already associated with an Apple ID. You can download past purchases on the computer with just one apple ID every 90 days..." WH

    I just updated to itunes 10.3 & iOS 6.1 and I cannot download a song to my library! I get the error "This computer is already associated with an Apple ID. You can download past purchases on the computer with just one apple ID every 90 days. This computer can be used with a different Apple ID in 75 days." WHAT??
    I've never had problems before - my husband and I have used the same library for years.  My daughter also has her own Apple ID... are we going to have trouble with that, too?  Actually we have 4 Apple IDs - somewhere around 8 Apple devices... this is a huge issue for us... HELP

    Just to be clear - I just bought a new song and can't download it into the library because of this error message.

Maybe you are looking for