SQL- recover database

SQL> shutdown abort;
ORACLE 例程已经关闭。
SQL> startup mount;
ORACLE 例程已经启动。

Total System Global Area  612368384 bytes
Fixed Size                  1250428 bytes
Variable Size             247466884 bytes
Database Buffers          356515840 bytes
Redo Buffers                7135232 bytes
数据库装载完毕。
SQL> recover database;
完成介质恢复。
SQL>

Closed Database Recovery: Example
You have determined that u01 contains corrupt blocks. This is where datafile 1 is stored. By querying V$DATAFILE and V$TABLESPACE views, you discover that datafile 1 is one of the files belonging to the system tablespace. To recover the database, perform the following steps:
1. If the instance is not already shut down, issue the SHUTDOWN command as follows:
SQL> SHUTDOWN ABORT
2. Restore the file from backup (the most recent if available):
UNIX> host cp /BACKUP/system01.dbf /ORADATA/u01
Windows  > host copy c:/backup/df1.dbf d:/data/
3. Start the instance in Mount mode and recover the datafile:
SQL> STARTUP MOUNT
SQL> RECOVER DATABASE
or SQL> RECOVER DATAFILE /ORADATA/u01/system01.dbf
ORA-00279: change 148448 ...07/23/02 17:04:20 needed for thread ORA-00289: suggestion : /ORADATA/ARCHIVE1/arch_144.arc
ORA-00280: change 148448 for thread 1 is in sequence #144
Log applied.
...
Media recovery complete.
--------------------------
rman target "oratest3"
恢复管理器: Release 10.2.0.1.0 - Production on 星期四 11月 27 11:03:36 2008
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
目标数据库口令:
已连接到目标数据库: ORATEST3 (DBID=3951784613, 未打开)
RMAN> recover database;
启动 recover 于 27-11月-08
使用目标数据库控制文件替代恢复目录
分配的通道: ORA_DISK_1
通道 ORA_DISK_1: sid=154 devtype=DISK
正在开始介质的恢复
介质恢复完成, 用时: 00:00:00
完成 recover 于 27-11月-08
RMAN>
RMAN> startup mount;
数据库已经启动
RMAN> recover database;
启动 recover 于 27-11月-08
使用通道 ORA_DISK_1
正在开始介质的恢复
介质恢复完成, 用时: 00:00:00
完成 recover 于 27-11月-08
RMAN>
RMAN> shutdown immediate;
数据库已卸载
Oracle 实例已关闭
RMAN> startup mount;
已连接到目标数据库 (未启动)
Oracle 实例已启动
数据库已装载
系统全局区域总计     612368384 字节
Fixed Size                     1250428 字节
Variable Size                247466884 字节
Database Buffers             356515840 字节
Redo Buffers                   7135232 字节
RMAN> recover database;
启动 recover 于 27-11月-08
分配的通道: ORA_DISK_1
通道 ORA_DISK_1: sid=156 devtype=DISK
正在开始介质的恢复
介质恢复完成, 用时: 00:00:00
完成 recover 于 27-11月-08
RMAN>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值