Datafile offline Oracle

SQL> startup
ORACLE instance started.

Total System Global Area  208769024 bytes
Fixed Size                  2251760 bytes
Variable Size             188744720 bytes
Database Buffers           12582912 bytes
Redo Buffers                5189632 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 2 — see DBWR trace file
ORA-01110: data file 2: ‘C:\ORADATA\XXDBSID\SYSAUX01.DBF’

SQL> select instance_name,status from v$instance;

INSTANCE_NAME    STATUS
—————- ————
xxdbsid            MOUNTED

SQL> alter database datafile 2 offline;

Database altered.

SQL> alter database open;

Database altered.

SQL> select instance_name,status from v$instance;

INSTANCE_NAME    STATUS
—————- ————
xxdbsid            OPEN