Time for action – recovering a primary database using a standby database disk backup

  1. Let's simulate a case where a datafile is lost by renaming one of the datafiles. Shut down the database, rename the datafile with the mv command, and start the database again. We'll see the cannot identify/lock data file error on startup.
    SQL> shutdown immediate
    
    $ mv /u01/app/oracle2/datafile/ORCL/users01.dbf /u01/app/oracle2/datafile/ORCL/users01.dbf.old
    
    SQL> startup
    ORACLE instance started.
    
    Total System Global Area 1603411968 bytes
    Fixed Size                  2213776 bytes
    Variable Size             872417392 bytes
    Database Buffers          671088640 bytes
    Redo Buffers               57692160 bytes
    Database mounted.
    ORA-01157: cannot identify/lock data file 4 - see DBWR trace file
    ORA-01110: data file 4: '/u01/app/oracle2/datafile/ORCL/users01.dbf' ...

Get Oracle Data Guard 11gR2 Administration Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.