Wednesday, July 16, 2014

RMAN-06056: could not access datafile 7

Cause :- In my case i can see one of my data file (7) are in offline for this reason I can see this error after taken this file in online I can take complete backup using RMAN. You can also use "SKIP OFFLINE" in your RMAN BACKUP DATABASE command. This error can be for :

1 File does not exist.
2 File is offline.
3 File is not verified.
4 DBWR could not find the file.
5 unable to open file.
6 I/O error during read.
7 File header is corrupt. 
8 File is not a datafile.
9 File does not belong to this database.
10 File number is incorrect.
11 Wrong file version.
12 Control file is not current.

Starting backup at 16-JUL-14
using channel ORA_DISK_1
RMAN-06169: could not read file header for datafile 7 error reason 4
RMAN-06169: could not read file header for datafile 7 error reason 4
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup plus archivelog command at 07/16/2014 14:27:30
RMAN-06056: could not access datafile 7

RMAN>

SQL> select file#, status, enabled from v$datafile;

     FILE# STATUS  ENABLED
---------- ------- ----------
         1 SYSTEM  READ WRITE
         2 ONLINE  READ WRITE
         3 ONLINE  READ WRITE
         4 ONLINE  READ WRITE
         5 ONLINE  READ WRITE
         6 ONLINE  READ WRITE
         7 OFFLINE DISABLED
         8 ONLINE  READ WRITE
         9 ONLINE  READ WRITE
        10 ONLINE  READ WRITE
        11 ONLINE  READ WRITE

     FILE# STATUS  ENABLED
---------- ------- ----------
        12 ONLINE  READ WRITE
        13 ONLINE  READ WRITE
        14 ONLINE  READ WRITE
        15 ONLINE  READ WRITE
        16 ONLINE  READ WRITE
        17 ONLINE  READ WRITE
        18 ONLINE  READ WRITE

18 rows selected.
SQL> ALTER TABLESPACE TEST ONLINE;

Tablespace altered.

 RMAN> BACKUP AS BACKUPSET DATABASE PLUS ARCHIVELOG;

Starting backup at 16-JUL-14
current log archived
using channel ORA_DISK_1
Starting backup at 16-JUL-14
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=114 RECID=116 STAMP=853080236
channel ORA_DISK_1: starting piece 1 at 16-JUL-14
channel ORA_DISK_1: finished piece 1 at 16-JUL-14
piece handle=D:\APP\ORADATA\DBRMAN_BACKUP\BKP.15PDHU5D_1_1 tag=TAG20140716T144356 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 16-JUL-14

Starting Control File and SPFILE Autobackup at 16-JUL-14
piece handle=D:\APP\ORADATA\DBRMAN_BACKUP\BKP_CF_C-3796675194-20140716-02 comment=NONE
Finished Control File and SPFILE Autobackup at 16-JUL-14

RMAN>

4 comments:

  1. It's of help for me today. Thanks.

    ReplyDelete
  2. hey Guys, issue with datafile 5
    RMAN-06056: could not access datafile 5
    when i check the status, this is what i have

    SQL> select file#, status, enabled from v$datafile;

    FILE# STATUS ENABLED
    ---------- ------- ----------
    1 SYSTEM READ WRITE
    2 ONLINE READ WRITE
    3 ONLINE READ WRITE
    4 ONLINE READ WRITE
    5 RECOVER READ WRITE
    please relly nead your help

    ReplyDelete
  3. Did you have RMAN backup ? If you have crosscheck the backup and try to recover from RMAN.

    ReplyDelete