背景:
新建设的DATAGUARD数据库,主库早上某表空间增加数据裸设备rdata91_disk作为数据文件后从库应用日志失败。
经查因为standby_file_management状态非AUTO引起。

现象:ORACLE从库出现如下错误:
Media Recovery Log /archivelog/archive_1_41730_614088933.arc
File #119 added to control file as 'UNNAMED00119' because
the parameter STANDBY_FILE_MANAGEMENT is set to MANUAL
The file should be manually created to continue.
Errors with log /archivelog/archive_1_41730_614088933.arc
Some recovered datafiles maybe left media fuzzy
Media recovery may continue but open resetlogs may fail

执行alter database recover managed standby database disconnect from session;出现如下错误:
Mon Dec 17 11:27:54 2012
Errors in file /home/oracle/admin/lstandby/bdump/lstandby_mrp0_495730.trc:
ORA-01111: name for data file 119 is unknown - rename to correct file
ORA-01110: data file 119: '/home/oracle/database/dbs/UNNAMED00119'
ORA-01157: cannot identify/lock data file 119 - see DBWR trace file
ORA-01111: name for data file 119 is unknown - rename to correct file
ORA-01110: data file 119: '/home/oracle/database/dbs/UNNAMED00119'

解决方法:
alter database rename file '/home/oracle/database/dbs/UNNAMED00119' to '/dev/rdata91_disk';
ALTER DATABASE CREATE DATAFILE  '/dev/rdata91_disk';

或者
ALTER DATABASE CREATE DATAFILE  '/home/oracle/database/dbs/UNNAMED00120'  AS  '/dev/rdata92_disk';

最后不要忘记
ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT=AUTO;