Resolve Startup Error after Dropping a Datafile manually locally in ASM Scenario - Oracle 11gR2

Log to the database and shut it

[oracle@db11g ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Wed Feb 27 18:10:16 2019
Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options


SQL> select open_mode from v$database;
OPEN_MODE
--------------------
READ WRITE


SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining

and Real Application Testing options

Delete the datafile manually

[oracle@db11g ~]$ exit
logout
[root@db11g ~]# su - grid
[grid@db11g ~]$ . oraenv
ORACLE_SID = [+ASM] ?
The Oracle base remains unchanged with value /u01/app/grid
[grid@db11g ~]$ asmcmd -p
ASMCMD [+] > lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
cMOUNTED  EXTERN  N         512   4096  1048576     20473    18340                0           18340              0             N  DATA/
MOUNTED  EXTERN  N         512   4096  1048576     20473    18662                0           18662              0             N  FRA/
MOUNTED  HIGH    N         512   4096  1048576      8188     8006             4094            1304              0             N  OCR/
ASMCMD [+] >cd DATA/
ASMCMD [+DATA] > ls
DB11G1/
ASMCMD [+DATA] > cd DB11G1/DATA
ASMCMD-8002: entry 'DATA' does not exist in directory '+DATA/DB11G1/'
ASMCMD [+DATA] > cd DB11G1/
ASMCMD [+DATA/DB11G1] > ls
CONTROLFILE/
DATAFILE/
ONLINELOG/
PARAMETERFILE/
TEMPFILE/
spfileDB11G1.ora
ASMCMD [+DATA/DB11G1] > cd DATAFILE/
ASMCMD [+DATA/DB11G1/DATAFILE] > ls
EXAMPLE.265.997039919
MAC.270.1001190739
SYSAUX.257.997039651
SYSTEM.256.997039649
UNDOTBS1.258.997039651
USERS.259.997039651
ASMCMD [+DATA/DB11G1/DATAFILE] >
ASMCMD [+DATA/DB11G1/DATAFILE] >
ASMCMD [+DATA/DB11G1/DATAFILE] >
ASMCMD [+DATA/DB11G1/DATAFILE] >
ASMCMD [+DATA/DB11G1/DATAFILE] >
ASMCMD [+DATA/DB11G1/DATAFILE] > rm MAC.270.1001190739
ASMCMD [+DATA/DB11G1/DATAFILE] >
ASMCMD [+DATA/DB11G1/DATAFILE] > ls
EXAMPLE.265.997039919
SYSAUX.257.997039651
SYSTEM.256.997039649
UNDOTBS1.258.997039651
USERS.259.997039651

ASMCMD [+DATA/DB11G1/DATAFILE] > exit

Try to startup the database

[grid@db11g ~]$ su - oracle
Password:
[oracle@db11g ~]$ . oraenv
ORACLE_SID = [DB11G] ? DB11G1
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@db11g ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Wed Feb 27 18:12:59 2019
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.

Total System Global Area 2471931904 bytes
Fixed Size                  2255752 bytes
Variable Size            1442841720 bytes
Database Buffers         1006632960 bytes
Redo Buffers               20201472 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 6 - see DBWR trace file
ORA-01110: data file 6: '+DATA/db11g1/datafile/mac.270.1001190739'


Providing error of missing datafile

Make the culprit datafile offline

SQL> alter database datafile '+DATA/db11g1/datafile/mac.270.1001190739' offline;
Database altered.

Try to open the database which is already mounted.

SQL> alter database open;
Database altered.
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
READ WRITE

Comments

Popular posts from this blog

Recover Manually Dropped Datafile in ASM Scenario - Oracle 11gR2

How to corrupt a datafile manually ASM scenario - oracle 11gR2

Repair Corrupt Blocks using RMAN Data Recovery Advisor Scenario - Oracle 11gR2