DESCRIPTION:

In this blog,we are going to resolve ORA-01157 error in database.

Cause:

The background process was either unable to find one of the data files or failed to lock it because the file was already in use.

The database will prohibit access to this file but other files will be unaffected.

However, the first instance to open the database will need to access all online data files.

Accompanying error from the operating system describes why the file could not be identified.

Action: Have the operating system make the file available to the database.

[oracle@trichy dbs]$cd /u01/trichy/data

[oracle@trichy data]$ls

system01.dbf  sysaux01.dbf  undotbs01.dbf     users01.dbf

[oracle@trichy data]$mv users01.dbf users02.dbf

[oracle@trichy data]$sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Wed Oct 7 22:57:38 2020

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

Connected to:

Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL> alter database open;

alter database open*ERROR at line 1:

ORA-01157: cannot identify/lock data file 4 - see DBWR trace file

ORA-01110: data file 5: 'u01/data/users01.dbf'

 

SQL> select open_mode from v$database;

OPEN_MODE

--------------------

MOUNTED
SQL> SELECT MEMBER FROM V$LOG G, V$LOGFILE F WHERE G.GROUP# = F.GROUP# AND G.STATUS = 'CURRENT';

MEMBER

--------------------------------------------------------------------------------

/u01/trichy/redo/redo01.log

 

SQL> RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL

ORA-00279: change 55636 generated at 07 09 2020 22:37:38 needed for thread 1

ORA-00289: suggestion :/u01/app/oracle/product/12.2.0.1/db_1/dbs/arcr_1_111.arc

ORA-00280: change 55636 for thread 1 is in sequence #111

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

/u01/trichydb/redo/redo01.log

Log applied.

Media recovery complete.
SQL> alter database open resetlogs;

Database altered.

SQL> select open_mode from v$database;

OPEN_MODE

--------------------

READ WRITE


 

Recent Posts

Start typing and press Enter to search