Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1172023
  • 博文数量: 178
  • 博客积分: 2776
  • 博客等级: 少校
  • 技术积分: 2809
  • 用 户 组: 普通用户
  • 注册时间: 2012-03-22 15:36
文章分类

全部博文(178)

文章存档

2014年(3)

2013年(66)

2012年(109)

分类: Oracle

2013-05-27 10:42:00

北京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.

阅读(2508) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~