Chinaunix首页 | 论坛 | 博客
  • 博客访问: 213664
  • 博文数量: 123
  • 博客积分: 3066
  • 博客等级: 中校
  • 技术积分: 1920
  • 用 户 组: 普通用户
  • 注册时间: 2007-08-23 21:22
文章分类

全部博文(123)

文章存档

2012年(1)

2010年(1)

2009年(48)

2008年(73)

我的朋友

分类: Oracle

2008-11-27 11:18:13

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>
阅读(646) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~