RMAN not restoring database

I've been trying to restore a tablespace that I intentionally deleted a table from just to practice on restoring data in Oracle. Basically I did a full backup of the whole database the night before. The next morning I deleted a complete table from the TEST_DATA tablespace intentionally. I then ran the following commands:
SQL> ALTER TABLESPACE TEST_DATA OFFLINE IMMEDIATE;
RMAN> RESTORE TABLESPACE TEST_DATA;
RMAN> RECOVER TABLESPACE TEST_DATA;
SQL> ALTER TABLESPACE TEST_DATA ONLINE;
All commands ran successfully with no error. It pulled the dbf file from the backup file and restored it (Or so it seemed). the RECOVER command did go pretty quick. It ran for about 1 second and completed. This was kind of odd. When I opened the tablespace I noticed that the table was not recovered.
The tablespace data was recovered when I did a full database restore and recover though. I dont want to take down the whole database just to restore a tablespace.
Am I doing it wrong? Your help is appreciated.

Hello;
I would expect something more like this :
recover tablespace ABLOCK
until time "to_date('10-JAN-2013 14:32:46','dd-mon-rrrr hh24:mi:ss')"
AUXILIARY DESTINATION '/u01/app/oracle/oradata/CLONE';http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmtspit.htm
See - Example 21-4 Performing TSPITR on Two Tablespaces
Please consider closing some of your old questions.
This is somewhat related to your question:
http://gavinsoorma.com/2009/11/11g-release-2-tablespace-point-in-time-recovery-recover-from-dropped-tablespace/
These are NOT related to your current question but you may find useful as you test down the line.
http://www.pythian.com/library/papers_and_books/the_quick_and_easy_rman_restore/
http://www.pythian.com/news/3653/howto-oracle-cross-platform-migration-with-minimal-downtime/
http://www.pythian.com/news/28099/rman-duplicate-in-details/
http://www.pythian.com/news/34715/migrating-your-10g-database-to-oda-with-minimal-downtime/
Best Regards
mseberg
Edited by: mseberg on Jan 10, 2013 11:44 AM

Similar Messages

  • RMAN Error - restore database validate

    Hi all
    I am trying to validate a full database backup taken on tape using 'restore database validate' command but for some reason this command spits out multi-page long PL/SQL code (below truncated output). I have searched all over for a solution but can't seem to figure out the problem.
    Any assistance will be appreciated.
    RMAN> allocate channel for maintenance type SBT_TAPE parms 'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
    2> crosscheck backup;
    3> restore database validate;
    4> release channel;
    5> exit;
    allocated channel: ORA_MAINT_SBT_TAPE_1
    channel ORA_MAINT_SBT_TAPE_1: SID=82 device type=SBT_TAPE
    channel ORA_MAINT_SBT_TAPE_1: Data Protection for Oracle: version 5.4.1.0
    crosschecked backup piece: found to be 'AVAILABLE'
    backup piece handle=c-822607628-20101006-02 RECID=66 STAMP=731711718
    crosschecked backup piece: found to be 'AVAILABLE'
    backup piece handle=DB_20101007_77_2dlpsj84_1_1.dbf RECID=67 STAMP=731794692
    crosschecked backup piece: found to be 'AVAILABLE'
    backup piece handle=CF_20101008_116_3klpt5iv_1_1.ctl RECID=106 STAMP=731813472
    crosschecked backup piece: found to be 'AVAILABLE'
    backup piece handle=c-822607628-20101008-01 RECID=107 STAMP=731813518
    Crosschecked 42 objects
    Starting restore at 08-OCT-10
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=110 device type=DISK
    DBGANY: CMD type=IRESTORE cmdid=1 status=NOT STARTED
    DBGANY: 1 STEPstepid=1 cmdid=1 status=NOT STARTED devtype=SBT_TAPE bs.stamp=731812991 step_size=0 Bytes
    DBGANY: 1 TEXTNOD = -- rsdf_start
    DBGANY: 2 TEXTNOD = declare
    DBGANY: 3 TEXTNOD = /* restoreStatus */
    DBGANY: 4 TEXTNOD = state binary_integer;
    DBGANY: 5 TEXTNOD = pieces_done binary_integer;
    DBGANY: 6 TEXTNOD = files binary_integer;
    DBGANY: 7 TEXTNOD = datafiles boolean;
    DBGANY: 8 TEXTNOD = incremental boolean;
    DBGANY: 9 TEXTNOD = device boolean;
    DBGANY: 10 TEXTNOD = /* restorebackuppiece */
    DBGANY: 11 TEXTNOD = done boolean;
    DBGANY: 12 TEXTNOD = currcf boolean;
    DBGANY: 266 TEXTNOD = sys.dbms_backup_restore.restoreCancel(FALSE);
    DBGANY: 267 TEXTNOD = exception
    DBGANY: 268 TEXTNOD = when others then
    DBGANY: 269 TEXTNOD = krmicd.writeMsg(1005,
    DBGANY: 270 TEXTNOD = 'c. dbms_backup_restore.restoreCancel() failed');
    DBGANY: 271 TEXTNOD = end;
    DBGANY: 272 TEXTNOD = sys.dbms_backup_restore.setRmanStatusRowId(rsid=>0, rsts=>0);
    DBGANY: 273 TEXTNOD = end;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00601: fatal error in recovery manager
    RMAN-03004: fatal error during execution of command
    RMAN-00600: internal error, arguments [6000] [] [] [] []

    Hi Sybrand
    So here's the deal:
    1) 'backup validate database;' is run before RMAN backup to check for any logical or physical corruption in datafiles or archivelogs.
    If the backup validation discovers corrupt blocks, then RMAN updates the V$DATABASE_BLOCK_CORRUPTION view with rows describing the corruptions.
    2)
    a- 'restore database validate;' is run after RMAN backup to check for any logical or physical corruption in backupsets.
    b- 'validate backupset <n>;' is also run after RMAN backup to check for any logical or physical corruption in backupsets. The difference being you have to run it for each individual backupset as opposed to the previous option (2a), which loops through all existing backupsets.
    I believe for now only option 2b is available for use in my case.
    Cheers.

  • RMAN not opening database after cold backup

    OS: RHES4
    10g R2
    I am having a problem using RMAN to run a cold backup. The error from the log tell me that the database is already open. However when I check the database, the status is that it is in MOUNT. I can then open it but am not sure why RMAN cannot. The log is below:
    Output Log
    SQL*Plus: Release 10.1.0.3.0 - Production on Thu May 11 02:00:13 2006
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    SQL> Connected.
    SQL> Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL*Plus: Release 10.1.0.3.0 - Production on Thu May 11 02:00:32 2006
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    SQL> Connected to an idle instance.
    SQL> ORACLE instance started.
    Total System Global Area 687865856 bytes
    Fixed Size          780700 bytes
    Variable Size          149165668 bytes
    Database Buffers     536870912 bytes
    Redo Buffers          1048576 bytes
    Database mounted.
    SQL> Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Recovery Manager: Release 10.1.0.3.0 - Production
    Copyright (c) 1995, 2004, Oracle. All rights reserved.
    RMAN>
    connected to target database: TEST10G (DBID=3717786770)
    using target database controlfile instead of recovery catalog
    RMAN> 2> 3> 4> 5>
    allocated channel: oem_disk_backup
    channel oem_disk_backup: sid=160 devtype=DISK
    Starting recover at 11-MAY-06
    no copy of datafile 1 found to recover
    no copy of datafile 2 found to recover
    no copy of datafile 3 found to recover
    no copy of datafile 4 found to recover
    no copy of datafile 5 found to recover
    no copy of datafile 6 found to recover
    no copy of datafile 7 found to recover
    no copy of datafile 8 found to recover
    no copy of datafile 9 found to recover
    no copy of datafile 10 found to recover
    no copy of datafile 11 found to recover
    no copy of datafile 12 found to recover
    no copy of datafile 13 found to recover
    no copy of datafile 14 found to recover
    no copy of datafile 15 found to recover
    no copy of datafile 16 found to recover
    no copy of datafile 17 found to recover
    no copy of datafile 18 found to recover
    Finished recover at 11-MAY-06
    Starting backup at 11-MAY-06
    no parent backup or copy of datafile 18 found
    no parent backup or copy of datafile 1 found
    no parent backup or copy of datafile 8 found
    no parent backup or copy of datafile 9 found
    no parent backup or copy of datafile 10 found
    no parent backup or copy of datafile 11 found
    no parent backup or copy of datafile 13 found
    no parent backup or copy of datafile 14 found
    no parent backup or copy of datafile 15 found
    no parent backup or copy of datafile 17 found
    no parent backup or copy of datafile 4 found
    channel oem_disk_backup: starting compressed incremental level 1 datafile backupset
    channel oem_disk_backup: specifying datafile(s) in backupset
    input datafile fno=00003 name=/home/oracle/oradata/dev10g/sysaux01.dbf
    input datafile fno=00002 name=/home/oracle/oradata/dev10g/undotbs01.dbf
    input datafile fno=00005 name=/home/oracle/oradata/dev10g/example01.dbf
    input datafile fno=00012 name=/home/oracle/oradata/dev10g/FLOW_7.dbf
    input datafile fno=00016 name=/home/oracle/oradata/dev10g/FLOW_11.dbf
    input datafile fno=00006 name=/home/oracle/oradata/dev10g/FLOW_1.dbf
    input datafile fno=00007 name=/home/oracle/oradata/dev10g/FLOW_2.dbf
    channel oem_disk_backup: starting piece 1 at 11-MAY-06
    channel oem_disk_backup: finished piece 1 at 11-MAY-06
    piece handle=/home/oracle/flash_recovery_area/DEV10G/backupset/2006_05_11/o1_mf_nnnd1_TAG20060511T020039_265nr8h8_.bkp comment=NONE
    channel oem_disk_backup: backup set complete, elapsed time: 00:01:15
    channel oem_disk_backup: starting datafile copy
    input datafile fno=00018 name=/home/oracle/oradata/dev10g/designer1.dbf
    output filename=/home/oracle/flash_recovery_area/DEV10G/datafile/o1_mf_designer_265ntmow_.dbf tag=ORA$OEM_LEVEL_0 recid=9 stamp=590119379
    channel oem_disk_backup: datafile copy complete, elapsed time: 00:01:05
    channel oem_disk_backup: starting datafile copy
    input datafile fno=00001 name=/home/oracle/oradata/dev10g/system01.dbf
    output filename=/home/oracle/flash_recovery_area/DEV10G/datafile/o1_mf_system_265nwnw0_.dbf tag=ORA$OEM_LEVEL_0 recid=10 stamp=590119436
    channel oem_disk_backup: datafile copy complete, elapsed time: 00:01:05
    channel oem_disk_backup: starting datafile copy
    input datafile fno=00008 name=/home/oracle/oradata/dev10g/FLOW_3.dbf
    output filename=/home/oracle/flash_recovery_area/DEV10G/datafile/o1_mf_flow_3_265nyp5w_.dbf tag=ORA$OEM_LEVEL_0 recid=11 stamp=590119448
    channel oem_disk_backup: datafile copy complete, elapsed time: 00:00:03
    channel oem_disk_backup: starting datafile copy
    input datafile fno=00009 name=/home/oracle/oradata/dev10g/FLOW_4.dbf
    output filename=/home/oracle/flash_recovery_area/DEV10G/datafile/o1_mf_flow_4_265nysc5_.dbf tag=ORA$OEM_LEVEL_0 recid=12 stamp=590119452
    channel oem_disk_backup: datafile copy complete, elapsed time: 00:00:07
    channel oem_disk_backup: starting datafile copy
    input datafile fno=00010 name=/home/oracle/oradata/dev10g/FLOW_5.dbf
    output filename=/home/oracle/flash_recovery_area/DEV10G/datafile/o1_mf_flow_5_265nz0jc_.dbf tag=ORA$OEM_LEVEL_0 recid=13 stamp=590119458
    channel oem_disk_backup: datafile copy complete, elapsed time: 00:00:03
    channel oem_disk_backup: starting datafile copy
    input datafile fno=00011 name=/home/oracle/oradata/dev10g/FLOW_6.dbf
    output filename=/home/oracle/flash_recovery_area/DEV10G/datafile/o1_mf_flow_6_265nz3oo_.dbf tag=ORA$OEM_LEVEL_0 recid=14 stamp=590119463
    channel oem_disk_backup: datafile copy complete, elapsed time: 00:00:07
    channel oem_disk_backup: starting datafile copy
    input datafile fno=00013 name=/home/oracle/oradata/dev10g/FLOW_8.dbf
    output filename=/home/oracle/flash_recovery_area/DEV10G/datafile/o1_mf_flow_8_265nzbvj_.dbf tag=ORA$OEM_LEVEL_0 recid=15 stamp=590119469
    channel oem_disk_backup: datafile copy complete, elapsed time: 00:00:03
    channel oem_disk_backup: starting datafile copy
    input datafile fno=00014 name=/home/oracle/oradata/dev10g/FLOW_9.dbf
    output filename=/home/oracle/flash_recovery_area/DEV10G/datafile/o1_mf_flow_9_265nzg1k_.dbf tag=ORA$OEM_LEVEL_0 recid=16 stamp=590119473
    channel oem_disk_backup: datafile copy complete, elapsed time: 00:00:07
    channel oem_disk_backup: starting datafile copy
    input datafile fno=00015 name=/home/oracle/oradata/dev10g/FLOW_10.dbf
    output filename=/home/oracle/flash_recovery_area/DEV10G/datafile/o1_mf_flow_10_265nzo6x_.dbf tag=ORA$OEM_LEVEL_0 recid=17 stamp=590119480
    channel oem_disk_backup: datafile copy complete, elapsed time: 00:00:07
    channel oem_disk_backup: starting datafile copy
    input datafile fno=00017 name=/home/oracle/oradata/dev10g/FLOW_12.dbf
    output filename=/home/oracle/flash_recovery_area/DEV10G/datafile/o1_mf_flow_12_265nzwdb_.dbf tag=ORA$OEM_LEVEL_0 recid=18 stamp=590119487
    channel oem_disk_backup: datafile copy complete, elapsed time: 00:00:03
    channel oem_disk_backup: starting datafile copy
    input datafile fno=00004 name=/home/oracle/oradata/dev10g/users01.dbf
    output filename=/home/oracle/flash_recovery_area/DEV10G/datafile/o1_mf_users_265nzzo0_.dbf tag=ORA$OEM_LEVEL_0 recid=19 stamp=590119489
    channel oem_disk_backup: datafile copy complete, elapsed time: 00:00:03
    channel oem_disk_backup: starting compressed incremental level 1 datafile backupset
    channel oem_disk_backup: specifying datafile(s) in backupset
    including current controlfile in backupset
    including current SPFILE in backupset
    channel oem_disk_backup: starting piece 1 at 11-MAY-06
    channel oem_disk_backup: finished piece 1 at 11-MAY-06
    piece handle=/home/oracle/flash_recovery_area/DEV10G/backupset/2006_05_11/o1_mf_ncsn1_TAG20060511T020039_265o04n1_.bkp comment=NONE
    channel oem_disk_backup: backup set complete, elapsed time: 00:00:03
    Finished backup at 11-MAY-06
    released channel: oem_disk_backup
    RMAN>
    Recovery Manager complete.
    SQL*Plus: Release 10.1.0.3.0 - Production on Thu May 11 08:03:38 2006
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    SQL> Connected.
    SQL> alter database open
    ERROR at line 1:
    ORA-01531: a database already open by the instance
    Unable to open the database.

    Do you have an OMS configured for OEM? You'll need to connect to an OMS to perform backups thru OEM. The process is explained here Managing Backup and Recovery.
    Here is a SAMPLE configuration script:
    configure device type disk parallelism 1;
    configure channel device type disk format 'd:\oracle_backup\%d_%U.%p';
    configure controlfile autobackup on;
    configure controlfile autobackup format for device type disk to 'd:\oracle_backup\cf_auto_%F.bkp';
    configure retention policy to recovery window of 2 days;
    configure backup optimization on;and a SAMPLE backup script:
    rem
    rem  rman_backup.cmd
    rem
    rem  Full database backup plus archivelogs.
    for /f "tokens=2-4" %%i in ('echo %date:/= %') do set vdate=%%i_%%j_%%k
    echo backup database plus archivelog;
    echo sql "alter database backup controlfile to trace as ''d:\oracle_backup\controlORCL9%vdate%.txt''";
    echo sql "create pfile=''d:\oracle_backup\initORCL9%vdate%.ora'' from spfile";
    echo crosscheck backup;
    echo crosscheck archivelog all;
    echo delete noprompt obsolete recovery window of 2 days;
    echo delete noprompt archivelog all completed before 'sysdate-7';
    ) | rman target / log=backup.logYou could scheduled the rman_backup.cmd script to run every night at 10pm thru the Windows task scheduler.

  • Restore database failed on Oracle 10g 10.2.0.1 linux 32 bit

    Hi,
    I am working on test database for testing database disaster recovery.
    1) i made full database backup by RMAN and ui also have archive log
    2) i noted DBID and all folders of database
    3)Turn on the Controlfile auto backup
    4) then i drop database
    5) then i follow all the steps , which include restoration of spfile and controlfile
    6)After that when i have mounted database and in RMAN WRITING RESTORE DATABASE, it is giving following error.
    Starting restore at 02-APR-08
    using channel ORA_DISK_1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 04/02/2008 17:54:56
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 4 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
    Please help me
    Regards,

    1) i made full database backup by RMAN and ui also
    have archive logWhat's the command used?
    2) i noted DBID and all folders of databaseWhat's inside the folders.
    ls -l <your folder>
    3)Turn on the Controlfile auto backup
    4) then i drop databaseHow did you drop it? delete files from OS? or DROP DATABASE statement?
    5) then i follow all the steps , which include
    restoration of spfile and controlfileWhat's the steps you followed? And from where you got the steps.
    6)After that when i have mounted database and in RMAN
    WRITING RESTORE DATABASE, it is giving following
    error.
    Starting restore at 02-APR-08
    using channel ORA_DISK_1
    RMAN-06026: some targets not found - aborting
    restore
    RMAN-06023: no backup or copy of datafile 4 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
    restoreOracle Error :: RMAN-06026
    some targets not found - aborting restore
    Cause
    Some of the files specified for restore could not be found. Message 6023, 6024, or 6025 is also issued to indicate which files could not be found. Some common reasons why a file can not be restored are that there is no backup or copy of the file that is known to recovery manager, or there are no backups or copies that fall within the criteria specified on the RESTORE command, or some datafile copies have been made but not cataloged.
    Action
    The Recovery Manager LIST command can be used to display the backups and copies that Recovery Manager knows about. Select the files to be restored from that list.

  • When to restore controlfile, rman is complaining database not mounted?

    to restore controlfile, shouldn`t the database be in NOMOUNT status?
    if yes, then why rman is complaining ORA-01507?
    where I went wrong? Please advise.
    C:\Documents and Settings\PhoenixBai>rman target / nocatalog
    Recovery Manager: Release 10.2.0.1.0 - Production on Tue Dec 14 10:35:51 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    connected to target database (not started)
    RMAN> startup nomount;
    Oracle instance started
    Total System Global Area     612368384 bytes
    Fixed Size                     1250428 bytes
    Variable Size                234883972 bytes
    Database Buffers             369098752 bytes
    Redo Buffers                   7135232 bytes
    RMAN> restore controlfile until time 'sysdate-1.5/24';
    Starting restore at 14-DEC-10
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=157 devtype=DISK
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 12/14/2010 10:36:12
    ORA-01507: database not mounted
    RMAN>

    it doesn`t. I tried long before this one.
    the dilemma i am facing is that I need to recover to the time which was included in incarnation 2.
    And to be able to reset database to incarnation 2, i need to startup MOUNT the database.
    And once you startup mount the database RESTORE CONTROLFILE won`t work any more.
    below is the standard procedure, documented on 10gR2 doc, but still, i am getting errors:
    Why it is throwing errors? HOw can I fix?
    RMAN> alter database mount;
    database mounted
    RMAN> list incarnation of database orcl;
    List of Database Incarnations
    DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
    1       1       ORCL     1264908153       PARENT  1          30-AUG-05
    2       2       ORCL     1264908153       PARENT  534907     07-DEC-10
    3       3       ORCL     1264908153       CURRENT 56335397   14-DEC-10
    RMAN> reset database to incarnation 2;
    database reset to incarnation 2
    RMAN> restore database until scn 56335390;
    Starting restore at 14-DEC-10
    using channel ORA_DISK_1
    creating datafile fno=6 name=E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\ETLTBS01.ORA
    channel ORA_DISK_1: starting datafile backupset restore
    channel ORA_DISK_1: specifying datafile(s) to restore from backup set
    restoring datafile 00001 to E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF
    restoring datafile 00002 to E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DBF
    restoring datafile 00003 to E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01.DBF
    restoring datafile 00004 to E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS01.DBF
    restoring datafile 00005 to E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\EXAMPLE01.DBF
    channel ORA_DISK_1: reading from backup piece E:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2
    MF_NNND1_TAG20101213T132300_6JCCFO2X_.BKP
    channel ORA_DISK_1: restored backup piece 1
    piece handle=E:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2010_12_13\O1_MF_NNND1_TAG20101213
    O2X_.BKP tag=TAG20101213T132300
    channel ORA_DISK_1: restore complete, elapsed time: 00:00:55
    Finished restore at 14-DEC-10
    RMAN> recover database until scn 56335390;
    Starting recover at 14-DEC-10
    using channel ORA_DISK_1
    starting media recovery
    media recovery failed
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 12/14/2010 11:36:14
    ORA-00283: recovery session canceled due to errors
    RMAN-11003: failure during parse/execution of SQL statement: alter database recover if needed
    start until change 56335390
    ORA-00283: recovery session canceled due to errors
    ORA-38727: FLASHBACK DATABASE requires a current control file.Edited by: PhoenixBai on Dec 14, 2010 11:37 AM

  • Unable to restore database using RMAN in oracle 10g

    Hi Everyone!!!!!!!
    I have following scenario. In which I don't want to drop newly created tablespace (test). So, let me know how to restore database from existing backup without dropping new tablespace and taking new backup?
    1. I took database backup as
    RMAN > backup database;
    2. Create one tablespace "test"
    3. Then I tried to restore database as (In mount mode)
    RMAN > restore database
    4. But I can't restore database. Even I tried after taking "test" tablespace offline , It returns error as follow
    ORA-01119: error in creating database file 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\TESTCAT\TEST.DBF'
    ORA-27038: created file already exists
    OSD-04010: <create> option specified, file already exists
    Please suggest me step/way so that I can restore database without taking new backup or dropping new tablespace (test).........

    Hello;
    Rename this datafile :
    D:\ORACLE\PRODUCT\10.2.0\ORADATA\TESTCAT\TEST.DBF
    Then try the restore again.
    If this isn't a test database stop and think about how you will recover if this does not work. That is how will you recover from the recover if it goes bad?
    Best Regards
    mseberg

  • Restore RMAN from different Database Rman backup

    Hi Everybody
    I am practicing Rman so I have one query that how to restore rman backup from another database.
    For Example :
    1. I have Rman backup of DB1 with level 0 and level 1 cumulative database plus archievelog
    2. I need to import or restore Rman backup of DB1 to another database DB2.
    What is the procedure for doing the above queries. Please anyone one help me out.
    I have using oracle 10g r2 running in windows server 2003.
    Thanks in advance.

    These are the steps ; you need to write the appropiate commands for each step: Hope it helps!
    1) Take appropriate RMAN backup of the database db1. Note that you should turn on the CONTROLFILE AUTOBACKUP configuration so that we have the controlfile backed up after the database backup. When we restore the controlfile on new host from this autobackup piece, it will have the information of the latest backup.
    2) Create a PFILE for the destination database db2 using the database db1
    3) Move the backup pieces and the modified INIT.ORA file to the new host. Starting from 10g it is NO longer compulsory to copy the RMAN backup pieces to exactly the same location on the new host as the production location.
    4) Use the pfile created above to STARTUP NOMOUNT the database on the new host
    5) Now invoke RMAN and restore the controlfile specifying the location where the controlfile autobackup piece is restored on this new server. You can mount the database once the controlfile is restored successfully.
    6) You can skip this step if you have restored the RMAN backup pieces to exactly the same location they were backed up on database db1. If this is not the case then you need to catalog the RMAN backup pieces to make RMAN aware of thier new location on the new host. Note that CATALOG BACKUPPIECE command is available only starting from 10g.
    7) Having determined the point up to which media recovery should run, start the restore/recovery using for example:
    RMAN> run {
    2> set until sequence 59 thread 1;
    3> set newname for datafile 1 to '/new_location/system01.dbf';
    4> set newname for datafile 2 to '/new_location/undotbs01.dbf';
    5> set newname for datafile 3 to '/new_location/sysaux01.dbf';
    6> set newname for datafile 4 to '/new_location/users01.dbf';
    7> restore database;
    8> switch datafile all;
    9> recover database;
    10> }

  • Getting Error 'errors found reading piece handle' when restore database in rman

    Hi Guru's,
    i'm using oracle 11g and 12.1.3 EBS. i need to refresh the test instance using production rman backup. i set all the datafile path and when i restore the database, all the datafiles are restored but end of that it shows some error (backup piece referring production path). please advise. Thanks
    i'm using following comands
    catalog backuppiece '/PROAPP1/20130623/PROD_DB_okocs65n_33556_1';
    run
    set newname for datafile '/PRODB01/oraprod/db/apps_st/data/system01.dbf' to '/PROAPP2/HYDUAT/db/apps_st/data/system01.dbf' ;
    set newname for datafile  '/PRODB01/oraprod/db/apps_st/data/system02.dbf' to  '/PROAPP2/HYDUAT/db/apps_st/data/system02.dbf';
    restore database;
    following are the output
    channel ORA_DISK_4: restoring datafile 00403 to /PROAPP2/HYDUAT/db/apps_st/data/a_txn_ind02.dbf
    channel ORA_DISK_4: restoring datafile 00406 to /PROAPP2/HYDUAT/db/apps_st/data/a_txn_ind05.dbf
    channel ORA_DISK_4: reading from backup piece /backup/DB/rman/20130623/PROD_DB_omocs65n_33558_1
    channel ORA_DISK_2: errors found reading piece handle=/backup/DB/rman/20130623/PROD_DB_okocs65n_33556_1
    channel ORA_DISK_2: failover to piece handle=/PROAPP1/20130623/PROD_DB_okocs65n_33556_1 tag=TAG20130623T000509
    channel ORA_DISK_2: restored backup piece 1
    channel ORA_DISK_2: restore complete, elapsed time: 01:05:05
    channel ORA_DISK_4: errors found reading piece handle=/backup/DB/rman/20130623/PROD_DB_omocs65n_33558_1
    channel ORA_DISK_4: failover to piece handle=/PROAPP1/20130623/PROD_DB_omocs65n_33558_1 tag=TAG20130623T000509
    channel ORA_DISK_4: restored backup piece 1
    channel ORA_DISK_1: restore complete, elapsed time: 01:13:38
    Finished restore at 28-JUN-13

    >channel ORA_DISK_2: errors found reading piece handle=/backup/DB/rman/20130623/PROD_DB_okocs65n_33556_1
    >channel ORA_DISK_2: failover to piece handle=/PROAPP1/20130623/PROD_DB_okocs65n_33556_1 tag=TAG20130623T000509
    Oracle will try the original expected backup location and then failover to the new (cataloged) location.  To prevent it from trying the original location that is unavailable, you should also CROSSCHECK BACKUP ALL (and optionally DELETE EXPIRED BACKUP ALL) so that it would mark the original location (/backup/DB/rman/20130623...)  as unavailable and not try it at all.
    Hemant K Chitale

  • Help me! cann't restore database using RMAN!!

    i've backuped database using RMAN,
    now datafile of system tablespace have lost,
    and i execute the command as following:
    run {
    allocate channel c1 type disk;
    restore database;
    these are errors:
    RMAN-03002: failure during compilation of command
    RMAN-03013: command type: restore
    RMAN-03002: failure during compilation of command
    RMAN-03013: command type: IRESTORE
    RMAN-06003: ORACLE error from target database: ORA-01843: not a
    valid month
    RMAN-06097: text of failing SQL statement: select decode(bitand
    (festa,(4096+128)
    ),128,fecps,4096,fecps,0) ,decode(bitand(festa,
    (4096+128)),128,281474976710655,4
    096,controlfile_change#,0) ,decode(bitand(festa,
    (4096+128)),128,SYSDATE,4096,con
    trolfile_time,to_date('JAN 01 1988','MON DD
    YYYY')) ,feofs ,feonc_scn ,to_date(n
    vl(feonc_tim,'01/01/88 00:01:01'),'MM/DD/RR HH24:MI:SS')
    into :b1,:b2,:b3,:b4,:b
    5,:b6 from x$kccfe ,v$database where (fenum=:b7 and fedup=1)
    RMAN-06099: error occurred in source file: krmk.pc, line: 21652

    Try setting the NLS_DATE_FORMAT at the command prompt.

  • ORACLE error from auxiliary database: ORA-01152: file 2 was not restored fr

    Hello,
    i'm trying to clone a database. It is in archive log mode.
    I took a full back using below command
    run {
      backup
         tag 'DAILY_WHOLE'
         format 'FULL_backup_%s_%p_%c.bkp'     database
         plus archivelog
         tag 'DAILY_WHOLE'
         delete all input;
      backup
         current controlfile
         format 'FULL_backup_%s_%p_%c.bkp'     tag 'WHOLE'
         spfile
         format 'FULL_backup_%s_%p_%c.bkp'     tag 'WHOLE';
    }then i issue a duplicate database command
    RUN
    DUPLICATE DATABASE TO TEST_DB
              NOFILENAMECHECK
               NOREDO
              BACKUP LOCATION '/disk10/flash_recovery_area/PROD';
    }at the very end I got this error.
    contents of Memory Script:
       Alter clone database open resetlogs;
    executing Memory Script
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 05/15/2013 11:59:21
    RMAN-05501: aborting duplication of target database
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-06136: ORACLE error from auxiliary database: ORA-01152: file 2 was not restored from a sufficiently old backup
    ORA-01110: data file 2: 'sysaux.dbf'Can anyone help me? I would appreciate it. thanks

    NOREDO would be used when you have a Consistent Backup (i.e. backup taken when the database is MOUNTed but not OPEN) and so, no archivelogs need to be applied. (This would also be the case for a NOARCHIVELOG database).
    See the notes on NOREDO in the DUPLICATE command documentation in the Backup and Recovery Reference.
    http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta020.htm#i81724
    Hemant K Chitale

  • RMAN Restore on Test DB Fails - ORA-01152:file 1 was not restored from blah

    Calling all RMAN Gurus!
    I'm having trouble recovering an RMAN backup on my test DB server. Please Help!
    Solaris 10/Oracle 10.2.0.4 Standard Edition (Both Servers)
    Part one - Step by Step
    Primary Server
    1. Perform full backup: backup database plus archivelog;
    2. Copy Backupset & Controlfile to test server: "RSYNC/NFS Mount"
    Test Server
    1. rman target /
    2. startup nomount;
    3. restore controlfile blah blah
    4. alter database mount;
    5. catalog backuppiece
    6. restore database; - no issues
    *7. recover database noredo; - no issues*
    *8. alter database open resetlogs;*
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of alter db command at 09/09/2009 08:48:22
    ORA-01152: file 1 was not restored from a sufficiently old backup
    ORA-01110: data file 1: '/data/oracle/oradata/planodb/system01.dbf'
    All is good until I try and open the database. What am I missing?? Why doesn't this work???
    Because .... If I go through the exact steps but I perform a "recover database" instead of "recover database noredo", I can open the database!!!
    Example :
    6. restore database; no issues
    7. recover database;
    Starting recover at 09-SEP-09
    using channel ORA_DISK_1
    starting media recovery
    channel ORA_DISK_1: starting archive log restore to default destination
    channel ORA_DISK_1: restoring archive log
    archive log thread=1 sequence=34
    channel ORA_DISK_1: reading from backup piece /data/oracle/orabase/backup/backup
    set/2009_09_09/o1_mf_annnn_BACKUP_PLANODB_000_0_5bgkffqq_.bkp
    channel ORA_DISK_1: restored backup piece 1
    piece handle=/data/oracle/orabase/backup/backupset/2009_09_09/o1_mf_annnn_BACKUP
    PLANODB000_0_5bgkffqq_.bkp tag=BACKUP_PLANODB_000_090909010005*
    channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
    archive log filename=/data/oracle/oradata/arch/PLANODB/archivelog/2009_09_09/o1_
    mf_1_34_5bhdkwd4_.arc thread=1 sequence=34
    channel default: deleting archive log(s)
    archive log filename=/data/oracle/oradata/arch/PLANODB/archivelog/2009_09_09/o1_
    mf_1_34_5bhdkwd4_.arc recid=42 stamp=697106925
    unable to find archive log
    archive log thread=1 sequence=35
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 09/09/2009 08:48:52
    RMAN-06054: media recovery requesting unknown log: thread 1 seq 35 lowscn 1425007
    This is ok because seq 35 doesn't actually exist!
    8. alter database open resetlogs;
    database opened!

    You could also explore the UNTIL clause of the RECOVER DATABASE command to specify Recovery until a specific Log, SCN or Timestamp.
    Since you are cloning a Hot Backup to another server the Recovery has to be an Incomplete Recovery. So, it will be to a Log, SCN or Timestamp -- either of which you could also explicitly specify with the UNTIL clause.
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

  • RMAN-20001: target database not found in recovery catalog

    I am practicing loss off all control files. I have rman catalog backups which are set to autobackup controlfile. So far I did this.
    RMAN> startup nomount;
    Oracle instance started
    Total System Global Area 209715200 bytes
    Fixed Size 1272864 bytes
    Variable Size 155190240 bytes
    Database Buffers 50331648 bytes
    Redo Buffers 2920448 bytes
    RMAN> restore controlfile from autobackup;
    Starting restore at 08-SEP-10
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=156 devtype=DISK
    recovery area destination: /u02/flash_recovery
    database name (or database unique name) used for search: TEST
    channel ORA_DISK_1: autobackup found in the recovery area
    channel ORA_DISK_1: autobackup found: /u02/flash_recovery/TEST/autobackup/2009_12_09/o1_mf_s_705171034_5l0kgv4o_.bkp
    channel ORA_DISK_1: control file restore from autobackup complete
    output filename=/u02/control_files/TEST/control02.ctl
    output filename=/u03/oradata/TEST/control03.ctl
    Finished restore at 08-SEP-10
    RMAN> alter database mount;
    database mounted
    released channel: ORA_DISK_1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of alter db command at 09/08/2010 14:54:50
    RMAN-06004: ORACLE error from recovery catalog database: RMAN-20001: target database not found in recovery catalog
    I am assuming this has something to do with DBID but ... I don't have it and I don't know how to find it.

    Hi BelMan,
    Here is output
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    56869 Full 11.20M DISK 00:00:00 08-SEP-10
    BP Key: 56871 Status: AVAILABLE Compressed: NO Tag: TAG20100908T135312
    Piece Name: /u01/oracle/product/10.2.0/db_1/dbs/cf_c-549414289-20100908-00
    Control File Included: Ckp SCN: 125665520 Ckp time: 08-SEP-10
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    56993 Full 11.20M DISK 00:00:00 08-SEP-10
    BP Key: 56995 Status: AVAILABLE Compressed: NO Tag: TAG20100908T142547
    Piece Name: /u01/oracle/product/10.2.0/db_1/dbs/cf_c-549414289-20100908-01
    Control File Included: Ckp SCN: 125668490 Ckp time: 08-SEP-10

  • Restore database not working

    Hi
    i am using oracle9i as database server
    using RMAN i am taking full backup on 22-dec-06
    after that i am doing lot of r&d in database e.g. drop user with cascade
    now i want to restore database using above *.bk file
    so i am doing following things
    STARTUP MOUNT;
    RESTORE DATABASE;
    Starting restore at 07-FEB-07
    using channel ORA_DISK_1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 02/07/2007 13:35:52
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 24 found to restore
    error occurs
    please can you help me to find out solution
    i want to restore from *.bk files
    Chetan

    [1] this is command issued
    =======================
    RMAN>restore database;
    out put is
    Starting restore at 07-FEB-07
    using target database controlfile instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=8 devtype=DISK
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 02/07/2007 14:06:13
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 24 found to restore
    RMAN-06023: no backup or copy of datafile 24 found to restore
    RMAN-06023: no backup or copy of datafile 22 found to restore
    RMAN-06023: no backup or copy of datafile 21 found to restore
    RMAN-06023: no backup or copy of datafile 20 found to restore
    RMAN-06023: no backup or copy of datafile 19 found to restore
    RMAN-06023: no backup or copy of datafile 18 found to restore
    RMAN-06023: no backup or copy of datafile 17 found to restore
    RMAN-06023: no backup or copy of datafile 16 found to restore
    RMAN-06023: no backup or copy of datafile 15 found to restore
    RMAN-06023: no backup or copy of datafile 14 found to restore
    RMAN-06023: no backup or copy of datafile 13 found to restore
    RMAN-06023: no backup or copy of datafile 12 found to restore
    RMAN-06023: no backup or copy of datafile 11 found to restore
    RMAN-06023: no backup or copy of datafile 10 found to restore
    RMAN-06023: no backup or copy of datafile 9 found to restore
    RMAN-06023: no backup or copy of datafile 8 found to restore
    RMAN-06023: no backup or copy of datafile 7 found to restore
    RMAN-06023: no backup or copy of datafile 6 found to restore
    RMAN-06023: no backup or copy of datafile 5 found to restore
    RMAN-06023: no backup or copy of datafile 4 found to restore
    RMAN-06023: no backup or copy of datafile 3 found to restore
    RMAN-06023: no backup or copy of datafile 2 found to restore
    RMAN-06023: no backup or copy of datafile 1 found to restore
    [2] list backup
    ==================
    List of Backup Sets
    ===================
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    182 Full 1M DISK 00:00:01 21-DEC-06
    BP Key: 182 Status: AVAILABLE Tag:
    Piece Name: /usr/oracle9i/product/9.2.0/dbs/c-3244758008-20061221-00
    SPFILE Included: Modification time: 11-DEC-06
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    203 Full 1M DISK 00:00:02 31-JAN-07
    BP Key: 203 Status: AVAILABLE Tag:
    Piece Name: /usr/oracle9i/product/9.2.0/dbs/c-3244758008-20070131-00
    SPFILE Included: Modification time: 31-JAN-07
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    204 Full 1M DISK 00:00:01 31-JAN-07
    BP Key: 204 Status: AVAILABLE Tag:
    Piece Name: /usr/oracle9i/product/9.2.0/dbs/c-3244758008-20070131-01
    SPFILE Included: Modification time: 31-JAN-07
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    205 Full 1M DISK 00:00:02 07-FEB-07
    BP Key: 205 Status: AVAILABLE Tag:
    Piece Name: /usr/oracle9i/product/9.2.0/dbs/c-3244758008-20070207-00
    SPFILE Included: Modification time: 31-JAN-07
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    206 Full 1M DISK 00:00:01 07-FEB-07
    BP Key: 206 Status: AVAILABLE Tag:
    Piece Name: /usr/oracle9i/product/9.2.0/dbs/c-3244758008-20070207-01
    SPFILE Included: Modification time: 31-JAN-07
    [3] file name
    =========================================
    ORACLE9I_20061222_212.bkp
    ORACLE9I_20061222_211.bkp
    Please help me

  • Error to restoring database through rman

    Hi all,
    I am trying to restore database through rman its showing error. The error is
    RMAN> recover database;
    Starting recover at 13-APR-09
    using channel ORA_DISK_1
    starting media recovery
    unable to find archive log
    archive log thread=1 sequence=5
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 04/13/2009 13:00:44
    RMAN-06054: media recovery requesting unknown log: thread 1 seq 5 lowscn 543566
    Please let me know how to resolved this error;
    Thanks in advance
    Noman

    There's no "full or partial" recovery in Oracle.
    There are :
    1. Database Recovery and Tablespace Point In Time Recovery (aka TSPITR)
    In the former case, it is the database that is recovered.
    In TSPITR, a Tablespace is recovered to an (older) point in time, different from the rest of the database. Since a database must be consistent, a TSPITR is done by using an Auxiliary Instance -- only SYSTEM, UNDO and the required Tablespace are recovered to their own consistent point in time and then the Tablespace data is copied and and plugged back into the Target Database.
    2. Complete Recovery and Incomplete Recovery
    Complete Recovery is right upto the current point in time -- ie upto the last transaction in the online redo logs.
    Incomplete Recovery is upto any point of before the current online redo log (a Timestamp, SCN or LogSequenceNumber) .
    The scenario we are talking of is an Incomplete Recovery -- because we do not have the Online Redo Logs.

  • RMAN Restore Database vs Duplicate Database

    Currently we have Dev Database which runs on its own Server and registered in Dev Catalog Database for RMAN backups. We also have production Database which runs on own server and register to Prod Catalog Database for RMAN backups.(Both databases 10g running on AIX servers)
    We are in process of developing new process which allows us to refresh Dev Database from Production couple times per week.
    Here are my questions. Since Production Database is utilizing RMAN for backups I want to use RMAN Duplicate to new host or restore to new host
    1.     Would duplicate command auto register newly re created Dev Database in Prod Catalog ? I really do not want to.
    2.     Would Duplicate will generate new DBID for re created Dev Database? I do not want to ..
    3.     Since Dev Database registered in its own RMAN Catalog. We would want to continue to run regular backups every night. Do we need to do anything special or just run regular backup script?
    4.     Also should we look at regular RMAN recovery/restore option to new host instead of RMAN Duplicate for what we need to accomplish?
    Any input would be really appreciated.

    If you need "up-to-date" data in your dev environment, you have no choice but to duplicate your prod database.
    Restoring would only apply if you wanted the same data as was in your dev database as of a certain point in time.
    RMAN is pretty straight forward and if that works for you, I would continue with that method.
    If you also do hot/cold backups (O/S copies), then the question of speed comes into play (is it faster to copy the O/S files to your dev servers and apply the needed archivelogs or is RMAN faster). We have scenarios when RMAN is twice as fast as O/S copies and others when O/S copies are better. Testing should tell you which would be best in your case.
    I hope that answers your question.

Maybe you are looking for

  • An error during the boot

    sunsparc.localhost svc.startd[7]: [ID 652011 daemon.warning] svc :/network/rpc/nisplus:default: Method "/lib/svc/method/nisplus" failed with exit status 96. bash-3.00# cat network-rpc-nisplus:default.log [ feb 11 12:33:35 Disabled. ] [ feb 11 12:33:3

  • OnDemand HD Content

    Hi, this question has probably been asked before but cant seem to see anything to answer my question. So, my question is..... Obviously on BT Vision I can download Box Office Movies in HD if I want to watch them later, however I was wondering if ther

  • Deleting extra characters

    Is there a way to delete extra characters in a StringBuffer after the first occurance? For example, if I wanted to delete all comma's after the first occurance in a string, this seems to work:           if(custName.lastIndexOf(",") > custName.indexOf

  • No ttJdbc in java.library.path

    Hi, I am getting following error while starting JBOSS which is pointing to timesten (java.sql.SQLException: Problems with loading native library/missing methods: no ttJdbc in java.library.path) I have set LD_LIBRARY_PATH /u01/app/oracle/product/10.2.

  • Printed documentation missing some inline styles

    I'm using RH HTML 7, Word 2003, and my own Word template file.  Some of the inline style information is not being applied to the Word output. Example:  In both RH and Word, the Normal style has 14 pts of space before and after the paragraph.  In one