Restore/recovery of database without a backup controlfile

Hello


We can get so we just all part of the original datafile backup / restore our database on the new server without backup controlfile?

Thank you

Published by: Gerard on June 27, 2010 14:51

Published by: Gerard on June 27, 2010 15:38
RESTORE CONTROLFILE FROM 'NameOfBackupPiece';

Hemant K Collette

Tags: Database

Similar Questions

  • Database ALTER DATABASE RECOVER using backup controlfile with AUTO option

    Hello. I was recovering a database today and had a little blip.

    I have published the following:

    Database ALTER DATABASE RECOVER using backup controlfile

    I then chose the AUTO option, allowing Oracle to select all available log files so that it would recover to the last log found in the destination of archive

    However... has performed the following:

    ORA-00289: suggestion:
    /U03/Oracle/stk2proddata/archived_logs/arch1_242449_737547185.dbf
    ORA-00280: change 30031145558 thread 1 is in sequence #242449
    ORA-00278: log file
    ' / u03/oracle/stk2proddata/archived_logs/arch1_242448_737547185.dbf' is no longer
    necessary for this recovery


    ORA-00308: cannot open archived log
    ' / u03/oracle/stk2proddata/archived_logs/arch1_242449_737547185.dbf'
    ORA-27037: unable to get file status
    Linux-x86_64 error: 2: no such file or directory
    Additional information: 3

    Two messages above that I expected. However, I made then this:

    SQL > alter database open resetlogs;

    ALTER database open resetlogs

    *

    ERROR on line 1:

    ORA-01113: file 1 needs media recovery

    ORA-01110: data file 1: ' / u02/oracle/stk2proddata/system01.dbf'

    This is not what I expected. What I've done wrong? Should I once received the message "cannot open archived log", launched to CANCEL?

    I then recovered again, but used

    SQL > restore database using backup controlfile until cancel;

    ORA-00279: change 30031145558 generated at 30/04/2014 09:58:34 needed to
    thread 1
    ORA-00289: suggestion:
    /U03/Oracle/stk2proddata/archived_logs/arch1_242449_737547185.dbf
    ORA-00280: change 30031145558 thread 1 is in sequence #242449


    Specify the log: {< RET > = suggested |} Filename | AUTO | CANCEL}

    ORA-00279: change 30031157768 generated at 30/04/2014 10:06:07 needed to
    thread 1
    ORA-00289: suggestion:
    /U03/Oracle/stk2proddata/archived_logs/arch1_242450_737547185.dbf
    ORA-00280: change 30031157768 thread 1 is in sequence #242450
    ORA-00278: log file
    ' / u03/oracle/stk2proddata/archived_logs/arch1_242449_737547185.dbf' is no longer
    necessary for this recovery


    Specify the log: {< RET > = suggested |} Filename | AUTO | CANCEL}
    Cancel
    Cancelled media recovery.
    SQL > alter database open resetlogs;

    Database altered.

    No problem then here. Could someone please explain what I did wrong the first time and the second time right? Is this a problem with the car and using CANCEL?

    Thank you!

    DA

    11.2.0.2

    RHEL 5.5

    Bug: 4178579

  • Restore/recovery of database HRCS90 question: psimage2.dbf

    People,

    Hello. On December 2, 2013, I backed up my instance of database with RMAN with Oracle Linux 5 HRCS90. the backup of the database to run correctly. 2 files 'full_0doqhbqc_13_1' and 'full_0eoqhce9_14_1' are saved in the /backup_database_instance_HRCS90 directory.


    Because my HRCS90 database has been damaged, I need to restore the database to HRCS90 until the time 02-Dec_13 when it is saved.

    First, do not use SET up to THAT. I have run the commands below:

    RMAN > CONNECT TARGET;

    RMAN > RESTORE database;

    The system is in place the error message as below:

    RMAN-06956: create the data file failed; Retry after the withdrawal of the /u01/oradata/HRCS90/psimage2.dbf of the OS.


    So, I delete the /u01/oradata/HRCS90/psimage2.dbf file and do not have a copy of it.

    I run RESTORE DATABASE and the psimage2.dbf file is re-created.

    The output from the RESTORE DATABASE command is:

    Restoration complete, duration: 00:15:54

    Finished restore at February 1, 14.

    Then I run the following command:

    RMAN > RECOVER DATABASE;
    Its release: WARNING: media recovery until all SNA 1947113. Finished recover at February 3, 14.

    Second time, because I need the database prior to 12/02/2013 when she has been saved, I run the command below:

    RMAN > RUN {SET until TIME ' to_date (February 12, 2013: 00:04:56 ',' DD-MM-YYYY: HH24:MI:SS') ";} RESTORE THE DATABASE ;}

    The commands run correctly and restore complete above.


    Then I run the command below:

    SQL > ALTER DATABASE OPEN RESETLOGS;

    His output: failure to change the db command. File 121 was created in the future of incomplete recovery. Data file 121: u01/oradata/HRCS90/psimage2.dbf.

    RMAN > RECOVER NOREDO of DATABASE;

    Its release: recover command failed. Data file 121 must be restored.


    121 data file is the u01/oradata/HRCS90/psimage2.dbf file. I have made sure the directory/u01/oradata/HRCS90/has rwx for all users and groups permissions.


    RESTORE DATABASE SET up THAT do not recreate the file psimage2.dbf RESTORE DATABASE while recreate the file psimage2.dbf.

    I deleted the psimage2.dbf file and cannot resume. I can't find the ORA-1248 by DBPITR article using a current controlfile (Doc ID 1558515.1).

    My question is:

    Any folk can tell me how to RESTORE/RECOVERY of database HRCS90 with the VALUE up to THAT in other way for example using the file command?

    or how to fix psimage2.dbf file that has been deleted by me?

    Thanks in advance.


    Congratulations! Your database is open so not required recovery (recovery database noredo).

    I'm glad that it worked for you. Since you open this database with reset logs, it is recommended that you take a Level0 backup costs.

    HTH
    Anuj

  • Recovery of database of old backup and archive log file complete

    Hi expert Oracle!
    I encountered the problem where my oracle database restore.

    In my case:
    -My version of the database: 10.2.0.2
    -J' have a full database backup (01 - Nov)
    -J' have all the archived since (01 - Nov-> 05 - Nov) log file
    -My database down to 05 - Nov with disk error (no data file, not again...).
    -I have no backup RMAN (01 - Nov-> 05 - Nov)

    How to restore my database to 05 - Nov?

    Thank you

    After you RESTORE the DATABASE,

    Use the VALUE UNTIL to set the Point of recovery to 05 - Nov, and then RECOVER the DATABASE
    OR
    Use the SQL command "RECOVER database with the HELP of BACKUP CONTROLFILE until CANCEL" that will keep asking 'future' ArchiveLogs backup.

    Hemant K Collette

  • Restore/recovery of database HRCS90 how?

    People,

    Hello. On December 2, 2013, I backed up my instance of database with RMAN with Oracle Linux 5 HRCS90 as below:

    SQL > bootable media. (HRCS database is mounted but is not open.)

    SQL > "exit";

    [user@linux bin] $. / rman

    RMAN > Connect target;

    RMAN > configure channel device type disk format ' / backup_database_instance_HRCS90/full_%0_%s_%p'; (backup_database_instance_HRCS90 is the directory to store the backup files)

    RMAN > configure retention policy to recovery of 360 days window;

    RMAN > set up automatic backup of control file;

    RMAN > show all.

    RMAN > backup database;

    Then database backup is running properly. The 2 files 'full_0doqhbqc_13_1' and

    "full_0eoqhce9_14_1" are saved in the /backup_database_instance_HRCS90 directory.

    Because my HRCS90 database has been damaged, I need to restore the database to HRCS90 until the time 02-Dec_13. My questions are:

    First of all, I have to delete my current instance of the database HRCS90 which is corrupt?

    Secondly, I just do the follwing 2 commands one by one to restore the database:

    RMAN > restore database;

    RMAN > restore database;

    Thirdly, the commands above 2 restore database HRCS90 in the 2 files automatically in the directory /backup_database_instance_HRCS90 on December 2, 2013?

    Finally, if the above 2 commands are not correct, how do I restore the database correctly on December 2, 2013?

    Thanks in advance.

    Hello

    The control used when retrieving file contains references to files created after CAMILLE.

    It is possible to make a DBPITR using a current copy of the control file or a copy that contains files created after the DBPITR.  However, some additional steps are necessary to avoid the ORA-1248.

    Following article will help you.

    ORA-1248 by DBPITR using a current controlfile (Doc ID 1558515.1)

    Thank you

    Renu

  • urgent server won't boot up, how rman restore/recovery?

    Hello

    Reboot server SA will not start server.

    s/n cannot access server.

    the worst case:

    If SA want to rebuild a new server, reinstall the oracle database, is there docs to show me how to restore/recovery of database using rman of rman backup files in the old server records.

    (we do not catalog rman, just the control file)

    Thank you very much!

    If SA want to rebuild a new server, reinstall the oracle database, is there docs to show me how to restore/recovery of database using rman of rman backup files in the old server records.

    Yes - there are a LOT of docs on the web. Just use your favorite search engine and the search for them. They are EASY to find.

    But the SMARTEST thing would be to find the problem with the original database and fix it.

  • doubts in the database using backup controlfile recovery.

    Hi gurus,

    I have a doubt in database recovery using backup controlfile.

    I do not speak of "ORA-01207: file is newer than the control file - old control file.

    Here, any of our files archive / redo log have been lost and the problem of lack of update in the control file.

    So why open the database in resetlogs option, after recovering the database by using a backup controlfile. ?

    Thanks in advance

    Mahi

    In order to maintain the consistency of the data, the RCS should be the same in all the files of the controlfile & file REDO data current.

    By definition when you use 'backup controlfile' there a SNA expired in it.

    RESETLOG requires the RCS to 1 in order to get consistency across all files in the database.

    CREATE CONTROLFILE fills this new file with the most recent SNA that exist in the data files.

    It's just the way Oracle has been implemented.

  • Waiting for redo log file missing when restore main database using RMAN backup that was taken on the database physical standby

    Here's my question after tons of research and test without have the right solutions.

    Target:

    (1) I have a 12.1.0.2 database unique main enterprise 'testdb' as database instance running on the server "node1".

    (2) I created physical standby database "stbydb" on the server "node2".

    (3) DataGuard running on the mode of MaxAvailability (SYNC) with roll forward in real time 12 default c apply.

    (4) primary database has 3 groups of one-man redo. (/oraredo/testdb/redo01.log redo02.log redo03.log)

    (5) I've created 4 standby redo logfiles (/oraredo/testdb/stby01.log stby02.log stby03.log stby04.log)

    (6) I do RMAN backup (database and archivelog) on the site of relief only.

    (7) I want to use this backup for full restore of the database on the primary database.

    He is a DR test to simulate the scenario that has lost every primary & Eve total servers.

    Here is how to save, on the database pending:

    (1) performance 'alter database recover managed standby database Cancel' to ensure that compatible data files

    (2) RMAN > backup database;

    (3) RMAN > backup archivelog all;

    I got elements of backup and copied to primary db Server something like:

    /Home/Oracle/backupset/o1_mf_nnndf_TAG20151002T133329_c0xq099p_.BKP (data files)

    /Home/Oracle/backupset/o1_mf_ncsnf_TAG20151002T133329_c0xq0sgz_.BKP (spfile & controlfile)

    /Home/Oracle/backupset/o1_mf_annnn_TAG20151002T133357_c0xq15xf_.BKP (archivelogs)

    So here's how to restore, on the main site:

    I clean all the files (data files, controlfiles oder all gone).

    (1) restore spfile from pfile

    RMAN > startup nomount

    RMAN > restore spfile from pfile ' / home/oracle/pfile.txt' to ' / home/oracle/backupset/o1_mf_ncsnf_TAG20151002T133329_c0xq0sgz_.bkp';

    (2) modify pfile to convert to db primary content. pFile shows below

    *.audit_file_dest='/opt/Oracle/DB/admin/testdb/adump '

    * .audit_trail = "db".

    * full = '12.1.0.2.0'

    *.control_files='/oradata/testdb/control01.ctl','/orafra/testdb/control02.ctl'

    * .db_block_size = 8192

    * .db_domain = "

    *.db_file_name_convert='/testdb/','/testdb /'

    * .db_name = "testdb".

    * .db_recovery_file_dest ='/ orafra'

    * .db_recovery_file_dest_size = 10737418240

    * .db_unique_name = "testdb".

    *.diagnostic_dest='/opt/Oracle/DB '

    * .fal_server = "stbydb".

    * .log_archive_config = 'dg_config = (testdb, stbydb)'

    * .log_archive_dest_2 = "service = stbydb SYNC valid_for = (ONLINE_LOGFILE, PRIMARY_ROLE) db_unique_name = stbydb'"

    * .log_archive_dest_state_2 = 'ENABLE '.

    *.log_file_name_convert='/testdb/','/testdb /'

    * .memory_target = 1800 m

    * .open_cursors = 300

    * runoff = 300

    * .remote_login_passwordfile = "EXCLUSIVE."

    * .standby_file_management = "AUTO".

    * .undo_tablespace = "UNDOTBS1.

    (3) restart db with updated file pfile

    SQLPLUS > create spfile from pfile='/home/oracle/pfile.txt'

    SQLPLUS > the judgment

    SQLPLUS > startup nomount

    (4) restore controlfile

    RMAN > restore primary controlfile to ' / home/oracle/backupset/o1_mf_ncsnf_TAG20151002T133329_c0xq0sgz_.bkp';

    RMAN > change the editing of the database

    (5) all elements of backup catalog

    RMAN > catalog starts by ' / home/oracle/backupset / '.

    (6) restore and recover the database

    RMAN > restore database;

    RMAN > recover database until the SNA XXXXXX; (this YVERT is the maximum in archivelog backups that extends beyond the scn of the backup of the data file)

    (7) open resetlogs

    RMAN > alter database open resetlogs;

    Everything seems perfect, except one of the file log roll forward pending is not generated

    SQL > select * from v$ standby_log;

    ERROR:

    ORA-00308: cannot open archived log ' / oraredo/testdb/stby01.log'

    ORA-27037: unable to get file status

    Linux-x86_64 error: 2: no such file or directory

    Additional information: 3

    no selected line

    I intended to use the same backup to restore primary basic & helps record traffic and the downtime between them in the world of real output.

    So I have exactly the same steps (except STANDBY restore CONTROLFILE and not recover after database restore) to restore the database pending.

    And I got the same missing log file.

    The problem is:

    (1) complete alert.log filled with this error, not the concern here

    (2) now repeat it in real time apply won't work since the Party shall LGWR shows always "WAITING_FOR_LOG."

    (3) I can't delete and re-create this log file

    Then I tried several and found:

    The missing standby logfile was still 'ACTIVE' at present RMAN backup was made.

    For example, on db standby, under Group #4 (stby01.log) would be lost after the restoration.

    SQL > select GROUP #, SEQUENCE #, USE (s), the STATUS from v$ standby_log;

    GROUP # SEQUENCE # USED STATUS

    ---------- ---------- ---------- ----------

    4 19 ACTIVE 133632

    5 0 0 UNASSIGNED

    6 0 0 not ASSIGNED

    7 0 0 UNASSIGNED

    So until I take the backup, I tried on the primary database:

    SQL > alter system set log_archive_dest_state_2 = delay;

    This was the Group of standby_log side Eve #4 was released:

    SQL > select GROUP #, SEQUENCE #, USE (s), the STATUS from v$ standby_log;

    GROUP # SEQUENCE # USED STATUS

    ---------- ---------- ---------- ----------

    4 0 0 UNASSIGNED

    5 0 0 UNASSIGNED

    6 0 0 not ASSIGNED

    7 0 0 UNASSIGNED

    Then, the backup has been restored correctly without missing standby logfile.

    However, to change this primary database means break DataGuard protection when you perform the backup. It's not accept on the production environment.

    Finally, my real questions come:

    (1) what I do may not do on parameter change?

    (2) I know I can re-create the control file to redo before delete and then recreate after. Is there any simple/fast to avoid the standby logfile lost or recreate the lost one?

    I understand that there are a number of ways to circumvent this. Something to keep a copy of the log file waiting restoration progress and copy up one missing, etc, etc...

    And yes I always have done no real-time applies "to the aid of archived logfile" but is also not accept mode of protection of production.

    I just want proof that the design (which is displayed in a few oracle doc Doc ID 602299.1 is one of those) that backs up data backup works effectively and can be used to restore the two site. And it may be without spending more time to resume backups or put the load on the primary database to create the database before.

    Your idea is very much appreciated.

    Thank you!

    Hello

    1--> when I take via RMAN backup, RMAN does not redo log (ORL or SRL) file, so we cannot expect ORLs or SRL would be restored.

    2nd--> when we opened the ORL database should be deleted and created

    3rd--> Expecting, SRL should not be an issue.we should be able to do away with the fall.

    DR sys@cdb01 SQL > select THREAD #, SEQUENCE #, GROUP #, STATUS from v$ standby_log;

    THREAD # SEQUENCE # GROUP # STATUS

    ---------- ---------- ---------- ----------

    1 233 4 ACTIVE

    1 238 5 ACTIVE

    DR sys@cdb01 SQL > select * from v$ logfile;

    GROUP # STATUS TYPE MEMBER IS_ CON_ID

    ---------- ------- ------- ------------------------------ --- ----------

    3 /u03/cdb01/cdb01/redo03.log no. 0 online

    /U03/cdb01/cdb01/redo02.log no. 0 2 online

    1 /u03/cdb01/cdb01/redo01.log no. 0 online

    4 /u03/cdb01/cdb01/stdredo01.log WATCH No. 0

    /U03/cdb01/cdb01/stdredo02.log EVE 5 No. 0

    DR sys@cdb01 SQL > ! ls - ltr /u03/cdb01/cdb01/stdredo01.log

    method: cannot access the /u03/cdb01/cdb01/stdredo01.log: no such file or directory

    DR sys@cdb01 SQL >! ls - ltr /u03/cdb01/cdb01/stdredo02.log

    -rw - r-. 1 oracle oinstall 52429312 17 Oct 15:32 /u03/cdb01/cdb01/stdredo02.log

    DR sys@cdb01 SQL > alter database force claire logfile 4;

    change the database group claire logfile 4

    *

    ERROR on line 1:

    ORA-01156: recovery or current flashback may need access to files

    DR sys@cdb01 SQL > alter database recover managed standby database cancel;

    Database altered.

    DR sys@cdb01 SQL > change the database group claire logfile 4;

    Database altered.

    DR sys@cdb01 SQL > ! ls - ltr /u03/cdb01/cdb01/stdredo01.log

    -rw - r-. 1 oracle oinstall 52429312 17 Oct 15:33 /u03/cdb01/cdb01/stdredo01.log

    DR sys@cdb01 SQL >

    If you do, you can recreate the controlfile without waiting for redo log entry...

    If you still think it's something is not acceptable, you must have SR with support to analyze why he does not abandon SRL when controlfile_type is "underway".

    Thank you

  • lost control file and datafile addeed restore/recovery without loss of data

    Here, I tried the following

    created a new table called t2 and made sure the data went to a specific tablespace...
    has taken a level 0 backup
    remove the control file
    couple of datafile to above tablespace was added and then insert more data
    then went out to restore the database... but datafile and control file always could not be open? What is wrong here...

    SQL> @datafile
    -- list of datafile
    
    Tablespace File Typ Tablespac File Stat    Used MB    Free MB    FILE_MB    MAXMB Datafile_name                     FILE_ID AUT
    ---------- -------- --------- --------- ---------- ---------- ---------- -------- ------------------------------ ---------- ---
    UNDOTBS1   Datafile ONLINE    AVAILABLE         16         84        100    1,024 /data/trgt/undotbs01.dbf                3 YES
    USERS      Datafile ONLINE    AVAILABLE       1153        895       2048    3,072 /data3/trgt/user02.dbf                  5 YES
    CNT_TST    Datafile ONLINE    AVAILABLE          1          9         10        0 /data3/trgt/cnt_tst01.dbf               7 NO
    SYSAUX     Datafile ONLINE    AVAILABLE        626         35        660   32,768 /data/trgt/sysaux01.dbf                 2 YES
    USERS      Datafile ONLINE    AVAILABLE       2031         17       2048    2,048 /data3/trgt/move/users01.dbf            4 YES
    SYSTEM     Datafile ONLINE    AVAILABLE        712         58        770   32,768 /data/trgt/system01.dbf                 1 YES
    USERS      Datafile ONLINE    AVAILABLE         65         35        100   32,768 /data3/trgt/users03.dbf                 6 YES
    
    7 rows selected.
    -- new table is created called t2 and its going into TS called cnt_tst
    SQL> CREATE TABLE TEST.T2
    (
      C1  DATE,
      C2  NUMBER,
      C3  NUMBER,
      C4  VARCHAR2(300 BYTE)
    )
    TABLESPACE cnt_tst;  2    3    4    5    6    7    8
    
    Table created.
    -- data inserted
    SQL> INSERT INTO
      test.T2
    SELECT
      *
    FROM
      (SELECT
        SYSDATE,
        ROWNUM C2,
        DECODE(MOD(ROWNUM,100),99,99,1) C3,
        RPAD('A',300,'A') C4
      FROM
        DUAL
      CONNECT BY
        LEVEL <= 10000)
    ;   2    3    4    5    6    7    8    9   10   11   12   13   14   15
    
    10000 rows created.
    
    SQL> commit;
    
    Commit complete.
    -- to check of cnt_tst has any free space or not, as we can see its full
    SQL> @datafile
    
    Tablespace File Typ Tablespac File Stat    Used MB    Free MB    FILE_MB    MAXMB Datafile_name                     FILE_ID AUT
    ---------- -------- --------- --------- ---------- ---------- ---------- -------- ------------------------------ ---------- ---
    UNDOTBS1   Datafile ONLINE    AVAILABLE         16         84        100    1,024 /data/trgt/undotbs01.dbf                3 YES
    USERS      Datafile ONLINE    AVAILABLE       1153        895       2048    3,072 /data3/trgt/user02.dbf                  5 YES
    SYSAUX     Datafile ONLINE    AVAILABLE        626         35        660   32,768 /data/trgt/sysaux01.dbf                 2 YES
    USERS      Datafile ONLINE    AVAILABLE       2031         17       2048    2,048 /data3/trgt/move/users01.dbf            4 YES
    SYSTEM     Datafile ONLINE    AVAILABLE        712         58        770   32,768 /data/trgt/system01.dbf                 1 YES
    USERS      Datafile ONLINE    AVAILABLE         65         35        100   32,768 /data3/trgt/users03.dbf                 6 YES
    CNT_TST    Datafile ONLINE    AVAILABLE         10          0         10        0 /data3/trgt/cnt_tst01.dbf               7 NO
    
    7 rows selected.
    
    SQL> select count(*) from test.t2;
    
      COUNT(*)
    ----------
         10000
    
    1 row selected.
    -- to get a count and max on date
    SQL> select max(c1) from test.t2;
    
    MAX(C1)
    ------------------
    29-feb-12 13:47:52
    
    1 row selected.
    
    SQL> -- AT THIS POINT A LEVEL 0 BACKUP IS TAKEN (using backup database plus archivelog)
    SQL> -- now control files are removed
    SQL> select name from v$controlfile;
    
    NAME
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    /ctrl/trgt/control01.ctl
    /ctrl/trgt/control02.ctl
    
    2 rows selected.
    
    SQL>
    SQL> ! rm /ctrl/trgt/control01.ctl
    SQL> ! rm /ctrl/trgt/control02.ctl
    SQL> ! ls -ltr /ctrl/trgt/
    
    ls: /ctrl/trgt/: No such file or directory
    
    SQL> 
    -- new datafile is added to CNT_TST TABLESPACE and new data is added as well
    SQL> ALTER TABLESPACE CNT_TST ADD DATAFILE '/data3/trgt/CNT_TST02.dbf' SIZE 100M AUTOEXTEND OFF;
    
    Tablespace altered.
    
    SQL> ALTER SYSTEM CHECKPOINT;
    
    System altered.
    
    SQL> alter system switch logfile;
    
    System altered.
    
    SQL> /
    
    System altered.
    
    SQL> /
    
    System altered.
    
    SQL> ALTER TABLESPACE CNT_TST ADD DATAFILE '/data3/trgt/CNT_TST03.dbf' SIZE 100M AUTOEXTEND OFF;
    
    Tablespace altered.
    
    SQL>  INSERT INTO
      test.T2
    SELECT
      *
    FROM
      (SELECT
        SYSDATE,
        ROWNUM C2,
        DECODE(MOD(ROWNUM,100),99,99,1) C3,
        RPAD('A',300,'A') C4
      FROM
        DUAL
      CONNECT BY
        LEVEL <= 10000)
    ;   2    3    4    5    6    7    8    9   10   11   12   13   14   15
    
    10000 rows created.
    
    SQL> /
    
    10000 rows created.
    
    SQL> commit;
    
    Commit complete.
    
    SQL> INSERT INTO
      test.T2
    SELECT
      *
    FROM
      (SELECT
        SYSDATE,
        ROWNUM C2,
        DECODE(MOD(ROWNUM,100),99,99,1) C3,
        RPAD('A',300,'A') C4
      FROM
        DUAL
      CONNECT BY
        LEVEL <= 40000)
    ;  2    3    4    5    6    7    8    9   10   11   12   13   14   15
    
    40000 rows created.
    
    SQL> commit;
    
    Commit complete.
    
    SQL> @datafile
    -- to make sure new datafile has been registered with the DB 
    Tablespace File Typ Tablespac File Stat    Used MB    Free MB    FILE_MB    MAXMB Datafile_name                     FILE_ID AUT
    ---------- -------- --------- --------- ---------- ---------- ---------- -------- ------------------------------ ---------- ---
    CNT_TST    Datafile ONLINE    AVAILABLE          9         91        100        0 /data3/trgt/CNT_TST03.dbf               9 NO
    UNDOTBS1   Datafile ONLINE    AVAILABLE         16         84        100    1,024 /data/trgt/undotbs01.dbf                3 YES
    USERS      Datafile ONLINE    AVAILABLE       1153        895       2048    3,072 /data3/trgt/user02.dbf                  5 YES
    CNT_TST    Datafile ONLINE    AVAILABLE          9         91        100        0 /data3/trgt/CNT_TST02.dbf               8 NO
    SYSAUX     Datafile ONLINE    AVAILABLE        626         35        660   32,768 /data/trgt/sysaux01.dbf                 2 YES
    USERS      Datafile ONLINE    AVAILABLE       2031         17       2048    2,048 /data3/trgt/move/users01.dbf            4 YES
    SYSTEM     Datafile ONLINE    AVAILABLE        712         58        770   32,768 /data/trgt/system01.dbf                 1 YES
    USERS      Datafile ONLINE    AVAILABLE         65         35        100   32,768 /data3/trgt/users03.dbf                 6 YES
    CNT_TST    Datafile ONLINE    AVAILABLE         10          0         10        0 /data3/trgt/cnt_tst01.dbf               7 NO
    
    9 rows selected.
    -- now the count and max ... note count before backup was 10000 and max(c1) was diff
    SQL> select count(*) from test.t2;
    
      COUNT(*)
    ----------
         70000
    
    1 row selected.
    
    SQL> select max(c1) from test.t2;
    
    MAX(C1)
    ------------------
    29-feb-12 13:58:25
    
    1 row selected.
    
    SQL> -- now restore starts 
    SQL> shutdown abort;
    ORACLE instance shut down.
    SQL> exit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    [oracle@berry trgt]$ rman
    
    Recovery Manager: Release 11.2.0.1.0 - Production on Wed Feb 29 14:01:48 2012
    
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    
    RMAN>  connect catalog rman/pass@rcat
    
    connected to recovery catalog database
    
    RMAN>  connect target /
    
    connected to target database (not started)
    
    RMAN> startup nomount;
    
    Oracle instance started
    
    Total System Global Area     188313600 bytes
    
    Fixed Size                     1335388 bytes
    Variable Size                125833124 bytes
    Database Buffers              58720256 bytes
    Redo Buffers                   2424832 bytes
    
    RMAN> restore controlfile from autobackup;
    
    Starting restore at 29-FEB-12 14:02:37
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=20 device type=DISK
    
    recovery area destination: /backup/trgt/flash_recovery_area
    database name (or database unique name) used for search: TRGT
    channel ORA_DISK_1: no AUTOBACKUPS found in the recovery area
    channel ORA_DISK_1: looking for AUTOBACKUP on day: 20120229
    channel ORA_DISK_1: AUTOBACKUP found: /backup/trgt/backup/cont_c-3405317011-20120229-09
    channel ORA_DISK_1: restoring control file from AUTOBACKUP /backup/trgt/backup/cont_c-3405317011-20120229-09
    channel ORA_DISK_1: control file restore from AUTOBACKUP complete
    output file name=/ctrl/trgt/control01.ctl
    output file name=/ctrl/trgt/control02.ctl
    Finished restore at 29-FEB-12 14:02:39
    
    RMAN> alter database mount;
    
    database mounted
    released channel: ORA_DISK_1
    
    RMAN> recover database;
    
    Starting recover at 29-FEB-12 14:02:55
    Starting implicit crosscheck backup at 29-FEB-12 14:02:55
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=20 device type=DISK
    Crosschecked 96 objects
    Finished implicit crosscheck backup at 29-FEB-12 14:02:57
    
    Starting implicit crosscheck copy at 29-FEB-12 14:02:57
    using channel ORA_DISK_1
    Finished implicit crosscheck copy at 29-FEB-12 14:02:57
    
    searching for all files in the recovery area
    cataloging files...
    no files cataloged
    
    using channel ORA_DISK_1
    
    starting media recovery
    
    archived log for thread 1 with sequence 13 is already on disk as file /redo_archive/trgt/online/redo01.log
    archived log for thread 1 with sequence 14 is already on disk as file /redo_archive/trgt/online/redo02.log
    archived log for thread 1 with sequence 15 is already on disk as file /redo_archive/trgt/online/redo03.log
    archived log file name=/redo_archive/trgt/archive/1_10_776523284.dbf thread=1 sequence=10
    archived log file name=/redo_archive/trgt/archive/1_10_776523284.dbf thread=1 sequence=10
    archived log file name=/redo_archive/trgt/archive/1_11_776523284.dbf thread=1 sequence=11
    archived log file name=/redo_archive/trgt/archive/1_12_776523284.dbf thread=1 sequence=12
    archived log file name=/redo_archive/trgt/online/redo01.log thread=1 sequence=13
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 02/29/2012 14:02:59
    ORA-01422: exact fetch returns more than requested number of rows
    RMAN-20505: create datafile during recovery
    RMAN-11003: failure during parse/execution of SQL statement: alter database recover logfile '/redo_archive/trgt/online/redo01.log'
    ORA-00283: recovery session canceled due to errors
    ORA-01244: unnamed datafile(s) added to control file by media recovery
    ORA-01110: data file 9: '/data3/trgt/CNT_TST03.dbf'
    
    RMAN> -- wnet to session 2 and renamed datafile from unammed
    -wnet to session 2 and renamed datafile for file unammed
    SQL> select name from v$datafile;
    
    NAME
    --------------------------------------------------------------------------------
    /data/trgt/system01.dbf
    /data/trgt/sysaux01.dbf
    /data/trgt/undotbs01.dbf
    /data3/trgt/move/users01.dbf
    /data3/trgt/user02.dbf
    /data3/trgt/users03.dbf
    /data3/trgt/cnt_tst01.dbf
    /oracle/app/product/11.2.0/dbhome_1/dbs/UNNAMED00008
    /oracle/app/product/11.2.0/dbhome_1/dbs/UNNAMED00009
    
    9 rows selected.
    
    SQL> alter database create datafile '/oracle/app/product/11.2.0/dbhome_1/dbs/UNNAMED00008' as '/data3/trgt/CNT_TST02.dbf';
    
    Database altered.
    
    SQL> alter database create datafile '/oracle/app/product/11.2.0/dbhome_1/dbs/UNNAMED00009' as '/data3/trgt/CNT_TST03.dbf';
    
    Database altered.
    
    SQL>  select name from v$datafile;
    
    NAME
    --------------------------------------------------------------------------------
    /data/trgt/system01.dbf
    /data/trgt/sysaux01.dbf
    /data/trgt/undotbs01.dbf
    /data3/trgt/move/users01.dbf
    /data3/trgt/user02.dbf
    /data3/trgt/users03.dbf
    /data3/trgt/cnt_tst01.dbf
    /data3/trgt/CNT_TST02.dbf
    /data3/trgt/CNT_TST03.dbf
    
    9 rows selected.
    After before was done, went back to session 1 and I tried recovered the DB
    RMAN> recover database;
    
    Starting recover at 29-FEB-12 14:06:16
    using channel ORA_DISK_1
    
    starting media recovery
    
    archived log for thread 1 with sequence 13 is already on disk as file /redo_archive/trgt/online/redo01.log
    archived log for thread 1 with sequence 14 is already on disk as file /redo_archive/trgt/online/redo02.log
    archived log for thread 1 with sequence 15 is already on disk as file /redo_archive/trgt/online/redo03.log
    archived log file name=/redo_archive/trgt/online/redo01.log thread=1 sequence=13
    archived log file name=/redo_archive/trgt/online/redo02.log thread=1 sequence=14
    archived log file name=/redo_archive/trgt/online/redo03.log thread=1 sequence=15
    media recovery complete, elapsed time: 00:00:00
    Finished recover at 29-FEB-12 14:06:17
    
    RMAN> alter database open resetlogs;
    
    database opened
    new incarnation of database registered in recovery catalog
    starting full resync of recovery catalog
    full resync complete
    starting full resync of recovery catalog
    full resync complete
    
    RMAN> exit
    
    
    Recovery Manager complete.
    [oracle@berry trgt]$
    [oracle@berry trgt]$
    [oracle@berry trgt]$ sq
    
    SQL*Plus: Release 11.2.0.1.0 Production on Wed Feb 29 14:07:18 2012
    
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    SQL> alter session set NLS_DATE_FORMAT="dd-mon-yy hh24:mi:ss:
      2
    SQL>
    SQL> alter session set NLS_DATE_FORMAT="dd-mon-yy hh24:mi:ss";
    
    Session altered.
    
    SQL> select count(*) from test.t2;
    select count(*) from test.t2
                              *
    ERROR at line 1:
    ORA-00376: file 8 cannot be read at this time
    ORA-01110: data file 8: '/data3/trgt/CNT_TST02.dbf'
    
    
    SQL> select max(c1) from test.t2;
    select max(c1) from test.t2
                             *
    ERROR at line 1:
    ORA-00376: file 8 cannot be read at this time
    ORA-01110: data file 8: '/data3/trgt/CNT_TST02.dbf'
    
    SQL> alter database datafile 8 online;
    alter database datafile 8 online
    *
    ERROR at line 1:
    ORA-01190: control file or data file 8 is from before the last RESETLOGS
    ORA-01110: data file 8: '/data3/trgt/CNT_TST02.dbf'
    
    {code}
    
    so what did i do wrong in my recovery that i could not get my data?? how can i avoid this?? and restore my DB?
    
    Edited by: user8363520 on Feb 29, 2012 12:24 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

    user8363520 wrote:
    so can get us this or can't do?

    You seem to have:
    (a) old version of data through rman backup files
    (b) old version of the control file
    (c) Backed archived redo logs
    (d) recovery archived logs that have been recently generated
    (e) current online redo logs

    Therefore, you should be able to bring back the database in the State wherever it was when you made the abandonment.
    I don't do enough laps to be able to cite details on the commands to use (and I often find myself using the command line recovery after that file of rman restore, but the steps you need must be)

    Take a copy of security of the data current, archived and online redo log files.
    Restore the backup control file, data files, and archived recovery logs
    Recover the database by using up to cancel backup control file
    You have to do 'create datafile' bit as the collection hits the 'missing file' bit
    You will need to provide the names of the archived and log files online redo recovery reached their
    (although, presumably, you could leave copies of the logs stored in the default location)

    Concerning
    Jonathan Lewis
    http://jonathanlewis.WordPress.com
    Author: core Oracle

  • I could do a system backup/restore through the eRecovery without any additional software utility?

    I have an Acer Aspire One 532 H Netbook. I could do a system backup/restore through the eRecovery without any extra utility of Windows 7 to Acer recovery? If I have such software, how can I get it? Because my netbook not came with any utility recovery/program when I bought it. Need to respond as soon as POSSIBLE, my netbook is dying with the longer startup time and more.

    Nice day

    You must back up your data to an external HARD disk, etc. To reload your factory machine, click Start, all programs, acer erecovery management, restoration and completely restore the factory settings.

    Kind regards

    FReeZA

  • Recovery using backup Controlfile...

    Hi all

    I have a little doubt about the recovery process...

    Suppose I took a cold backup (after immediate stop).
    After that, I started the database, made a newspaper change and delete the control file.

    In this case when I try to recover the database by using a backup controlfile (recover database using backup controlfile), I need to provide the name of the log file manually
    to ensure no loss of data during the recovery process.
    After that, I need start the database with the RESET LOGS.


    But my question is why the database will force you to RESETLOGS even if you haven't lost all the data or you haven't made an incomplete recovery.


    Thank you...

    >
    Suppose I took a cold backup (after immediate stop).
    After that, I started the database, made a newspaper change and delete the control file.

    In this case when I try to recover the database by using a backup controlfile (recover database using backup controlfile), I need to provide the name of the log file manually
    to ensure no loss of data during the recovery process.
    After that, I need start the database with the RESET LOGS.

    But my question is why the database will force you to RESETLOGS even if you haven't lost all the data or you haven't made an incomplete recovery.
    >
    It's the RESETLOGS forcing resynchronization of the control file.

    A control file "backup" is a copy and is supposed to be an older file so it needs to be synchronized with the redo log using RESETLOGS files.

    See the doc of SQL language
    http://docs.Oracle.com/CD/B28359_01/server.111/b28286/statements_1004.htm
    >
    RESETLOGS. NORESETLOGS clause determines if Oracle database resets the current sequence number to 1, archives logs not archived (including the active log) and eliminates any information redo that was not implemented during recovery, ensuring that it will never be applied. Oracle database using NORESETLOGS automatically except in the following specific situations, which require a framework for this clause:

    You must specify RESETLOGS:

    After completing the incomplete media recovery or media recovery using a backup control file

  • Backup full database, backuing's up controlfile?

    Hello
    I'm on 8174
    is that enough to cold back up the database?


    stop immediately;
    bootable media;
    Run {}
    allocate channel t1 type 'SBT_TAPE ';
    Send "NB_ORA_POLICY =...";
    full backup in format "bk_ %%t U_" (data base);
    }

    or do I
    backup current controlfile;?

    I can see here http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a76990/rmanconc.htm#436070

    This statement "a full backup is different from a full database backup, which is a backup copy of all the data files and the current control file."
    is this means
    full backup of database, backuing's up controlfile? (I think so) and restoring it requires any archivelogs? (I think not)


    Thank you very much

    Published by: user9145417 on August 25, 2010 16:42

    Yes, you will need to take backup of the backup control file.

  • backup controlfiles recovery

    Hello

    I'm practicing controlfile conecpts backup and restore. In a database, there are 3 controlfiles. I have a copy of database backup controlfile and archivelogs. I deleted a controlfile.

    There is no message in the alerts log. I get an error only when I have as long as DBA question certain points of view V$. I get a message that a controlfile does not exist, no file or directory etc. etc.

    The interesting thing I have noticed is that I get no error when querying V$ views already recorded sessions until I removed controlfile. I get error only when I connect to a new session and the query V$ views.



    Is there a way DBAs do we know if a controlfile has been deleted at the OS level other than this way? How DBAs usually knows a controlfile is missing?

    1.
    Instance crashes whenever there is an error in the reading or writing of control file. Reading and writing are not a continuous process. So after deletion, you have to wait a bit for the next operation. If you do not want to wait just trying to make the point of control, add/delete datafile or empty manually.

    2.
    RM command really does not remove the files. For fiscal purposes use shred or dd to put some of 0 and 1 in file. If the control file is not valid, its effect will be the same.

    3.
    The number of user sessions / is not serious.

    Bartek

  • RECOVER, DATABASE using backup controlfile until the

    Hello
    in 10g R2, may this work:
    RECOVER DATABASE using backup controlfile until '2009-05-21:12:47:30';
    Thank you.

    GregX wrote:
    In fact, it should say something like this:

    until time ' to_date (May 19, 2009 10:30 "," dd-mm-yyyy hh24:mi:ss') ";

    No, you needn't.
    Doc http://download.oracle.com/docs/cd/B19306_01/backup.102/b14191/osrecov.htm#i1007361
    "+ If recovery up to one hour, the time is always specified using the following format, delimited by single quotes: 'YYYY-MM-' DD:HH24:MI:SS. '. + »

    Nicolas.

  • Is it possible to restore your computer to factory without a backup requirements?

    I restored my computer using my sisters backup disks and I was just wondering.

    Hello

    In regards to what they actually do, there not much in it--a "Factory Reset" from the disk is normally faster than using recovery discs.

    The main advantage of having a set of recovery disks is that they will allow you to reinstall Windows 7, if the recovery Partition corrupted or the HARD drive had to be replaced.

    OEM recovery disks validate the installation by reading a "tattoo" on the bios chip, but as you know that your sisters drives work well on your machine, you can always create a duplicate for yourself the value as follows.

    Download and install the free software ImgBurn.

    1. create an Image file disc the 1st disc of recovery on your laptop - a guide for doing this is here.

    2 write this on a blank DVD Disk Image - a guide to it's here.

    3. Repeat for each subsequent until you have a complete set.

    Kind regards

    DP - K

Maybe you are looking for

  • 'Artist' in the sidebar tab: Albums appears do not?

    OK people, This can be a bit on the side KNOCK, but thought that I ask anyway. When you go to the "artist" in the sidebar, below each artist, you get a few short texts like "10 songs, 2 Albums". I noticed that some artists list only say "2 songs" How

  • HP photosmart 5224. Cannot change the size of the image

    Send photos of the iPhone to the printer using photo Carpenter about no matter which presentation I use weather 1 picture or layout photo 4. The pictures come out both sides of the print only in the middle of page 1/3 of white sheet. I have printer c

  • Satellite L300D - impossible to find HWsetup, boot from the CD

    I have a big problem with my laptop. Sound on windows xp, I formatted it. All is well now. I wanted to install windows 7, I bought at the store. I try to install it but the laptop won't boot from the cd. I'm trying to get into the bios, no way to get

  • G42 355TU: windows 7 does not download updates

    I have a problem when downloading the updates of windows 7. I m running 64-bit Windows 7 Home Basic edition. He always downloaded the updates and install them himself. but suddenly he stopped it making. I tried to download and install manually, but n

  • Better plan of action if you suspect an infection?

    If I suspect that I have a virus on one of my computers, what all do you consider them be the best course of action to get rid of or to give my auto insurance that I don't have? I am running vista with an associated program provided by my ISP anti-vi