Restore datafile

Hello,
Initial situation and config:
Server: Win2k3 Sp1 32bits
Database: 10.2.0.4 Standard noarchivelog mode
RMAN catalog on diferent server.
Backup full cold
From that point, I've been asked to make a restore from a database backup. What it's needed is to restore the spfile, controlfile, and one datafile from a full backup done via RMAN. There's NOT INTENTION to use them, they just want to see them restored from the backup.
Restoring the spfile and the controlfile is not a problem, and I've been able to restore them to a Test directory. But since I can't do Restore datafile 1 TO 'C:\dest', I've been searching how to acomplish these.
I've come with these, which I think that should restore a datafile to a diferent location, but I'm not sure if it's correct. And since I've to launch on the database server, I prefer asking first.
Set newname for 'C:\datafiles\datafile1.dbf' to 'C:\Test\datafile1.dbf';
restore datafile 'C:\Test\datafile1.dbf'
Would that work? It should be executed with database on open state and working, and should'nt afect in any way it. If not, can anyone help me there? The only thing needed it's basically restore a datafile just to se it can be done...
Thanks for any advice!

Naerbon wrote:
But in fact I don't want to change the controlfile info. I haven't explained it well enought.
I just want to restore the datafile, and not use it, just have it restored. I mean, after restoring it, I will have:
C:\datafiles\datafile1.dbf --> Datafile original from the database, online and beeing used by the database
C:\Test\datafile1.dbf --> Restored datafile, not for using, database don't have to see it, or know about it.
It's like I need to restore it, but not for using it, or for opening a database with it. So controlfiles mustn't change. It should be a process totally apart from the database, just like the spfile restore, which just restores the spfile from last backup on a location.
With "switch datafile all;", controlfile changes, but without switching it would just create C:\Test\datafile1.dbf and "ignore" it?
Hope I've explained better this time, and thanks for the advices!Then don't use switch command and restore the datafile using SET NEWNAME command

Similar Messages

  • Need immediately script for Restore Datafiles from TAPE  Please.

    Hi All,
    Could you please provide me the script to restore 10 datafiles using RMAN which are stored on tape.

    Hi!
    1. Restore the whole database:
    run {
    allocate channel t1 type "sbt_tape" parms 'ENV=(TDPO_OPTFILE=/path/to/your/client/tdpo_file)';
    restore database;
    release channel t1;
    2. Restore a tablespace: (In the Example the USERS tablespace will be restored)
    run {
    allocate channel t1 type "sbt_tape" parms 'ENV=(TDPO_OPTFILE=/path/to/your/client/tdpo_file)';
    restore tablespace users;
    release channel t1;
    3. Restore a datafile: (In the example teh datafile number 5 will be restored)
    run {
    allocate channel t1 type "sbt_tape" parms 'ENV=(TDPO_OPTFILE=/path/to/your/client/tdpo_file)';
    restore datafile 5;
    release channel t1;
    In the above examples:
    - you need to change the location of your TDPO config file.
    - the database/tablespace/datafile will be only restored and not will be recovered
    Best Regards
    Norbert

  • Restore datafile 1

    hi all ,
    can you please see my senario
    i have test server that's colne of production server now i need to restore datafile 1 to test server
    RMAN> list backup summary;
    using target database control file instead of recovery catalog
    List of Backups
    ===============
    Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
    1 B F A DISK 08-AUG-11 1 1 NO TAG20110808T113818
    2 B F A DISK 11-MAR-12 1 1 YES TAG20120311T020022
    3 B F A DISK 11-MAR-12 1 1 YES TAG20120311T020022
    4 B F A DISK 11-MAR-12 1 1 YES TAG20120311T020022
    RMAN> crosscheck backup of datafile 1;
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=158 devtype=DISK
    crosschecked backup piece: found to be 'AVAILABLE'
    backup piece handle=/tmp/TABS20120311AGbon5im1u_1_1 recid=14 stamp=777681421
    Crosschecked 1 objects
    RMAN> restore datafile 1;
    Starting restore at 12-MAR-12
    using channel ORA_DISK_1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 03/12/2012 21:02:26
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 1 found to restore
    RMAN> run {
    2> set newname for datafile 1 to '/ccbs/archv';
    3> restore datafile 1;
    4> switch datafile 1;
    5> recover datafile 1;
    6> }
    executing command: SET NEWNAME
    Starting restore at 12-MAR-12
    using channel ORA_DISK_1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 03/12/2012 21:03:24
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 1 found to restore
    RMAN> list incarnation of database;
    List of Database Incarnations
    DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
    1 1 TABSTSTD 2991124567 CURRENT 2697694038 19-JUL-10
    RMAN>
    please advice

    861100 wrote:
    thanks but the full backup include the datafile 1 i check it
    see please
    RMAN> run {
    set newname for datafile 1 to '/ccbs/archv';
    set until time "to_date('04/09/2011 13:00:00','dd/mm/yyyy hh24:mi:ss')";So you want to recover up to Sept 4, 2011. Is your backup prior to that point?
    restore datafile 1;
    switch datafile 1;
    recover datafile 1;
    }2> 3> 4> 5> 6> 7>
    executing command: SET NEWNAME
    using target database control file instead of recovery catalog
    executing command: SET until clause
    Starting restore at 12-MAR-12
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=156 devtype=DISK
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 03/12/2012 21:31:41
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 1 found to restore
    RMAN> list incarnation;
    List of Database Incarnations
    DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
    1 1 TABSTSTD 2991124567 CURRENT 2697694038 19-JUL-10
    RMAN> run {
    set newname for datafile 1 to '/ccbs/archv';
    set until time "to_date('18/07/10 13:00:00','dd/mm/yyyy hh24:mi:ss')";Now you want to recover to July 18, 2010. Why the change of dates? And again, do you have a full backup prior to July 18, 2010, along with all necessary incremental and or archivelogs between that full backup and July 18, 2010?
    restore datafile 1;
    switch datafile 1;
    recover datafile 1;
    2> 3> 4> 5> 6> 7>
    executing command: SET NEWNAME
    executing command: SET until clause
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of set command at 03/12/2012 21:32:52
    RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time
    RMAN> run {
    set newname for datafile 1 to '/ccbs/archv';
    set until time "to_date('20/07/10 13:00:00','dd/mm/yyyy hh24:mi:ss')";Now you want to recover to July 20, 2010. Why the change of dates? And again, do you have a full backup prior to July 20, 2010, along with all necessary incremental and or archivelogs between that full backup and July 20, 2010?
    restore datafile 1;
    switch datafile 1;
    recover datafile 1;
    2> 3> 4> 5> 6> 7>
    executing command: SET NEWNAME
    executing command: SET until clause
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of set command at 03/12/2012 21:33:21
    RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time

  • RMAN-06085: must use SET NEWNAME command to restore datafile 'MISSING00'

    Tried to restore again but got this message.
    RMAN-06085: must use SET NEWNAME command to restore datafile /oracle/Ora11g/dbs/MISSING00126

    no, im not restoring datafile to different location.
    this is what i encounter after a successfull restore and but failed recover.
    My original post is on the other thread.
    i was just desperate to start a new thread since there are nobody but only one who replied
    Hope you could go to that thread and help me... topic: (Success on RESTORE but failed on RECOVER-- need help)
    thanks in advance...

  • Error after Restoring Datafiles in Archivelog but missing archive log files

    Hi all,
    I have taken backup yesterday monrning in Archive log mode but have lost all the archive log files. Yesterday night i have restored my DB .
    I m happy to have my datafile contents till yesterday morning.
    But after restoring when i try to open th DB, i m facing the following errors:
    SQL>          Startup open;
    Oracle instance started but in mounted stagell
    ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
    SQL>         alter database open resetlogs;
    Error: ORA-01113: file 1 needs media recovery
              ORA-01110: data file 1: 'E:\oracle\'<SID>\sapdata1\SYSTEM_1\SYSTEM.DATA1'
    SQL>         recover database using backup controlfile until cancel;
    ORA-00279 : change 26627919 generated at DATE TIMEneeded for thread 1
    ORA-00289 : Suggestion E:\ORACLE\<SID>\ORAARCH\<SID>ARCHARC03020_0683715008.001
    ORA-00280: change 266277189 for thread 1 is in sequence #3020
    ORA - 01112: media recovery not started
    SQL>   recover;
    ORA-00283: recovery session cancelled due to errors
    ORA-01610: recovery using the BACKUP CONTROLFILE option must be done
    Alert Log File:
    Starting up ORACLE RDBMS Version: 10.2.0.2.0.
    System parameters with non-default values:
      processes                = 80
      sessions                 = 96
      event                    = 10191 trace name context forever, level 1
      sga_max_size             = 633339904
      shared_pool_size         = 301989888
      shared_pool_reserved_size= 30183260
      filesystemio_options     = setall
      control_files            = E:\ORACLE\IE6\ORIGLOGA\CNTRL\CNTRLIE6.DBF, E:\ORACLE\IE6\ORIGLOGB\CNTRL\CNTRLIE6.DBF, E:\ORACLE\IE6\SAPDATA1\CNTRL\CNTRLIE6.DBF
      control_file_record_keep_time= 30
      db_block_size            = 8192
      db_cache_size            = 301989888
      compatible               = 10.2.0
      log_archive_dest         = E:\oracle\IE6\oraarch\IE6arch
      log_buffer               = 2854912
      log_checkpoint_interval  = 0
      db_files                 = 254
      log_checkpoints_to_alert = TRUE
      dml_locks                = 4000
      undo_management          = AUTO
      undo_tablespace          = PSAPUNDO
      undo_retention           = 43200
      recyclebin               = off
      remote_os_authent        = TRUE
      remote_login_passwordfile= EXCLUSIVE
      job_queue_processes      = 1
      background_dump_dest     = E:\ORACLE\IE6\SAPTRACE\BACKGROUND
      user_dump_dest           = E:\ORACLE\IE6\SAPTRACE\USERTRACE
      core_dump_dest           = E:\ORACLE\IE6\SAPTRACE\BACKGROUND
      optimizer_features_enable= 10.2.0.1
      sort_area_size           = 2097152
      sort_area_retained_size  = 0
      db_name                  = IE6
      open_cursors             = 800
      optimpeek_user_binds   = FALSE
      pga_aggregate_target     = 402443468
      workarea_size_policy     = AUTO
      statistics_level         = typical
    PMON started with pid=2, OS id=804
    PSP0 started with pid=3, OS id=9580
    MMAN started with pid=4, OS id=5840
    DBW0 started with pid=5, OS id=8136
    LGWR started with pid=6, OS id=8712
    CKPT started with pid=7, OS id=1620
    SMON started with pid=8, OS id=7084
    RECO started with pid=9, OS id=9576
    CJQ0 started with pid=10, OS id=9156
    MMON started with pid=11, OS id=6000
    MMNL started with pid=12, OS id=2856
    Sat Apr 18 04:01:29 2009
    ALTER DATABASE   MOUNT
    Sat Apr 18 04:01:33 2009
    Setting recovery target incarnation to 1
    Sat Apr 18 04:01:33 2009
    Successful mount of redo thread 1, with mount id 1124466585
    Sat Apr 18 04:01:33 2009
    Database mounted in Exclusive Mode
    Completed: ALTER DATABASE   MOUNT
    Sat Apr 18 04:01:34 2009
    ALTER DATABASE OPEN
    ORA-1589 signalled during: ALTER DATABASE OPEN...
    Sat Apr 18 04:02:13 2009
    alter database open resetlogs
    Sat Apr 18 04:02:13 2009
    ORA-1245 signalled during: alter database open resetlogs...
    Sat Apr 18 04:11:05 2009
    ALTER DATABASE RECOVER DATABASE UNTIL CANCEL
    Sat Apr 18 04:11:05 2009
    Media Recovery Start
    Sat Apr 18 04:11:06 2009
    Media Recovery failed with error 1610
    ORA-283 signalled during: ALTER DATABASE RECOVER DATABASE UNTIL CANCEL...
    Sat Apr 18 04:11:28 2009
    ALTER DATABASE RECOVER DATABASE USING BACKUP CONTROLFILE
    Sat Apr 18 04:11:28 2009
    Media Recovery Start
    parallel recovery started with 3 processes
    ORA-279 signalled during: ALTER DATABASE RECOVER DATABASE USING BACKUP CONTROLFILE...
    Sat Apr 18 04:17:23 2009
    ALTER DATABASE RECOVER  database using backup controlfile until cancel 
    Sat Apr 18 04:17:23 2009
    Media Recovery Start
    ORA-275 signalled during: ALTER DATABASE RECOVER  database using backup controlfile until cancel  ...
    Any suggestions pls..............
    Thanks & Regards,
    Subbu

    Hello Subbu,
    > I have taken backup yesterday monrning in Archive log mode but have lost all the archive log files.
    You mean you have taken an online backup and lost all your archive log files after that online backup?
    SQL> alter database open resetlogs;
    Error: ORA-01113: file 1 needs media recovery
    ORA-01110: data file 1: 'E:\oracle\'<SID>\sapdata1\SYSTEM_1\SYSTEM.DATA1'
    SQL> recover database using backup controlfile until cancel;
    ORA-00279 : change 26627919 generated at DATE TIMEneeded for thread 1
    ORA-00289 : Suggestion E:\ORACLE\<SID>\ORAARCH\<SID>ARCHARC03020_0683715008.001
    ORA-00280: change 266277189 for thread 1 is in sequence #3020
    To perform a recovery with an online backup you will need all archive log files until the end of the online backup. If you have lost them you are not able to recover (or open) your database in a consistent state.
    So the only suggestion we can do is:
    You need the archive log files that were created during the online backup to perform an incomplete recovery ... if they are gone you can not restore your database.
    Regards
    Stefan

  • RMAN Duplicate DB fails to restore datafile created during backup.

    Database is 9i.
    Performing duplicate database using rman on seperate host.
    Reason of failure is , there were datafiles created during backup. Question is , Is there a workaround to perform duplicate database to work.
    Error :
    released channel: aux1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 12/16/2007 14:42:44
    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 791 found to restore
    RMAN-06023: no backup or copy of datafile 790 found to restore
    RMAN-06023: no backup or copy of datafile 789 found to restore
    RMAN-06023: no backup or copy of datafile 788 found to restore
    RMAN-06023: no backup or copy of datafile 787 found to restore
    RMAN-06023: no backup or copy of datafile 786 found to restore
    Backup Date is : 23rd Nov to 26th Nov
    Datafile created between backup period are :
    786 /oracle/prod/proddata17/btabd_322/btabd.data322 Nov-25-2007 02:58:38 AM
    787 /oracle/prod/proddata17/btabd_323/btabd.data323 Nov-25-2007 03:06:02 AM
    788 /oracle/prod/proddata17/btabd_324/btabd.data324 Nov-25-2007 03:17:48 AM
    789 /oracle/prod/proddata17/btabd_325/btabd.data325 Nov-25-2007 03:26:50 AM
    790 /oracle/prod/proddata17/btabd_326/btabd.data326 Nov-25-2007 03:32:31 AM
    791 /oracle/prod/proddata17/btabd_327/btabd.data327 Nov-25-2007 03:39:59 AM
    Restore Script :
    rman TARGET dtbackup/dt0dmin@prod CATALOG rman_prd/rman_prd@rcat_db connect auxiliary /
    run {
    set until time = "TO_DATE('11/26/2007 10:30:00','mm/dd/yyyy hh24:mi:ss')";
    allocate auxiliary channel aux1 type 'SBT_TAPE' PARMS="BLKSIZE=262144";
    DUPLICATE TARGET DATABASE TO DUP ;
    }

    I think there is no workaround and this is expected behavior - atleast till 10.2. If you refer oracle documentation, it says that it requires target database in either MOUNT or OPEN stage to duplicate database using RMAN. So RMAN will get current physical structure information about target database from its control file and when any file is not there in the backup, it will give error. Only way to resolve this is to take backup of these datafiles through RMAN either as backupset or copy. ( I think oracle can take hint from here and make RMAN database duplication possible for which backup is not available - its a small change in code - if backup not found, then start taking backup. Already in 11g, during RMAN duplication, RMAN can use backup from other server)

  • ORA-19723: while restoring datafile from backup

    I am getting ORA-19723: Cannot recreate plugged in read-only datafile ... while restoring datafles. All datafiles are online and in read_write mode on the database. Tablespaces are also online.
    This same backup has worked before.
    This most be a misleading error...
    Please comment/advise
    Thanks

    These particular files were not restored/copied to the specified location with set newname.
    All the files have plugged_in=0 as stated below
    +USADBP_DATA_01/usadbp/repl_mgr_data01.dbf                                                                                                                                                             
    0

  • Restore datafile problem (RMAN)

    I delete the datafile branch.
    Than restore it form the yesterdays backup
    RMAN>restore tablespace branch.
    successfully restored branch.dbf.
    RMAN> recover tablespace branch;
    archive log thread 1 sequence 12 is already on disk as file C:\ESAS\ORACLE\APP\O
    RACLE\FLASH_RECOVERY_AREA\XE\ARCHIVELOG\2008_01_21\O1_MF_1_12_3S8KWFJM_.ARC
    archive log thread 1 sequence 13 is already on disk as file C:\ESAS\ORACLE\APP\O
    RACLE\FLASH_RECOVERY_AREA\XE\ARCHIVELOG\2008_01_21\O1_MF_1_13_3S8KWZM1_.ARC
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 01/21/2008 10:20:57
    RMAN-06053: unable to perform media recovery because of missing log
    RMAN-06025: no backup of log thread 1 seq 5 lowscn 28752248 found to restore
    RMAN-06025: no backup of log thread 1 seq 4 lowscn 28749190 found to restore
    RMAN-06025: no backup of log thread 1 seq 3 lowscn 28735538 found to restore
    RMAN-06025: no backup of log thread 1 seq 2 lowscn 28732630 found to restore
    RMAN-06025: no backup of log thread 1 seq 1 lowscn 28704663 found to restore
    RMAN-06025: no backup of log thread 1 seq 4 lowscn 28704627 found to restore
    RMAN-06025: no backup of log thread 1 seq 3 lowscn 28684595 found to restore
    RMAN-06025: no backup of log thread 1 seq 2 lowscn 28664563 found to restore
    RMAN-06025: no backup of log thread 1 seq 1 lowscn 28642042 found to restore
    RMAN-06025: no backup of log thread 1 seq 2225 lowscn 28640983 found to restore
    RMAN-06025: no backup of log thread 1 seq 2224 lowscn 28640978 found to restore
    RMAN-06025: no backup of log thread 1 seq 2223 lowscn 28633884 found to restore
    SQL> alter tablespace branch online;
    alter tablespace branch online
    ERROR at line 1:
    ORA-01190: control file or data file 4 is from before the last RESETLOGS
    ORA-01110: data file 4: 'C:\ESAS\ORACLE\ORADATA\XE\BRANCH.DBF'
    Also the size of the branch.dbf is 2,800GB normally, but when I restore it from the backupset it is nearly 500MB.

    If you did a RESETLOGS 3 days ago, that would have been between
    the SCNs 26840983 and 28642042 ! based on these lines :
    RMAN-06025: no backup of log thread 1 seq 1 lowscn 28642042 found to restore
    RMAN-06025: no backup of log thread 1 seq 2225 lowscn 28640983 found to restore
    However you do not expect to see a 500MB file. So I wonder if Oracle found
    no backup of the datafile from recent days but found the most recent backup to be of so long ago (3+ days) that the datafile then was only 500MB.
    That would mean that your recent daily backups have been failing or silently erroring out.
    If RMAN cannot find a most recent (eg yesterday's) backup of a datafile, it will go back in time till it can find the "lastest" backup -- so the "lastest" backup of that datafile was a 500MB image many days ago ?
    Check your backup destination directory -- your FlashbackRecoveryArea to see if backups are really going there. Check your backup logs.

  • Restore datafile without any Backup

    Hi,
    IBM AIX
    Oracle 10.2.0
    We have a problem in our database.
    One of our datafile was missing in the location.
    Database is in open mode. We dont have any backup of that physical file.
    Is there anyway to restore that datafile without backup.
    Plz Advice.....
    TIA,

    what is this file is it datafile or archive log file ..'/oracle/u01/app/oracle/oracle/product/10.2.0/db_1/logarchive/7603_1_594490386.dbf'.
    Can you check if this file is physically present.
    If its archive log file and not present physically do this
    When the recovery process suggests the non-existent archive log,you need to provide the path to the current online redo log. The current
    log can be determined from the following query:
    SELECT MEMBER
    FROM V$LOGFILE F,
    V$LOG L
    WHERE L.STATUS = 'CURRENT'
    AND L.GROUP# = F.GROUP#;
    Once you know the current log, restart the recovery procedure and provide the
    path to the log when prompted:
    yeah juct check the date after Enrique's comment When the recovery process suggests the non-existent archive log,
    you need to provide the path to the current online redo log. The current
    log can be determined from the following query:
    SELECT MEMBER
    FROM V$LOGFILE F,
    V$LOG L
    WHERE L.STATUS = 'CURRENT'
    AND L.GROUP# = F.GROUP#;
    Once you know the current log, restart the recovery procedure and provide the
    path to the log when prompted:
    Just check the date after Enrique;s comments
    Edited by: user445775 on Nov 1, 2008 9:43 AM

  • Restore datafile to standby database

    dear all,
    i have a standby database which use raw devices under solaris 9.
    and a primary database which use filesystem under solaris 9 too.
    recently i have a problem which is nologging issue. see ML 290161.1
    my question is how we know that when restore to raw devices through rman, will it replace file in the raw?
    or should I create new raw and directing my new restore to new raw?
    regards
    ujang

    dear all,
    i have a standby database which use raw devices under solaris 9.
    and a primary database which use filesystem under solaris 9 too.
    recently i have a problem which is nologging issue. see ML 290161.1
    my question is how we know that when restore to raw devices through rman, will it replace file in the raw?
    or should I create new raw and directing my new restore to new raw?
    regards
    ujang

  • Restore datafile from an OS copy

    Hi all,
    I have a 10GR1 database open with datafiles marked as MISSING in the dictionnary.
    I have an OS copy oh those datafiles. These datafiles are contained in a Read Only tablespace.
    Could you explain me how can i recover this datafile to the database ?
    Thanks.

    Nope....the db does not need to be in mount mode.
    Presumably the missing files have been created in $ORACLE_HOME/dbs?
    If you have multiple missing files then the alert log will point out to you which missing file relates to which tablespace and datafile#.
    Obtain your offline datafile names:
    select FILE#, name, status from v$datafile where status != 'ONLINE';Take tablespace offline first.
    alter tablespace tbname offline;Rename the datafile.
    alter database rename file 'abc' to 'xyz';Bring tablespace online.
    alter tablespace tbname online;Ensure all datafiles are online:
    select FILE#, name, status from v$datafile;Put the tablespace back into readonly mode:
    alter tablespace tbname read only;Check status of tablespace:
    select TABLESPACE_NAME, STATUS from dba_tablespaces;Refer to: http://docs.oracle.com/cd/B19306_01/server.102/b14231/dfiles.htm#i1006457

  • 8i: is it possible to restore a SYSTEM-datafile?

    Just curious: is it possible to restore a SYSTEM-datafile using rman 8i ?
    I was playing with a 8i-database, after a hard reboot the SYSTEM-datafile got corrupted. I want to restore it, but before trying I want to be sure it is possible to restore a SYSTEM-datafile. Any thoughts on this?

    first check how many datafiles contains SYSTEM tablespace.
    SQL> select ts.name,fl.file#,fl.name
      2    from v$tablespace ts,v$datafile fl
      3   where ts.ts#=fl.ts#
      4     and ts.name='SYSTEM'
      5  /
    NAME                                FILE# NAME
    SYSTEM                                  1 F:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\SYSTEM01.DBFthen mount yours database..
    RMAN>restore datafile 1
    RMAN>recover datafile 1if you have other files exist within SYSTEM tablspace (i.e 1,2,3) then
    RMAN>restore datafile 1,2,3
    RMAN>recover datafile 1,2,3Khurram

  • Datafile not restored due to missing or corrupt data

    Hi all,
    I was asked to restore a RMAN backup which we got from another region, the rman backup contains controlfiles and datafiles as compressed backupset.
    oracle version is 10.2.0.3.0
    aix version 6
    First, I have restored the control file using the below command:
    run
    +{+
    allocate channel t1 type disk;
    restore controlfile from '/oracle/app/prod/rman/cf_t799873684_s17_p1';
    alter database mount;
    +}+
    Second, I have cataloged the backup piece:
    catalog backuppiece '/oracle/app/prod/rman/df_t794754324_s12_p1';
    catalog backuppiece '/oracle/app/prod/rman/df_t793567544_s13_p1';
    catalog backuppiece '/oracle/app/prod/rman/df_t731097654_s14_p1';
    catalog backuppiece '/oracle/app/prod/rman/df_t792538698_s15_p1';
    catalog backuppiece '/oracle/app/prod/rman/df_t792183472_s16_p1';
    catalog backuppiece '/oracle/app/prod/rman/cf_t799873684_s17_p1';
    Third, used below command to restore:
    +run {+
    allocate channel t1 type disk;
    allocate channel t2 type disk;
    allocate channel t3 type disk;
    allocate channel t4 type disk;
    set newname for datafile 01 to '/oracle/app/oradata/dbprod/system01.dbf';
    set newname for datafile 02 to '/oracle/app/oradata/dbprod/undotbs01.dbf';
    set newname for datafile 03 to '/oracle/app/oradata/dbprod/sysaux01.dbf';
    set newname for datafile 04 to '/oracle/app/oradata/dbprod/users01.dbf';
    set newname for datafile 06 to '/oracle/app/oradata/dbprod/datafile005.dbf';
    set newname for datafile 07 to '/oracle/app/oradata/dbprod/datafile006.dbf';
    set newname for datafile 08 to '/oracle/app/oradata/dbprod/datafile007.dbf';
    set newname for datafile 09 to '/oracle/app/oradata/dbprod/datafile008.dbf';
    set newname for datafile 10 to '/oracle/app/oradata/dbprod/datafile009.dbf';
    set newname for datafile 11 to '/oracle/app/oradata/dbprod/datafile010.dbf';
    set newname for datafile 14 to '/oracle/app/oradata/dbprod/datafile001.dbf';
    set newname for datafile 15 to '/oracle/app/oradata/dbprod/datafile002.dbf';
    set newname for datafile 16 to '/oracle/app/oradata/dbprod/datafile003.dbf';
    set newname for datafile 17 to '/oracle/app/oradata/dbprod/datafile004.dbf';
    set newname for datafile 18 to '/oracle/app/oradata/dbprod/indfile001.dbf';
    set newname for datafile 19 to '/oracle/app/oradata/dbprod/indfile002.dbf';
    set newname for datafile 20 to '/oracle/app/oradata/dbprod/indfile011.dbf';
    restore database;
    switch datafile all;
    recover database;
    +}+
    But while restoring, I got error like below:
    Starting restore at 22-OCT-12
    channel t1: starting datafile backupset restore
    channel t1: specifying datafile(s) to restore from backup set
    restoring datafile 00004 to /glotam3/oracle10g/oradata/T24DEV3/users01.dbf
    restoring datafile 00007 to /glotam3/oracle10g/oradata/T24DEV3/datafile006.dbf
    restoring datafile 00011 to /glotam3/oracle10g/oradata/T24DEV3/datafile010.dbf
    restoring datafile 00012 to /glotam3/oracle10g/oradata/T24DEV3/recop01.dbf
    restoring datafile 00014 to /glotam3/oracle10g/oradata/T24DEV3/datafile001.dbf
    channel t1: reading from backup piece /oracle/app/prod/rman/df_t793567544_s13_p1
    channel t2: starting datafile backupset restore
    channel t2: specifying datafile(s) to restore from backup set
    restoring datafile 00001 to /oracle/app/oradata/dbprod/system01.dbf
    restoring datafile 00003 to /oracle/app/oradata/dbprod/sysaux01.dbf
    restoring datafile 00008 to /oracle/app/oradata/dbprod/datafile007.dbf
    restoring datafile 00015 to /oracle/app/oradata/dbprod/datafile002.dbf
    restoring datafile 00018 to /oracle/app/oradata/dbprod/indfile001.dbf
    channel t2: reading from backup piece /oracle/app/prod/rman/df_t792538698_s15_p1
    channel t3: starting datafile backupset restore
    channel t3: specifying datafile(s) to restore from backup set
    restoring datafile 00002 to /oracle/app/oradata/dbprod/undotbs01.dbf
    restoring datafile 00009 to /oracle/app/oradata/dbprod/datafile008.dbf
    restoring datafile 00013 to /oracle/app/oradata/dbprod/prefstat01.dbf
    restoring datafile 00016 to /oracle/app/oradata/dbprod/datafile003.dbf
    restoring datafile 00019 to /oracle/app/oradata/dbprod/indfile002.dbf
    channel t3: reading from backup piece /oracle/app/prod/rman/df_t731097654_s14_p1
    channel t4: starting datafile backupset restore
    channel t4: specifying datafile(s) to restore from backup set
    restoring datafile 00006 to /oracle/app/oradata/dbprod/datafile005.dbf
    restoring datafile 00010 to /oracle/app/oradata/dbprod/datafile009.dbf
    restoring datafile 00017 to /oracle/app/oradata/dbprod/datafile004.dbf
    restoring datafile 00020 to /oracle/app/oradata/dbprod/indfile011.dbf
    channel t4: reading from backup piece /oracle/app/prod/rman/df_t794754324_s12_p1
    ORA-19870: error reading backup piece /oracle/app/prod/rman/
    df_t793567544_s13_p1
    ORA-19612: datafile 11 not restored due to missing or corrupt data
    channel t3: restored backup piece 1
    failover to piece handle=/oracle/app/prod/rman/
    df_t731097654_s14_p1 tag=TAG20120822T184703
    channel t3: restore complete, elapsed time: 01:06:05
    channel t2: restored backup piece 1
    failover to piece handle=/oracle/app/prod/rman/
    df_t792538698_s15_p1 tag=TAG20120822T184703
    channel t2: restore complete, elapsed time: 01:09:10
    ORA-19870: error reading backup piece /oracle/app/prod/rman/
    df_t794754324_s12_p1
    ORA-19612: datafile 20 not restored due to missing or corrupt data
    failover to previous backup
    released channel: t1
    released channel: t2
    released channel: t3
    released channel: t4
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 10/22/2012 15:11:23
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 20 found to restore
    RMAN-06023: no backup or copy of datafile 17 found to restore
    RMAN-06023: no backup or copy of datafile 10 found to restore
    RMAN-06023: no backup or copy of datafile 6 found to restore
    RMAN>
    This same rman backup has been restored in other server, the commands were same but the db was not restored in my server.
    Kindly help me....
    Thanks in advance,
    nonuday

    Hi mseberg,
    When I executed the below command with same date. This is what is got and am not able to understand what it says.
    RMAN> run
    +{+
    SET UNTIL TIME "TO_DATE('10/22/2012','MM/DD/YYYY')";
    restore database preview;
    +}2> 3> 4> 5>+
    executing command: SET until clause
    Starting restore at 23-OCT-12
    using channel ORA_DISK_1
    List of Backup Sets
    +===================+
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time
    +8 Full 11.68G DISK 02:10:15 22-AUG-12+
    BP Key: 18   Status: AVAILABLE  Compressed: YES  Tag: TAG20120822T184703
    Piece Name: /oracle/app/prod/rman/df_t793567544_s13_p1
    List of Datafiles in backup set 8
    File LV Type Ckp SCN    Ckp Time  Name
    +4 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/users01.dbf+
    +7 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/datafile006.dbf+
    +11 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/datafile010.dbf+
    +12 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/recop01.dbf+
    +14 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/datafile001.dbf+
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time
    +10 Full 11.35G DISK 02:15:49 22-AUG-12+
    BP Key: 16   Status: AVAILABLE  Compressed: YES  Tag: TAG20120822T184703
    Piece Name: /oracle/app/prod/rman/df_t792538698_s15_p1
    List of Datafiles in backup set 10
    File LV Type Ckp SCN    Ckp Time  Name
    +1 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/system01.dbf+
    +3 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/sysaux01.dbf+
    +8 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/datafile007.dbf+
    +15 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/datafile002.dbf+
    +18 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/indfile001.dbf+
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time
    +11 Full 10.78G DISK 02:20:07 22-AUG-12+
    BP Key: 15   Status: AVAILABLE  Compressed: YES  Tag: TAG20120822T184703
    Piece Name: /oracle/app/prod/rman/df_t731097654_s14_p1
    List of Datafiles in backup set 11
    File LV Type Ckp SCN    Ckp Time  Name
    +2 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/undotbs01.dbf+
    +9 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/datafile008.dbf+
    +13 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/prefstat01.dbf+
    +16 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/datafile003.dbf+
    +19 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/indfile002.dbf+
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time
    +12 Full 16.83G DISK 03:25:43 22-AUG-12+
    BP Key: 14   Status: AVAILABLE  Compressed: YES  Tag: TAG20120822T184703
    Piece Name: /oracle/app/prod/rman/df_t794754324_s12_p1
    List of Datafiles in backup set 12
    File LV Type Ckp SCN    Ckp Time  Name
    +6 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/datafile005.dbf+
    +10 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/datafile009.dbf+
    +17 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/datafile004.dbf+
    +20 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/datafile011.dbf+
    archive logs generated after SCN 30013719101 not found in repository
    Media recovery start SCN is 30013719101
    Recovery must be done beyond SCN 30013719101 to clear data files fuzziness
    Finished restore at 23-OCT-12
    RMAN>
    Thanks for reply,
    Nonuday

  • Restore of single file failes: "datafile ... is already restored to file"

    Hi All,
    I'am doing some restore tests with RMAN and want to restore a single file to a new directory.
    First execution of the restore script ( run { restore datafile 14 to '....'; }) was successful, but in case I deleted the restored file and restart the script, RMAN complains with :
    "datafile 14 is already restored to file ....".
    Does this mean, that RMAN keeps track of and refers to previous restore actions??
    I find this behaviour of RMAN quite strange because I would like RMAN just to use for coping some files (it should not make assumptions what the DBA might want to do or what he or someone else has done before...).
    Is there any option to "force" RMAN to restore files, regardless what happened before?
    Thanks you,
    Heiko
    Edited by: user7368717 on 15.09.2009 07:54

    What O/S are you on and is the database still open when you delete the file?
    There is a FORCE option with RESTORE.

  • RMAN-06094: datafile 1 must be restored

    Hello,
    in standby database, using RMAN
    RMAN> recover database noredo;
    Starting recover at 11-DEC-12
    allocated channel: ORA_SBT_TAPE_1
    channel ORA_SBT_TAPE_1: SID=4353 device type=SBT_TAPE
    channel ORA_SBT_TAPE_1: Data Protection for Oracle: version 5.4.1.0
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=4344 device type=DISK
    allocated channel: ORA_DISK_2
    channel ORA_DISK_2: SID=4346 device type=DISK
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 12/11/2012 09:25:19
    RMAN-06094: datafile 1 must be restored
    RMAN> restore datafile 1;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 12/11/2012 09:38:05
    ORA-27191: sbtinfo2 returned error
    Additional information: 3402
    Any idea,
    thank you very much.

    Thank you very much.
    yes, I know, but the primary is a 2TB huge database, a full backup will take a lot of time and disk space. in fact, I don't have disk to hold it (even compressed backup)
    another option is go to rman catalog, trying to restore from tape full backup of primary.
    do
    RMAN> show all;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of show command at 12/11/2012 09:52:11
    RMAN-03014: implicit resync of recovery catalog failed
    RMAN-03009: failure of partial resync command on default channel at 12/11/2012 09:52:11
    ORA-00001: unique constraint (RMAN.BDF_U1) violated
    ORA-00001: unique constraint (RMAN.BDF_U2) violated
    RMAN> restore datafile 1;
    Starting restore at 11-DEC-12
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 12/11/2012 09:55:26
    RMAN-03014: implicit resync of recovery catalog failed
    RMAN-03009: failure of partial resync command on default channel at 12/11/2012 09:55:26
    ORA-00001: unique constraint (RMAN.BDF_U1) violated
    ORA-00001: unique constraint (RMAN.BDF_U2) violated
    I checked ,that is a bug.
    so seems like a little despire.
    by the way, I have question:
    we didn't backup the standby database. so if I login rman catalog and try to restore standby database,
    how can I restore a standby databaes by using a primary database's full backup? (is there any possible to do this)
    thank you very much.
    Edited by: 968967 on Dec 11, 2012 8:28 AM

Maybe you are looking for

  • Can't install new release - Error 2753 Ref pxsetup.exe ?

    I ran into problems trying to uninstall Lightroom Beta. In the end, I did a manual delete, followed up by a "regedit" search for anything 'Lightroom' had left behind in the registry. Then I swept the machine using Ccleaner (great free utility at www.

  • [Solved] Pacman error downloading program

    I am trying to install midnight commander (mc), pacman finds the package ok but then when it tries to retreive it from the community it say either not found or Unknown resolver error (see below) I installed mc in a previous aborted install without a

  • My Adobe Creative Suite CS5 download rejects my valid serial key. What must I do?

    Hello everyone, I have a legitimate serial key for Creative Suite CS5. Because I once lost my CD's Adobe sent me a download link to download the suite which worked then, but now I have a new laptop which doesn't have a CD-rom drive, so I tried to dow

  • Update PO item rate through interface or API

    Hi I have a scenario in which PO is created from PR through Autocreate but items rates need to be populated through interface or API. Please any doc or sample example on how to do that??? I havent done interfacing or used api a lot before i was just

  • Sound Blaster Audigy 2 ZS (Vis

    With Windows Vista I have limited access with the drivers for this sound card. I would like to adjust the settings for my Surround Sound and Equalizer. Are Vista equipped computers soon going to have this capability? [img"]http://i3.photobucket.com/a