北京oracle培训http://www.cuug.com/
一、修改临时文件:
SQL> desc v$tempfile;
NameNull?Type
------------------------------------------------- ----------------------------
FILE#NUMBER
CREATION_CHANGE#NUMBER
CREATION_TIMEDATE
TS#NUMBER
RFILE#NUMBER
STATUSVARCHAR2(7)
ENABLEDVARCHAR2(10)
BYTESNUMBER
BLOCKSNUMBER
CREATE_BYTESNUMBER
BLOCK_SIZENUMBER
NAMEVARCHAR2(513)
SQL> select file#,name from v$tempfile;
FILE# NAME
------------------------------------------------------------
1 /u01/app/oracle/oradata/undosql/temp01.dbf
SQL> alter database rename file'/u01/app/oracle/oradata/undosql/temp01.dbf' to'/u01/app/oracle/neworadata/temp01.dbf';
Database altered.
二、修改联机重做日志文件:
SQL> desc v$logfile;
NameNull?Type
------------------------------------------------- ----------------------------
GROUP#NUMBER
STATUSVARCHAR2(7)
TYPEVARCHAR2(7)
MEMBERVARCHAR2(513)
IS_RECOVERY_DEST_FILEVARCHAR2(3)
SQL> col member format a50
SQL> select group#,member fromv$logfile;
GROUP# MEMBER
------------------------------------------------------------
3 /u01/app/oracle/oradata/undosql/redo03.log
2 /u01/app/oracle/oradata/undosql/redo02.log
1 /u01/app/oracle/oradata/undosql/redo01.log
SQL> alter database rename file'/u01/app/oracle/oradata/undosql/redo03.log' to'/u01/app/oracle/neworadata/redo03.log';
Database altered.
SQL> alter database rename file'/u01/app/oracle/oradata/undosql/redo02.log' to'/u01/app/oracle/neworadata/redo02.log';
Database altered.
SQL> alter database rename file'/u01/app/oracle/oradata/undosql/redo01.log' to'/u01/app/oracle/neworadata/redo01.log';
Database altered.
确认所有的文件都指定到新的文件路下;然后加载到open状态,如果能够加载成功,说明数据库已经恢复过来了;
SQL> alter database open;
Database altered.
阅读(2501) | 评论(0) | 转发(0) |