Wednesday 20 March 2013

ORA-00376: file 6 cannot be read at this time





15:37:25 SQL> conn scott/scott
Connected.

ERROR at line 1:
ORA-00376: file 6 cannot be read at this time
ORA-01110: data file 6: '/home/oracle/10.2.0/product/oradata/prim/mytbs01.dbf'


Cause :  tablespace  or datafile in not readable form whether it  recovery mode or offline

Solution : You can check  find the tablespace status using below query

15:37:33 SQL> select tablespace_name , status from dba_tablespaces;

TABLESPACE_NAME                STATUS
------------------------------ ---------
SYSTEM                         ONLINE
UNDOTBS1                       ONLINE
SYSAUX                         ONLINE
TEMP                           ONLINE
USERS                          OFFLINE
EXAMPLE                        ONLINE
MYTBS                          OFFLINE


--or you can check file status

SQL>  select name ,status from v$datafile where name='/home/oracle/10.2.0/product/oradata/prim/mytbs01.dbf';

NAME
--------------------------------------------------------------------------------
STATUS
-------
/home/oracle/10.2.0/product/oradata/prim/mytbs01.dbf
RECOVER



Bring tablespace on line


15:38:33 SQL> alter tablespace MYTBS online;

Tablespace altered.

15:38:42 SQL>  select * from tspitrtable
15:38:46   2  ;

NAME
----------
vanita
sumit



--or recover  datafile  using rman

RMAN> recover datafile 6;

Starting recover at 20-MAR-13
using channel ORA_DISK_1

starting media recovery
media recovery complete, elapsed time: 00:00:05

Finished recover at 20-MAR-13

SQL>  alter database datafile '/home/oracle/10.2.0/product/oradata/prim/mytbs01.dbf' online;

Database altered.

No comments: