rename datafile时报错ORA-01511,ORA-01121,ORA-01110

WBOY
發布: 2016-06-07 17:33:43
原創
2809 人瀏覽過

rename datafile时报错ORA-01511,ORA-01121,ORA-01110

现象:
实例启动到mount之后,rename datafile时报错ORA-01511,ORA-01121,ORA-01110
SQL>
SQL> ALTER DATABASE RENAME FILE '+DATA/rac/datafile/system.416.833384105' TO '+TESTDG/rac/datafile/system.dbf';
ALTER DATABASE RENAME FILE '+DATA/rac/datafile/system.416.833384105' TO '+TESTDG/rac/datafile/system.dbf'
*
ERROR at line 1:
ORA-01511: error in renaming log/data files
ORA-01121: cannot rename database file 1 - file is in use or recovery
ORA-01110: data file 1: '+DATA/rac/datafile/system.416.833384105'

分析:
只所以出现这种情况因为我的DB是RAC环境,另一个节点是open状态,导致出现上面报错。

解决方案:
关闭另一个节点的实例。
[Oracle@saprac4 ~]$ dba

SQL*Plus: Release 11.1.0.6.0 - Production on Thu Dec 5 16:15:06 2013

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


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

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>

SQL>
再在节点1上执行rename datafile。
SQL> ALTER DATABASE RENAME FILE '+DATA/rac/datafile/system.416.833384105' TO '+TESTDG/rac/datafile/system.dbf';

Database altered.

SQL>
SQL>
SQL> ALTER DATABASE RENAME FILE '+DATA/rac/datafile/sysaux.417.833384107' TO '+TESTDG/rac/datafile/sysaux.dbf';
ALTER DATABASE RENAME FILE '+DATA/rac/datafile/undotbs1.418.833384107' TO '+TESTDG/rac/datafile/undotbs1.dbf';
ALTER DATABASE RENAME FILE '+DATA/rac/datafile/users.419.833384109' TO '+TESTDG/rac/datafile/users.dbf';
ALTER DATABASE RENAME FILE '+DATA/rac/datafile/undotbs2.424.833384491' TO '+TESTDG/rac/datafile/undotbs2.dbf';
Database altered.

SQL>
Database altered.

SQL>
Database altered.

SQL>

Database altered.

SQL>
SQL>
SQL>
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: '+TESTDG/rac/datafile/system.dbf'


SQL> recover database;
Media recovery complete.
SQL> alter database open;

Database altered.

SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
+TESTDG/rac/datafile/system.dbf
+TESTDG/rac/datafile/sysaux.dbf
+TESTDG/rac/datafile/undotbs1.dbf
+TESTDG/rac/datafile/users.dbf
+TESTDG/rac/datafile/undotbs2.dbf

SQL>

相关阅读:

ORA-01172、ORA-01151错误处理

ORA-00600 [2662]错误解决

ORA-01078 和 LRM-00109 报错解决方法

ORA-00471 处理方法笔记

ORA-00314,redolog 损坏,或丢失处理方法

ORA-00257 归档日志过大导致无法存储的解决办法

linux

相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板