Alter datafile online or offline in Oracle

Check the status of online or offline for datafile in Oracle

Check the status of datafile

Select file#, status from v$datafile;
OR
SELECT FILE_NAME,ONLINE_STATUS FROM DBA_DATA_FILES;

Take the data file to offline state

alter database datafile 'C:\oradata\orcl\sales001.dbf' offline;
OR
Alter database datafile 12 OFFLINE;

Take the datafile to online state

alter database datafile 'C:\oradata\orcl\sales001.dbf' oNLINE;
OR
Alter database datafile 12 online;
This entry was posted in Oracle on by .
Unknown's avatar

About SandeepSingh

Hi, I am working in IT industry with having more than 15 year of experience, worked as an Oracle DBA with a Company and handling different databases like Oracle, SQL Server , DB2 etc Worked as a Development and Database Administrator.

Leave a Reply