Thursday, May 21, 2015

ORA-01157: ORA-01111: ORA-01110:

There are many reasons for a file being created as UNNAMED or MISSING in the standby database, including insufficient disk space on standby site (or) Improper parameter settings related to file management.
STANDBY_FILE_MANAGEMENT enables or disables automatic standby file management. When automatic standby file management is enabled, operating system file additions and deletions on the primary database are replicated on the standby database.
For example if we add a data file on the Primary when parameter STANDBY_FILE_MANAGEMENT on standby set to MANUAL , While recovery process(MRP) is trying to apply archives, Due to that parameter setting it will create an Unnamed file in $ORACLE_HOME/dbs and it will cause to kill MRP process and Errors will be as below.

1. Check for the files needs to be recovered.

select * from v$recover_file where error like '%FILE%';

Identify on primary of data file 124(Primary Database)

select file#,name from v$datafile where file#='124'

Identify on primary of data file 124(Standby Database)

select file#,name from v$datafile where file#='124'

Crosscheck that no MRP is running and STANDBY_FILE_MANAGEMENT can be enabled once after creating file on standby

ENABLE STANDBY_FILE_MANAGEMENT to MANUAL on the STANDBY server

alter system set standby_file_management=MANUAL scope=both;

show parameter standby_file_management

Create missing datafile on the Standby Server

alter database create datafile '/drhome/oradr/STANDBY/db/tech_st/10.2.0/dbs/UNNAMED00124' as '/drdata/oradr/db/apps_st/data/switchover01.dbf';

ENABLE STANDBY_FILE_MANAGEMENT to MANUAL on the STANDBY server

alter system set standby_file_management=AUTO scope=both;

show parameter standby_file_management

alter database recover managed standby database disconnect from session;

After creating the file, MRP will start applying archives on standby database.

Note: Setting STANDBY_FILE_MANAGEMENT to AUTO causes Oracle to automatically create files on the standby database and, in some cases, overwrite existing files. Care must be taken when setting STANDBY_FILE_MANAGEMENT and DB_FILE_NAME_CONVERT so that existing standby files will not be accidentally overwritten.






No comments:

Post a Comment