在standby备库上df -h时发现根目录/ 空间已用100%,主要两个大的数据文件rsm_idx80.dbf和 rsm_idx81.dbf ,解决过程如下:
1.先查看一下alert.log
2.先停止恢复
alter database recover managed standby database cancel ;
3.把需要转用的目录加进去
alter system set db_file_name_convert='xxx,xxx' scope=both;
4.关闭数据库
shtudown immediate;
5.移动数据文件到其他目录,比如/home下
mv rsm_idx80.dbf /home
mv rsm_idx81.dbf /home
6.启动数据库到mount
alter system set standby_file_management='MANUAL' SCOPE=BOTH;
alter database rename file '/jbindx02/oraindx/indx/rsm_idx80.dbf' to '/dgjbdata/indx/rsm_idx80.dbf' ;
---成功
alter database rename file '/jbindx02/oraindx/indx/rsm_idx80.dbf' to '/dgjbdata/indx/rsm_idx80.dbf' ;
---失败(错误信息如下)
ORA-01111: name for data file 546 is unknown - rename to correct file
ORA-01110: data file 546: '/u01/oracle/product/10.2.0.3/dbs/UNNAMED00546'
ORA-01157: cannot identify/lock data file 546 - see DBWR trace file
ORA-01111: name for data file 546 is unknown - rename to correct file
ORA-01110: data file 546: '/u01/oracle/product/10.2.0.3/dbs/UNNAMED00546'
其实从上面看这个文件的大小和alert.log中的信息,已经知道了,这个文件没有创建成功。
7.对这个损坏的文件进行恢复
SQL> select name from v$datafile where file# = 546;
NAME
--------------------------------------------------------------------------------
/u01/oracle/product/10.2.0.3/dbs/UNNAMED00546
SQL> alter database create datafile '/u01/oracle/product/10.2.0.3/dbs/UNNAMED00546' as '/dgjbdata/indx/rsm_idx81.dbf';
Database altered.
SQL> select name from v$datafile where file# = 546;
NAME
--------------------------------------------------------------------------------
/dgjbdata/indx/rsm_idx81.dbf
-------过来了^_^
SQL> alter system set standby_file_management=AUTO scope=both;
SQL> alter database create datafile '/u01/oracle/product/10.2.0.3/dbs/UNNAMED00546' as '/dgjbdata/indx/rsm_idx81.dbf';
Database altered.
8.切换到恢复状态下
ALTER DATABASE RECOVER managed standby database disconnect from session
9.完工了,over
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/628922/viewspace-614798/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/628922/viewspace-614798/