Recovery in sqlplus

Hi;
When I shutdown abort, instance recovery is done automatically once I open the database.
What I want to ask is, when I issue
'recover database using backup controlfile' statement even only once,
I can not recover the database with normal 'recover database' clause.
Does this statement modify controlfile or datafiles? Whats the reason for this?
Here is the demo:
SQL>shutdown abort;
ORACLE instance shut down.
startup mount;
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1287016 bytes
Variable Size 92277912 bytes
Database Buffers 188743680 bytes
Redo Buffers 2904064 bytes
Database mounted.
SQL>recover database using backup controlfile;
ORA-00279: change 3574972 generated at 12/06/2009 18:34:54 needed for thread 1
ORA-00289: suggestion :
C:\ORACLEXE\APP\ORACLE\FLASH_RECOVERY_AREA\XE\ARCHIVELOG\2009_12_06\O1_MF_1_4_%U_.
ORA-00280: change 3574972 for thread 1 is in sequence #4
Specify log: {suggested | filename | AUTO | CANCEL}
cancel
Media recovery cancelled.
SQL>recover database;
ORA-00283: recovery session canceled due to errors
ORA-01610: recovery using the BACKUP CONTROLFILE option must be doneIf I issue recover database at first rather than 'recover database using backup controlfile', I can successfully do the recovery.

Hi john,
Let me try to explain, See, basic thing, usually we go for "using backup control file" on conditions
- Controlfile is older than any of your datafileson current DB at any moment, since all the c/r/d file mantain consistency.
- worst case when valid current control file is corrupted or deleted.
Coming, to your Issue, from your demo, if you see you have mounted the DB - at this moment it's Check the controlfile (reads) and checks the rest of the data and redo logs for validity - consistency Checks will be carried and logs will be ready for new transactions. At this moment if you are carry out the recovery where you are using the old control file, which does not know the new changes carried out and you tried to carryout the recovery - as a part of it - it inturn generated Redo Vectors - @ that point of moment if you check the redo vectors all are in process of current DB and did not expected for recovery. since due to recovery they got mixed up( or got updated with in sync old control file). Now if recovery continues..but it should stop until the point of all archives are applied and .. it must the control file and data file for consistent state to stop the recovery.
Since, we need to for provided options, either cancel or provided available logs till the scn's are in sync. Due to that you need to startup the DB with New Reset Logs.
HTH
- Pavan Kumar N
Oracle 9i/10g - OCP
http://oracleinternals.blogspot.com/

Similar Messages

  • Unable to sqlplus as user system to a standby db in recovery mode

    Getting "ORA-01033: ORACLE initialization or shutdown in progress".
    When trying to sqlplus system user on a standby instance that is in recovery mode.
    Where as able to log in as sqlplus "/ as sysdba"
    I checked the db it is not shuting down or starting it is in recovery mode.. no errors in alert log..
    1) --------------------
    $ sqlplus system@TEST1
    SQL*Plus: Release 9.2.0.6.0 - Production on Sun Feb 26 04:47:35 2006
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Enter password:
    ERROR:
    ORA-01033: ORACLE initialization or shutdown in progress
    $ ps -ef | grep mrp
    oracle 26759 1 0 04:24:19 ? 0:00 ora_mrp0_TEST1
    2) -------------
    $ sqlplus "/ as sysdba"
    SQL*Plus: Release 9.2.0.6.0 - Production on Sun Feb 26 04:50:14 2006
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.6.0 - Production
    3)--------
    $ sqlplus "/ as sysdba"
    SQL*Plus: Release 9.2.0.6.0 - Production on Sun Feb 26 04:50:14 2006
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.6.0 - Production
    4)----------
    SQL> select process, status from v$managed_standby;
    PROCESS STATUS
    ARCH CONNECTED
    ARCH CONNECTED
    MRP0 WAIT_FOR_LOG
    RFS RECEIVING

    A standby database in recovery mode is only accessible as sysdba for administrative purposes. You have to open the DB in read only mode to access it as "normal" user.
    See http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96653/manage_ps.htm#1014483

  • Noob needs help with SQLPLUS

    I googled all over, here is my problem:
    I cannot run sqlplus from command dos window, I get that ORA-12560: TNS:protocol adapter error, but I can run sqlplus from all programs--> oracleclient10g_1-->application development->SQLPLUS.
    Why?

    Making sqlplus work is one thing, but cloning a complete database is accelerating from 0 to 100 at the speed of a wink. I suggest you to get involved with recovery manager and recovery concepts. Once you understand how a recovery process is being carried out I suggest you this link: --> Clone a Database Using RMAN
    ~ Madrid
    http://hrivera99.blogspot.com/

  • How to find out that recovery is sufficient

    HEllo all,
    Lets say I am running recovery of database (no RMAN) and I apply few redologs. How can I find out that recovery done on datafiles so far is sufficient and datafiles are in consistent state so I can open DB w/o problems? I mean , I know that I would get error in case I try to open DB and datafiles need more recovery, but I would like to see some kind of proof on my screen that recovery is not finished (probably some v$ view or something ).
    Or it does not have to be an option that I am running recovery of DB, it can be that my DB is running and there is some failure which will require media recovery . Where can I see expect logs that I need to recover because of this or that does not match (I guess in some v$view for datafiles will be mismatch of some numbers comparing to v$controlfile or v$database view.....or??? )
    I hope you guys got it what I mean :)))if not just let me know I'll try to explain it better
    thx

    You claim to have done an Offline Backup. And yet, Oracle asked for Recovery. Then there might be something wrong with your backup.
    Here I do a normal shutdown of the database and when I MOUNT, I see that the files are NOT Fuzzy :
    ora10204>sqlplus '/ as sysdba'
    SQL*Plus: Release 10.2.0.4.0 - Production on Thu Aug 27 23:24:40 2009
    Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
    Connected to an idle instance.
    SQL> startup
    ORACLE instance started.
    Total System Global Area  880803840 bytes
    Fixed Size                  2087992 bytes
    Variable Size             197133256 bytes
    Database Buffers          675282944 bytes
    Redo Buffers                6299648 bytes
    Database mounted.
    Database opened.
    SQL> select file#,fuzzy, checkpoint_change#, to_char(checkpoint_time,'DD-MON HH24:MI:SS') from v$datafile_header order by 1;
         FILE# FUZ CHECKPOINT_CHANGE# TO_CHAR(CHECKPO
             1 YES            2063978 27-AUG 23:24:48
             2 YES            2063978 27-AUG 23:24:48
             3 YES            2063978 27-AUG 23:24:48
             4 YES            2063978 27-AUG 23:24:48
             5 YES            2063978 27-AUG 23:24:48
    SQL> shutdown
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup mount
    ORACLE instance started.
    Total System Global Area  880803840 bytes
    Fixed Size                  2087992 bytes
    Variable Size             197133256 bytes
    Database Buffers          675282944 bytes
    Redo Buffers                6299648 bytes
    Database mounted.
    SQL> select file#,fuzzy, checkpoint_change#, to_char(checkpoint_time,'DD-MON HH24:MI:SS') from v$datafile_header order by 1;
         FILE# FUZ CHECKPOINT_CHANGE# TO_CHAR(CHECKPO
             1 NO             2064344 27-AUG 23:25:36
             2 NO             2064344 27-AUG 23:25:36
             3 NO             2064344 27-AUG 23:25:36
             4 NO             2064344 27-AUG 23:25:36
             5 NO             2064344 27-AUG 23:25:36
    SQL> alter database open;
    Database altered.
    SQL> select file#,fuzzy, checkpoint_change#, to_char(checkpoint_time,'DD-MON HH24:MI:SS') from v$datafile_header order by 1;
         FILE# FUZ CHECKPOINT_CHANGE# TO_CHAR(CHECKPO
             1 YES            2064345 27-AUG 23:28:49
             2 YES            2064345 27-AUG 23:28:49
             3 YES            2064345 27-AUG 23:28:49
             4 YES            2064345 27-AUG 23:28:49
             5 YES            2064345 27-AUG 23:28:49
    SQL> The MOUNT after a NORMAL Shutdown that would have been used for an Offline Backup, shows "NO" for Fuzziness of datafiles.
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

  • Error during restore/recovery and 'open resetlogs'

    Hello forum. I'm attempting to restore a database to a new host and have run into an error during the opening of the database (with resetlogs). The renaming of the datafiles, restore, switching of datafiles, and recovery are all done by an rman script, the contents of which are below:
    # Restore production database to DR site using file system
    # instead of ASM
    run {
    set newname for datafile 1 to '/opt/oracle/product/10gR2/oradata/DB01/system.dbf';
    set newname for datafile 2 to '/opt/oracle/product/10gR2/oradata/DB01/undotbs1.dbf';
    set newname for datafile 3 to '/opt/oracle/product/10gR2/oradata/DB01/sysaux.dbf';
    set newname for datafile 4 to '/opt/oracle/product/10gR2/oradata/DB01/users.dbf';
    set newname for datafile 5 to '/opt/oracle/product/10gR2/oradata/DB01/undotbs2.dbf';
    set newname for datafile 6 to '/opt/oracle/product/10gR2/oradata/DB01/file1.dbf';
    set newname for datafile 7 to '/opt/oracle/product/10gR2/oradata/DB01/file2.dbf';
    restore database;
    switch datafile all;
    recover database;
    I get the following output:
    RMAN> @/home/oracle/scripts/rman_dr.rman
    RMAN> # Restore production database to DR site using file system
    2> # instead of ASM
    3> #
    4> run {
    5> set newname for datafile 1 to '/opt/oracle/product/10gR2/oradata/DB01/system.dbf';
    6> set newname for datafile 2 to '/opt/oracle/product/10gR2/oradata/DB01/undotbs1.dbf';
    7> set newname for datafile 3 to '/opt/oracle/product/10gR2/oradata/DB01/sysaux.dbf';
    8> set newname for datafile 4 to '/opt/oracle/product/10gR2/oradata/DB01/users.dbf';
    9> set newname for datafile 5 to '/opt/oracle/product/10gR2/oradata/DB01/undotbs2.dbf';
    10> set newname for datafile 6 to '/opt/oracle/product/10gR2/oradata/DB01/file1.dbf';
    11> set newname for datafile 7 to '/opt/oracle/product/10gR2/oradata/DB01/file2.dbf';
    12>
    13> restore database;
    14> switch datafile all;
    15> recover database;
    16> }
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    Starting restore at 03-JAN-08
    Starting implicit crosscheck backup at 03-JAN-08
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=156 devtype=DISK
    Crosschecked 651 objects
    Finished implicit crosscheck backup at 03-JAN-08
    Starting implicit crosscheck copy at 03-JAN-08
    using channel ORA_DISK_1
    Crosschecked 1 objects
    Finished implicit crosscheck copy at 03-JAN-08
    searching for all files in the recovery area
    cataloging files...
    no files cataloged
    using channel ORA_DISK_1
    channel ORA_DISK_1: starting datafile backupset restore
    channel ORA_DISK_1: specifying datafile(s) to restore from backup set
    restoring datafile 00001 to /opt/oracle/product/10gR2/oradata/DB01/system.dbf
    restoring datafile 00002 to /opt/oracle/product/10gR2/oradata/DB01/undotbs1.dbf
    restoring datafile 00003 to /opt/oracle/product/10gR2/oradata/DB01/sysaux.dbf
    restoring datafile 00004 to /opt/oracle/product/10gR2/oradata/DB01/users.dbf
    restoring datafile 00005 to /opt/oracle/product/10gR2/oradata/DB01/undotbs2.dbf
    restoring datafile 00006 to /opt/oracle/product/10gR2/oradata/DB01/file1.dbf
    restoring datafile 00007 to /opt/oracle/product/10gR2/oradata/DB01/file2.dbfchannel ORA_DISK_1: reading from backup piece /ocfs2/remitpro/oracleBackups/tmp/rman_LV0_DB01.642899284.1.1.bus
    channel ORA_DISK_1: restored backup piece 1
    piece handle=/ocfs2/remitpro/oracleBackups/tmp/rman_LV0_DB01.642899284.1.1.bus tag=20080101_LV0_DB
    channel ORA_DISK_1: restore complete, elapsed time: 01:22:28
    Finished restore at 03-JAN-08
    datafile 1 switched to datafile copy
    input datafile copy recid=14 stamp=643049225 filename=/opt/oracle/product/10gR2/oradata/DB01/system.dbf
    datafile 2 switched to datafile copy
    input datafile copy recid=15 stamp=643049225 filename=/opt/oracle/product/10gR2/oradata/DB01/undotbs1.dbf
    datafile 3 switched to datafile copy
    input datafile copy recid=16 stamp=643049225 filename=/opt/oracle/product/10gR2/oradata/DB01/sysaux.dbf
    datafile 4 switched to datafile copy
    input datafile copy recid=17 stamp=643049225 filename=/opt/oracle/product/10gR2/oradata/DB01/users.dbf
    datafile 5 switched to datafile copy
    input datafile copy recid=18 stamp=643049225 filename=/opt/oracle/product/10gR2/oradata/DB01/undotbs2.dbf
    datafile 6 switched to datafile copy
    input datafile copy recid=19 stamp=643049225 filename=/opt/oracle/product/10gR2/oradata/DB01/file1.dbf
    datafile 7 switched to datafile copy
    input datafile copy recid=20 stamp=643049225 filename=/opt/oracle/product/10gR2/oradata/DB01/file2.dbf
    Starting recover at 03-JAN-08
    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=2 sequence=1005
    channel ORA_DISK_1: restoring archive log
    archive log thread=1 sequence=1365
    channel ORA_DISK_1: reading from backup piece /ocfs2/remitpro/oracleBackups/tmp/rman_LV0_DB01.642900444.1.1.bus
    channel ORA_DISK_1: restored backup piece 1
    piece handle=/ocfs2/remitpro/oracleBackups/tmp/rman_LV0_DB01.642900444.1.1.bus tag=20080101_LV0_DB
    channel ORA_DISK_1: restore complete, elapsed time: 00:00:05
    archive log filename=/opt/oracle/product/10gR2/db/flash_recovery_area/DB01/archivelog/2008_01_03/o1_mf_1_1365_3qtshnfv_.arc thread=1 sequence=1365
    archive log filename=/opt/oracle/product/10gR2/db/flash_recovery_area/DB01/archivelog/2008_01_03/o1_mf_2_1005_3qtshncz_.arc thread=2 sequence=1005
    channel default: deleting archive log(s)
    archive log filename=/opt/oracle/product/10gR2/db/flash_recovery_area/DB01/archivelog/2008_01_03/o1_mf_1_1365_3qtshnfv_.arc recid=2418 stamp=643049236
    unable to find archive log
    archive log thread=1 sequence=1366
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 01/03/2008 16:47:22
    RMAN-06054: media recovery requesting unknown log: thread 1 seq 1366 lowscn 181804603
    RMAN> **end-of-file**
    I searched for a decription of the 06054 error, and found that if the archive logs weren't available, then to run "alter database open resetlogs;", which I did. Here's the output:
    RMAN> alter database open resetlogs;
    database opened
    RMAN-06900: WARNING: unable to generate V$RMAN_STATUS or V$RMAN_OUTPUT row
    RMAN-06901: WARNING: disabling update of the V$RMAN_STATUS and V$RMAN_OUTPUT rows
    ORACLE error from target database:
    ORA-06553: PLS-801: internal error [56319]
    I've done all of this twice now, with the same result. I've googled PLS-801 and found more than a few instances of people getting this code, but not during a database open after a restore. Can anyone shed some light on what might have gone wrong? In the interest of brevity, I left out the rest of the restore process prior to running the database restore, but other than setting "compatible" and "db_recovery_file_dest_size", it was all by the book.
    Thanks in advance.

    Thanks for the reply Pierre.
    I am not using RMAN Duplicate. Yes, the source of the backup is an RAC. The destination is a single server, with the DB on the filesystem. Here's an overview of of the commands I ran and the procedure.
    Copied tar'd backup controlfile and datafiles to destination machine. Untar'd. Install 10.2.0.1.0 on destination machine, patch to 10.2.0.2.0.
    OS> sqlplus /nologin
    SQL> alter system set compatible = '10.2.0.2.0' scope=spfile;
    SQL> alter system set db_recovery_dest_file_size = '8g'; scope spfile;
    SQL> shutdown immediate;
    SQL> startup; (to verify changes took...)
    SQL> shutdown immediate;
    OS> Copy control file from untar'd dir and place in $ORACLE_HOME/dbs/, truncate name to c-DBID-date-00.
    OS> rman target /
    RMAN> startup nomount;
    RMAN> set dbid <dbid from control file>;
    RMAN> restore controlfile from autobackup; (finds control file with no problem...)
    RMAN> alter database mount;
    RMAN> @/home/oracle/rman_dr.rman (script cited in first post, to rename datafiles from ASM to filesystem, restore, switch files, and recover...)
    RMAN> alter database open resetlogs; (as cited before...)
    If I'm not using Duplicate and not specifying dates, the UNTIL/SET UNTIL commands aren't necessary, correct?

  • 9.2.0.6 RMAN Disaster recovery issue

    Our production database crashed and we are doing DR on a new host.
    We dont have any catalog database and we dont use controlfile autobackup.
    We just do a full backup including controlfile and also archive logs
    CONFIGURE DEFAULT DEVICE TYPE TO DISK;
    run {
    allocate channel d1 type disk;
    backup database format '/data/TESTDB/rman/testdb_bk_%s_%p_%t' include current controlfile;
    backup archivelog all format '/data/TESTDB/rman/testdb_al_%s_%p_%t' delete input;
    release channel d1;
    We copied these backup pieces to the new host and tried the following way to restore the database.
    startup nomount
    rman
    connect target /
    RMAN> set DBID 2507695351;
    executing command: SET DBID
    RMAN> run
    2> {
    3> allocate channel d1 type disk;
    4> restore controlfile from '/data/TESTDB/rman/testdb_bk_2_1_724368405';
    5> }
    allocated channel: d1
    channel d1: sid=12 devtype=DISK
    Starting restore at 14-JUL-10
    channel d1: restoring controlfile
    channel d1: restore complete
    replicating controlfile
    input filename=/data/TESTDB/cntrl01.dbf
    output filename=/data/TESTDB/cntrl02.dbf
    output filename=/data/TESTDB/cntrl03.dbf
    Finished restore at 14-JUL-10
    released channel: d1
    exit
    sqlplus '/ as sysdba'
    shutdown immediate;
    startup mount;
    RMAN> run
    2> {
    3> allocate channel d1 type disk;
    4> restore database;
    5> }
    using target database controlfile instead of recovery catalog
    allocated channel: d1
    channel d1: sid=12 devtype=DISK
    Starting restore at 15-JUL-10
    released channel: d1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 07/15/2010 00:03:18
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 2 found to restore
    RMAN-06023: no backup or copy of datafile 1 found to restore
    We are using 9.2.0.6 on LINUX
    The list backup commands too return EMPTY
    RMAN> list backup;
    RMAN> list backup of database;
    ---Any ideas ?
    Srinivas

    I am also uploading the logfile of the backup job of the source database
    RMAN> run
    2> {
    3> allocate channel d1 type disk;
    4> backup database format '/data/TESTDB/rman/testdb_bk_%s_%p_%t' include current controlfile;
    5> backup archivelog all format '/data/TESTDB/rman/testdb_al_%s_%p_%t' delete input;
    6> release channel d1;
    7> }
    allocated channel: d1
    channel d1: sid=17 devtype=DISK
    Starting backup at 14-JUL-10
    channel d1: starting full datafile backupset
    channel d1: specifying datafile(s) in backupset
    including current controlfile in backupset
    input datafile fno=00001 name=/data/TESTDB/system01.dbf
    input datafile fno=00002 name=/data/TESTDB/undotbs01.dbf
    channel d1: starting piece 1 at 14-JUL-10
    channel d1: finished piece 1 at 14-JUL-10
    piece handle=/data/TESTDB/rman/testdb_bk_2_1_724368405 comment=NONE
    channel d1: backup set complete, elapsed time: 00:00:01
    Finished backup at 14-JUL-10
    Starting backup at 14-JUL-10
    current log archived
    channel d1: starting archive log backupset
    channel d1: specifying archive log(s) in backup set
    input archive log thread=1 sequence=3 recid=1 stamp=724368322
    input archive log thread=1 sequence=4 recid=2 stamp=724368406
    channel d1: starting piece 1 at 14-JUL-10
    channel d1: finished piece 1 at 14-JUL-10
    piece handle=/data/TESTDB/rman/testdb_al_3_1_724368406 comment=NONE
    channel d1: backup set complete, elapsed time: 00:00:02
    channel d1: deleting archive log(s)
    archive log filename=/data/TESTDB/arch/archTESTDB_3.arc recid=1 stamp=724368322
    archive log filename=/data/TESTDB/arch/archTESTDB_4.arc recid=2 stamp=724368406
    Finished backup at 14-JUL-10
    released channel: d1
    RMAN> exit

  • Problems with Recovery

    Hello,
    Can someone please help me out here:
    My system (winXP) comprises of 2 hard drives in which Oracle10g was on C drive
    and I multiplexed my controlfile and logfile on E which is a logical drive
    on C and have the 3rd copies on the 2nd hard drive (F).
    I took out the 2nd hard drive (F) that has my 3rd multiplex copies of my controlfile
    and logfiles trying to practise some recovery. I've tried what I know but it's not
    working. I deleted the entry for the 3rd multiplex controlfile and logfile in the
    PFILE, it does not help.
    When I tried to start SQL*Plus, I get this error message:
    ORA-01034: ORACLE not available
    ORA-27101: Shared memory realm does not exist.
    Meanwhile, the listener, oracle service and the dbconsole are all started.
    Please how do I get my database up and running.
    Here's the message I got from SQL*PLUS prompt:
    C:\>sqlplus /nolog
    SQL> conn /as sysdba
    Connected to an idle instance.
    SQL> startup nomount
    ORA-01261: Parameter db_create_online_log_dest_3 destination string cannot be translated
    ORA-01263: Name given for file destination directory is invalid
    OSD-04018: Unable to access the specified directory or device.
    O/S-Error: (OS 3) The system cannot find the file specified.
    Regards and thanks,
    Cherish

    Thank you so much it worked.
    Actually, I copied a new controlfile and logfile into a new location and make the changes
    in the pfile still making it 3 multiplex copies but on different logical drive
    then issued this:
    SQL> conn /as sysdba
    Connected to an idle instance.
    SQL> startup mount pfile=C:\oracle\base\admin\mydb\pfile\init.ora.8122007231436;
    ORACLE instance started.
    Total System Global Area 167772160 bytes
    Fixed Size 787968 bytes
    Variable Size 57670144 bytes
    Database Buffers 109051904 bytes
    Redo Buffers 262144 bytes
    Database mounted.
    But when I tried to open the database I get the following error message:
    SQL> startup open;
    ORA-27091: unable to queue I/O
    ORA-27067: size of I/O buffer is invalid
    OSD-04026: Invalid parameter passed.
    Please what do I do next?
    Thanks again.
    Regards,
    Cherish

  • ORA-01124: cannot recover data file 1 - file is in use or recovery

    I am trying to recover standby database, but it is giving the below error.
    ORA-00283: recovery session canceled due to errors
    ORA-01124: cannot recover data file 1 - file is in use or recovery, recovery is already stated
    ORA-01110: data file 1: 'I:\ORACLE\QAS\SAPDATA1\SYSTEM_1\SYSTEM.DATA1'
    when i checked in the alert log the recovery is not started. and later i hae given "alter database recover cancel' and the command end up with the below line
    "media recovery not started".
    it seems that the recovery has stuck in between.
    please advise me how to kill the recovery session that's stuck. because i dont want to bounce the standby database.
    thanks in advance.

    Without dataguard and MRP, you are running a scripted standby.
    In a scripted standby, a RECOVER DATABASE session would have an UNTIL clause (most likely UNTIL SEQUENCE). At the end of the recovery to that point (SEQUENCE#), it exits and shuts down the database.
    Also, the scripting is such that when one RECOVER session is active, another session is not allowed to start. It may loop in wait state or exit and retry at the next scheduled interval.
    Apparently your standby scripting is not robust enough to prevent another RECOVER session from starting off even as the first is active (and/or it doesn't have a proper UNTIL clause and stop, exit, shutdown actions)
    What you have is a custom implementation of a standby database. Without complete details of the script, the "locking" between sessions (to prevent a second RECOVER from starting when one is already running) etc .... we really cannot do much to help you.
    Your scripts should be maintaing status information . It should be possible for you to discover the "other" sqlplus session that has issued a RECOVER DATABASE but not yet exited (e.g. ... how about a simple "ps -ef |grep sql" and "ps -ef | grep ora" combination ??)
    Hemant K Chitale
    Edited by: Hemant K Chitale on May 29, 2013 5:47 PM

  • ORA-16005 : database requires recovery

    Following error occurred while trying to open oracle datababse in read only mode
    $ sqlplus /nolog
    SQL> connect /as sysdba
    connected
    SQL>
    SQL> startup nomount
    ORACLE instance started
    Total System Global Area 612368384 bytes
    Fixed Size 1281504 bytes
    Variable Size 163578400 bytes
    Database Buffers 415236096 bytes
    Redo Buffes 32272348 bytes
    SQL>
    SQL> alter database mount ;
    Database altered
    SQL> alter database open ready only ;
    alter database open ready only
    ERROR at line 1:
    ORA-16005: database requires recovery
    SQL>
    Since database is in No Archive mode why it is giving ORA-16005 error while starting a databse in ready only mode ????

    ORA-16005 database requires recovery
    Cause: The database requires recovery, and therefore cannot be opened for read-only access by this instance.
    Action: Perform the necessary recovery and re-open for read-only access.
    Oracle says as above. Please perform the recovery and then open the database in read only mode. We are unaware about what happened before.

  • Direct-Path with (No)Archivelog and recovery

    Hi,
    In a datawarehouse environment, our database is in NOARCHIVELOG. When we do a Insert /*+ APPEND */ on a table withLOGGING attribute, a miniminal redo log is generated.
    We want to switch the database in ARCHIVELOG mode, and change the attribute of the table to NOLOGGING .
    My question is, does instance recovery will work ?
    I made a matrix of the effect of a crash while a direct-path Insert operation :
    Database mode                   Table mode               Instance recovery                      Media recovery
    NOARCHIVELOG                     LOGGING                        OK                                     NOT OK
    ARCHIVELOG                       LOGGING                        OK                                     OK
    ARCHIVELOG                       NOLOGGING                      OK                                     NOT OK
    Do you agree with this matrix ?
    Regards

    Yes instance recovery will work regardless of direct-path and nologgging usage.
    Here is an example with Oracle XE on Windows (database runs in ARCHIVELOG mode and FORCE_LOGGING is not set):
    c:\tmp>rman target /
    Recovery Manager: Release 11.2.0.2.0 - Production on Jeu. Janv. 12 20:05:32 2012
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    connected to target database: XE (DBID=2642463371)
    RMAN> report unrecoverable;
    using target database control file instead of recovery catalog
    Report of files that need backup due to unrecoverable operations
    File Type of Backup Required Name
    RMAN> exit
    Recovery Manager complete.
    c:\tmp>sqlplus xxx/xxx @nolog.sql
    SQL*Plus: Release 11.2.0.2.0 Production on Jeu. Janv. 12 20:05:48 2012
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production
    SQL> select log_mode, force_logging from v$database;
    LOG_MODE     FOR
    ARCHIVELOG   NO
    SQL> drop table tnl purge;
    Table dropped.
    SQL> create table tnl(x int) nologging tablespace users;
    Table created.
    SQL> insert /*+ APPEND */ into tnl select object_id from all_objects;
    17971 rows created.
    SQL> commit;
    Commit complete.
    SQL> connect / as sysdba
    Connected.
    SQL> startup force
    ORACLE instance started.
    Total System Global Area 1071333376 bytes
    Fixed Size                  1388352 bytes
    Variable Size             658505920 bytes
    Database Buffers          406847488 bytes
    Redo Buffers                4591616 bytes
    Database mounted.
    Database opened.
    SQL> exit
    Disconnected from Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production
    c:\tmp>rman target /
    Recovery Manager: Release 11.2.0.2.0 - Production on Jeu. Janv. 12 20:07:34 2012
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    connected to target database: XE (DBID=2642463371)
    RMAN> report unrecoverable;
    using target database control file instead of recovery catalog
    Report of files that need backup due to unrecoverable operations
    File Type of Backup Required Name
    4    full or incremental     C:\ORACLEXE\APP\ORACLE\ORADATA\XE\USERS.DBF
    RMAN> exit
    Recovery Manager complete.
    c:\tmp>Edited by: P. Forstmann on 12 janv. 2012 20:08

  • Recovery datafile

    Hi
    I changed the datafile offline, and the database is noarchivelog mode.
    After a few days I want to bring the datafile online.
    Since there will be no transactions to this datafile, during recovery oracle only need to update the checkpoint scn of this datafile
    Do I need archivelogs in this scenerio inorder to bring the datafile online?

    SQL> select substr(name,1,50) fname,checkpoint_change#,last_change#,status
      2    from v$datafile
      3  /
    FNAME                                              CHECKPOINT_CHANGE#     LAST_CHANGE# STATUS
    /u01/app/oracle/oradata/mmi/system01.dbf                       970305                SYSTEM
    /u01/app/oracle/oradata/mmi/sysaux01.dbf                       970305                ONLINE
    /u01/app/oracle/oradata/mmi/undotbs01.dbf                      970305                ONLINE
    /u01/app/oracle/oradata/mmi/users01.dbf                        986290                ONLINE
    SQL> alter database datafile '/u01/app/oracle/oradata/mmi/users01.dbf' offline
      2  /
    Database altered.
    SQL> alter system switch logfile
      2  /
    System altered.
    SQL> /
    System altered.
    SQL> /
    System altered.
    SQL> /
    System altered.
    SQL> /
    System altered.
    SQL> /
    System altered.
    SQL> /
    System altered.
    SQL> select substr(name,1,50) fname,checkpoint_change#,last_change#,status
      2    from v$datafile
      3  /
    FNAME                                              CHECKPOINT_CHANGE#     LAST_CHANGE# STATUS
    /u01/app/oracle/oradata/mmi/system01.dbf                       986389                SYSTEM
    /u01/app/oracle/oradata/mmi/sysaux01.dbf                       986389                ONLINE
    /u01/app/oracle/oradata/mmi/undotbs01.dbf                      986389                ONLINE
    /u01/app/oracle/oradata/mmi/users01.dbf                        986290         986332 RECOVERHere CHECKPOINT_CHANGE# is START SCN 986290 and LAST_CHANGE# is STOP SCN for each datafile header within controlfile,
    when you turn offline the datafile the current_scn updated 986332 to that users datafile which will always require
    recovery from 986290 to 986332
    SQL> exit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    [oracle@localhost ~]$ rman target /
    Recovery Manager: Release 11.1.0.6.0 - Production on Mon Oct 19 15:46:19 2009
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    connected to target database: MMI (DBID=2169341975)
    RMAN> delete archivelog all;
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=123 device type=DISK
    List of Archived Log Copies for database with db_unique_name MMI
    =====================================================================
    Key     Thrd Seq     S Low Time
    51      1    1       A 16-OCT-09
            Name: /u01/app/oracle/product/11.1.0/db_1/dbs/arch1_1_700406932.dbf
    52      1    1       A 16-OCT-09
            Name: /u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_1_5fqwrsn2_.arc
    53      1    2       A 19-OCT-09
            Name: /u01/app/oracle/product/11.1.0/db_1/dbs/arch1_2_700406932.dbf
    54      1    2       A 19-OCT-09
            Name: /u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_2_5frjsk7y_.arc
    55      1    3       A 19-OCT-09
            Name: /u01/app/oracle/product/11.1.0/db_1/dbs/arch1_3_700406932.dbf
    56      1    3       A 19-OCT-09
            Name: /u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_3_5frjsl62_.arc
    57      1    4       A 19-OCT-09
            Name: /u01/app/oracle/product/11.1.0/db_1/dbs/arch1_4_700406932.dbf
    58      1    4       A 19-OCT-09
            Name: /u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_4_5frjsmws_.arc
    59      1    5       A 19-OCT-09
            Name: /u01/app/oracle/product/11.1.0/db_1/dbs/arch1_5_700406932.dbf
    60      1    5       A 19-OCT-09
            Name: /u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_5_5frjso5m_.arc
    61      1    6       A 19-OCT-09
            Name: /u01/app/oracle/product/11.1.0/db_1/dbs/arch1_6_700406932.dbf
    62      1    6       A 19-OCT-09
            Name: /u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_6_5frjsos4_.arc
    63      1    7       A 19-OCT-09
            Name: /u01/app/oracle/product/11.1.0/db_1/dbs/arch1_7_700406932.dbf
    64      1    7       A 19-OCT-09
            Name: /u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_7_5frjspqd_.arc
    65      1    8       A 19-OCT-09
            Name: /u01/app/oracle/product/11.1.0/db_1/dbs/arch1_8_700406932.dbf
    66      1    8       A 19-OCT-09
            Name: /u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_8_5frjsqhs_.arc
    Do you really want to delete the above objects (enter YES or NO)? yes
    deleted archived log
    archived log file name=/u01/app/oracle/product/11.1.0/db_1/dbs/arch1_1_700406932.dbf RECID=51 STAMP=700653804
    deleted archived log
    archived log file name=/u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_1_5fqwrsn2_.arc RECID=52 STAMP=700653804
    deleted archived log
    archived log file name=/u01/app/oracle/product/11.1.0/db_1/dbs/arch1_2_700406932.dbf RECID=53 STAMP=700674306
    deleted archived log
    archived log file name=/u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_2_5frjsk7y_.arc RECID=54 STAMP=700674306
    deleted archived log
    archived log file name=/u01/app/oracle/product/11.1.0/db_1/dbs/arch1_3_700406932.dbf RECID=55 STAMP=700674306
    deleted archived log
    archived log file name=/u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_3_5frjsl62_.arc RECID=56 STAMP=700674306
    deleted archived log
    archived log file name=/u01/app/oracle/product/11.1.0/db_1/dbs/arch1_4_700406932.dbf RECID=57 STAMP=700674307
    deleted archived log
    archived log file name=/u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_4_5frjsmws_.arc RECID=58 STAMP=700674307
    deleted archived log
    archived log file name=/u01/app/oracle/product/11.1.0/db_1/dbs/arch1_5_700406932.dbf RECID=59 STAMP=700674309
    deleted archived log
    archived log file name=/u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_5_5frjso5m_.arc RECID=60 STAMP=700674309
    deleted archived log
    archived log file name=/u01/app/oracle/product/11.1.0/db_1/dbs/arch1_6_700406932.dbf RECID=61 STAMP=700674309
    deleted archived log
    archived log file name=/u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_6_5frjsos4_.arc RECID=62 STAMP=700674309
    deleted archived log
    archived log file name=/u01/app/oracle/product/11.1.0/db_1/dbs/arch1_7_700406932.dbf RECID=63 STAMP=700674310
    deleted archived log
    archived log file name=/u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_7_5frjspqd_.arc RECID=64 STAMP=700674310
    deleted archived log
    archived log file name=/u01/app/oracle/product/11.1.0/db_1/dbs/arch1_8_700406932.dbf RECID=65 STAMP=700674311
    deleted archived log
    archived log file name=/u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_8_5frjsqhs_.arc RECID=66 STAMP=700674311
    Deleted 16 objects
    RMAN> exit
    Recovery Manager complete.
    [oracle@localhost ~]$ sqlplus / as sysdba
    SQL*Plus: Release 11.1.0.6.0 - Production on Mon Oct 19 15:46:54 2009
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    RMAN> exit
    Recovery Manager complete.
    [oracle@localhost ~]$ sqlplus / as sysdba
    SQL*Plus: Release 11.1.0.6.0 - Production on Mon Oct 19 15:46:54 2009
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> alter database datafile '/u01/app/oracle/oradata/mmi/users01.dbf' online
      2  /
    alter database datafile '/u01/app/oracle/oradata/mmi/users01.dbf' online
    ERROR at line 1:
    ORA-01113: file 4 needs media recovery
    ORA-01110: data file 4: '/u01/app/oracle/oradata/mmi/users01.dbf'
    SQL> recover datafile 4
    ORA-00279: change 986290 generated at 10/19/2009 15:43:28 needed for thread 1
    ORA-00289: suggestion :
    /u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_2_%u_.arc
    ORA-00280: change 986290 for thread 1 is in sequence #2
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    ORA-00308: cannot open archived log
    '/u01/app/oracle/flash_recovery_area/MMI/archivelog/2009_10_19/o1_mf_1_2_%u_.arc
    ORA-27037: unable to obtain file status
    Linux-x86_64 Error: 2: No such file or directory
    Additional information: 3Look the redo start from change SCN 986290 and will go till stop SCN 986332 as you deleted the archivelog it will ask that redo within those deleted archivelog , if you don't delete then it apply those archivelog , if you don't make a huge activity after the datafile offline mode then still it will require redo till STOP SCN which were updated by current database SCN at the time of making datafile offline regardless it is in either the archivelog file or within online redo log file.
    Dont make assumption recovery at transaction level, recovery is the process of applying redo vector delta which is within online redo log file or within archivelog file.Database SCN not wait for the transaction occurring ,its like the wall time clock which increment continuous.Oracle recovery base on that SCN.
    Khurram

  • Primary and Physical Standby databases hanging on sqlplus shell command...

    I am primarily a java developer that has had the task of oracle dba thrust upon me due to circumstances that are beyond my control. In the QA lab we have two oracle 10 g release 1 instances running. They set up in a dataguard configuration: one is the primary and the other is in a physical standby.
    Last week I noticed that the disk space on the primary database was at 100%. After some investigation I discovered that a good deal of the files taking up space on the box were log files and the best solution that I could think of would be to delete all old archive files. So I deleted the old archive files that were at least two weeks old using RMAN.
    During this week the database started to shutdown automatically. The QA associate restarted the database twice using the ‘STARTUP’ command from sqlplus. Additionally, the standby database began to have issues: when login in to sqlplus the application would just hang: no ‘SQL” prompt or anything. Finally today the primary database has also begun to hang in a similar manner.
    I have looked at many of the trace files and alert logs but haven’t been able to really discern what the real problem is with the database and the proper rectification for the database. Does anyone have a clue into what is going on? If someone could even point me in the right direction it would be greatly appreciated.

    Guessing that your flash recovery area is full, archiving is stopped so the instance appears to hang.
    Do you see messages like so in the alert log:
    You have following choices to free up space from flash recovery area:
    1. Consider changing RMAN RETENTION POLICY. If you are using Data Guard,
       then consider changing RMAN ARCHIVELOG DELETION POLICY.
    2. Back up files to tertiary device such as tape using RMAN
       BACKUP RECOVERY AREA command.
    3. Add disk space and increase db_recovery_file_dest_size parameter to
       reflect the new space.
    4. Delete unnecessary files using RMAN DELETE command. If an operating
       system command was used to delete files, then use RMAN CROSSCHECK and
       DELETE EXPIRED commands.
    ************************************************************************

  • Script for auto recovery of standby node - Simple dataguard

    Hi.
    I have set up several solutions with Oracle SE and simple dataguard on linux.
    On physical standby, I have created a script which performs the recovery every 15 minuts:
    source /u01/app/oracle/sb_scripts/.profile_websb
    /u01/app/oracle/product/10.2.0/bin/sqlplus "/ as sysdba" <<EOFSQL
    recover automatic standby database;
    exit;
    EOFSQL
    However, I am trying to perform the same on a windows environment but struggles a bit with the script.
    Initally I tried %ORACLE_HOME%\bin\sqlplus / as sysdba @c:\scripts\recover.sql
    Where recover.sql has been:
    recover automatic standby database;
    exit;
    and :
    recover automatic standby database until cancel;
    alter database recover cancel;
    exit;
    Neither of these exits the bat scripts but awaits user input on CANCEL after the last archived log has been added.
    Anyone with a bright idea on how to solve this?
    Thanks.
    Kjell Ove

    Kjell wrote:
    Hi.
    I have set up several solutions with Oracle SE and simple dataguard on linux.
    On physical standby, I have created a script which performs the recovery every 15 minuts:
    source /u01/app/oracle/sb_scripts/.profile_websb
    /u01/app/oracle/product/10.2.0/bin/sqlplus "/ as sysdba" <<EOFSQL
    recover automatic standby database;
    exit;
    EOFSQL
    However, I am trying to perform the same on a windows environment but struggles a bit with the script.
    Initally I tried %ORACLE_HOME%\bin\sqlplus / as sysdba @c:\scripts\recover.sql
    Where recover.sql has been:
    recover automatic standby database;
    exit;
    and :
    recover automatic standby database until cancel;
    alter database recover cancel;
    exit;
    Neither of these exits the bat scripts but awaits user input on CANCEL after the last archived log has been added.
    Anyone with a bright idea on how to solve this?
    Thanks.
    Kjell OveKjell
    This script I use for windows (linked from my old site at http://www.niall.litchfield.dial.pipex.com/ ) uses
    alter database recover automatic standby database until cancel;
    alter database recover cancel;Note the extra alter database I'll admit I haven't run this personally in 2 or 3 years now.
    Niall Litchfield
    http://www.orawin.info/
    Edited by: Niall Litchfield on Apr 23, 2009 10:21 AM can't use bold in code apparently.

  • Table not found after complete tablespace recovery

    Hello Everyone, Table not found even after tablespace restored and recovered. Please loot at this if you got a minute.
    SQL> conn reddy/reddy
    Connected.
    SQL> select table_name from user_tables where tablespace_name='REDDY';
    TABLE_NAME
    RECORDS
    EMP
    SQL> select * from emp;
    ENAME E_NUM ESAL E_ID
    jim 1001 40000 25
    sam 1002 30000 27
    kim 1003 35000 30
    phil 1005 25000 37
    sam 1006 32000 40
    james 1009 43000 45
    6 rows selected.
    SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    [oracle@RHELSRV ~]$ rman
    Recovery Manager: Release 10.2.0.1.0 - Production on Wed Jul 4 21:05:37 2012
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    RMAN> connect target/
    connected to target database: ORCL (DBID=1314955841)
    RMAN> backup tablespace reddy;
    Starting backup at 04-JUL-12
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=115 devtype=DISK
    channel ORA_DISK_1: starting full datafile backupset
    channel ORA_DISK_1: specifying datafile(s) in backupset
    input datafile fno=00008 name=/u01/app/oracle/oradata/orcl/reddy01.dbf
    channel ORA_DISK_1: starting piece 1 at 04-JUL-12
    channel ORA_DISK_1: finished piece 1 at 04-JUL-12
    piece handle=/u01/app/oracle/flash_recovery_area/ORCL/backupset/2012_07_04/o1_mf_nnndf_TAG20120704T210605_7z8rq6pb_.bkp tag=TAG20120704T210605 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
    Finished backup at 04-JUL-12
    Starting Control File and SPFILE Autobackup at 04-JUL-12
    piece handle=/u01/orabackup/c-1314955841-20120704-01 comment=NONE
    Finished Control File and SPFILE Autobackup at 04-JUL-12
    RMAN> exit
    Recovery Manager complete.
    [oracle@RHELSRV ~]$ expdp dumpfile=emp.dmp logfile=emp.log directory=dpump tables=emp
    Export: Release 10.2.0.1.0 - Production on Wednesday, 04 July, 2012 21:07:21
    Copyright (c) 2003, 2005, Oracle. All rights reserved.
    Username: reddy
    Password:
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Starting "REDDY"."SYS_EXPORT_TABLE_01": reddy/******** dumpfile=emp.dmp logfile=emp.log directory=dpump tables=emp
    Estimate in progress using BLOCKS method...
    Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
    Total estimation using BLOCKS method: 64 KB
    Processing object type TABLE_EXPORT/TABLE/TABLE
    Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
    Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
    . . exported "REDDY"."EMP" 6.070 KB 6 rows
    Master table "REDDY"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
    Dump file set for REDDY.SYS_EXPORT_TABLE_01 is:
    /u01/orabackup/emp.dmp
    Job "REDDY"."SYS_EXPORT_TABLE_01" successfully completed at 21:08:07
    [oracle@RHELSRV ~]$ sqlplus
    SQL*Plus: Release 10.2.0.1.0 - Production on Wed Jul 4 21:08:21 2012
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Enter user-name: reddy
    Enter password:
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> drop table emp;
    Table dropped.
    SQL> select table_name from user_tables where tablespace_name='REDDY';
    TABLE_NAME
    RECORDS
    SQL> conn /as sysdba
    Connected.
    SQL> alter tablespace reddy offline;
    Tablespace altered.
    SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    [oracle@RHELSRV ~]$ rman
    Recovery Manager: Release 10.2.0.1.0 - Production on Wed Jul 4 21:09:39 2012
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    RMAN> restore tablespace reddy;
    Starting restore at 04-JUL-12
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 07/04/2012 21:09:56
    RMAN-12010: automatic channel allocation initialization failed
    RMAN-06171: not connected to target database
    RMAN> connect target/
    connected to target database: ORCL (DBID=1314955841)
    RMAN> restore tablespace reddy;
    Starting restore at 04-JUL-12
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=109 devtype=DISK
    channel ORA_DISK_1: starting datafile backupset restore
    channel ORA_DISK_1: specifying datafile(s) to restore from backup set
    restoring datafile 00008 to /u01/app/oracle/oradata/orcl/reddy01.dbf
    channel ORA_DISK_1: reading from backup piece /u01/app/oracle/flash_recovery_area/ORCL/backupset/2012_07_04/o1_mf_nnndf_TAG20120704T210605_7z8rq6pb_.bkp
    channel ORA_DISK_1: restored backup piece 1
    piece handle=/u01/app/oracle/flash_recovery_area/ORCL/backupset/2012_07_04/o1_mf_nnndf_TAG20120704T210605_7z8rq6pb_.bkp tag=TAG20120704T210605
    channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
    Finished restore at 04-JUL-12
    RMAN> recover tablespace reddy;
    Starting recover at 04-JUL-12
    using channel ORA_DISK_1
    starting media recovery
    media recovery complete, elapsed time: 00:00:01
    Finished recover at 04-JUL-12
    RMAN> exit
    Recovery Manager complete.
    [oracle@RHELSRV ~]$ sqlplus '/as sysdba'
    SQL*Plus: Release 10.2.0.1.0 - Production on Wed Jul 4 21:10:42 2012
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> alter tablespace reddy online;
    Tablespace altered.
    SQL> conn reddy/reddy
    Connected.
    SQL> select table_name from user_tables where tablespace_name='REDDY';
    TABLE_NAME
    RECORDS
    Thanks in Advance!!!!

    Hi,
    As you performed complete recovery you did see the table resotred. You can use TSPITR
    recover tablespace reddy until time "to_date('04-JUL-2012 21:07:00','dd-mon-rrrr hh24:mi:ss')" auxiliary destination ''xxxxxx';
    Read http://docs.oracle.com/cd/B19306_01/backup.102/b14191/rcmtspit.htm#BRADV009
    Anand

  • Recovery lost  undo tablespace and Redo log

    Recovery undo tablespace
    [email protected]> shutdown
    Database closed.
    Database dismounted.
    ORACLE instance shut down.e
    [email protected]> exit
    Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    [ora920@tkyte-pc-isdn ora920]$ ls
    control01.ctl cwmlite01.dbf indx01.dbf redo02.log redo0B.log temp01.dbf
    users01.dbf
    control02.ctl drsys01.dbf odm01.dbf redo03.log redo0C.log tools01.dbf
    xdb01.dbf
    control03.ctl example01.dbf redo01.log redo0A.log system01.dbf undotbs01.dbf
    [ora920@tkyte-pc-isdn ora920]$ mv undotbs01.dbf undotbs01.dbf.xxx
    [ora920@tkyte-pc-isdn ora920]$ sqlplus /nolog
    SQL*Plus: Release 9.2.0.1.0 - Production on Sat Sep 28 08:33:29 2002
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    idle> connect / as sysdba
    Connected to an idle instance.
    idle> startup
    ORACLE instance started.
    Total System Global Area 143725064 bytes
    Fixed Size 451080 bytes
    Variable Size 109051904 bytes
    Database Buffers 33554432 bytes
    Redo Buffers 667648 bytes
    Database mounted.
    ORA-01157: cannot identify/lock data file 2 - see DBWR trace file
    ORA-01110: data file 2: '/usr/oracle/ora920/OraHome1/oradata/ora920/undotbs01.dbf'
    idle> show parameter undo
    NAME TYPE VALUE
    undo_management string AUTO
    undo_retention integer 10800
    undo_suppress_errors boolean FALSE
    undo_tablespace string UNDOTBS1
    idle> alter system set undo_management = manual scope=spfile;
    System altered.
    Note: disabling the undo tablespace here, this'll let us go back to "rollback segments"
    and we'll use the system RBS to get back on our feet
    idle> shutdown
    ORA-01109: database not open
    Database dismounted.
    ORACLE instance shut down.
    idle> exit
    Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    [ora920@tkyte-pc-isdn ora920]$ !sql
    sqlplus /nolog
    SQL*Plus: Release 9.2.0.1.0 - Production on Sat Sep 28 08:35:34 2002
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    idle> connect / as sysdba;
    Connected to an idle instance.
    idle> startup
    ORACLE instance started.
    Total System Global Area 143725064 bytes
    Fixed Size 451080 bytes
    Variable Size 109051904 bytes
    Database Buffers 33554432 bytes
    Redo Buffers 667648 bytes
    Database mounted.
    ORA-01157: cannot identify/lock data file 2 - see DBWR trace file
    ORA-01110: data file 2: '/usr/oracle/ora920/OraHome1/oradata/ora920/undotbs01.dbf'
    Note: we still have to get rid of that thing..
    idle> alter database datafile '/usr/oracle/ora920/OraHome1/oradata/ora920/undotbs01.dbf'
    2 offline drop;
    Database altered.
    idle> alter database open;
    Database altered.
    idle> drop tablespace undotbs1;
    Tablespace dropped.
    idle> create UNDO tablespace undotbs1
    2 datafile '/usr/oracle/ora920/OraHome1/oradata/ora920/undotbs01.dbf' size 25m
    3 autoextend on next 1m maxsize 1024m;
    Tablespace created.
    idle> alter system set undo_management = auto scope=spfile;
    System altered.
    Now, we've put the undo tablespace "back" by creating a new one. Just bounce...
    idle> shutdown
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    idle> exit
    Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    [ora920@tkyte-pc-isdn ora920]$ !sql
    sqlplus /nolog
    SQL*Plus: Release 9.2.0.1.0 - Production on Sat Sep 28 08:40:51 2002
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    idle> connect / as sysdba;
    Connected to an idle instance.
    idle> startup
    ORACLE instance started.
    Total System Global Area 143725064 bytes
    Fixed Size 451080 bytes
    Variable Size 109051904 bytes
    Database Buffers 33554432 bytes
    Redo Buffers 667648 bytes
    Database mounted.
    Database opened.
    idle> show parameter undo
    NAME TYPE VALUE
    undo_management string AUTO
    undo_retention integer 10800
    undo_suppress_errors boolean FALSE
    undo_tablespace string UNDOTBS1
    idle>
    and we are right back where we started from
    RECOVERY REDO TABLESPACE
    STARTUP MOUNT;
    RESTORE DATABASE;
    RECOVER DATABASE UNTIL SEQUENCE $v_seq THREAD 1;
    ALTER DATABASE OPEN RESETLOGS;

    [email protected] wrote:
    just ignore first one like title
    Alter database open resetlog is not necessary to open database ?
    Regards
    kmphttp://download.oracle.com/docs/cd/B19306_01/backup.102/b14191/osrecov.htm#i1007426
    About Opening with the RESETLOGS Option
    The RESETLOGS option is always required after incomplete media recovery or recovery using a backup control file.
    You did not do an incomplete media recovery nor a recovery using a backup control file.

Maybe you are looking for

  • Razer Lachesis not always working on MSI 790FX-GD70 - needs to be replugged

    When I boot my new system, my Razer Lachesis (gaming mouse) doesn't always work directly, it doesn't more or click. I need to unplug and then plug it back in to get it to work. First I thought it had to have something to do with the driver, so I inst

  • Delivery costs with shipment costs

    Dear Sir, I want to capture the delivery costs from shipment cost document. I did all bellow mentioned settings: For freight cost to be transfered as delivery cost, the Purchase order need to have a freight condition with zero value. Also the freight

  • ExportAsFDF is not working properly on Acrobat Professional 8

    Hi, I am working on Acrobat Professional 8 to export FDF using vb.net. FDF export by manually is working proper but from script its giving me below FDF file: %FDF-1.2 %âãÏÓ 1 0 obj <</FDF<</ID[<D112096744983A4F942778C9714C68BB><18355F3D06AAA94DA58E6A

  • FTP_R3_TO_SERVER gives error  " FTP SubCommand Local Error"

    Hi I have an issue with the transfer of data from SAP internal table to FTP server   I am using the function module FTP_R3_TO_SERVER.   Using this function module I am able to transfer data only some times.   Most of the time it gives the error messa

  • Mail won't 'see' my existing messages

    I have trouble with this everytime I have to migrate Mail data. My iMac's HD failed last week, and the external used for TimeMachine failed just days earlier - ugh! I have copied all Mail data into the Mail folder, and went through setup (allowed Mai