Complete recovery:

rman target / nocatalog

startup mount;

restore database;

recover database;

alter database open;   -- 在归档模式下

恢复的之后, 更改的路径

rman target / nocatalog

startup mount;

run {

set newname for datafile 1 to ‘/<newdir>/system01.dbf’ …

restore database;

switch datafile all;

recover database;

alter database open; }

tablespace 级别de :

run {

sql “alter tablespace users offline immediate”;

restore tablespace users;

recover tablespace users;

sql “alter tablespace users online”; }

使用 rman 重新定位 tablespace 的路径:

1. 首先确认要转换路径的表空间的datafile. select file#, name, bytes from v$datafiles;

2. run {

sql “alter tablespace users offline immediate”;

set newname for datafile ‘/oradata/u03/users01.dbf’ to ‘/oradata/u04/users01/dbf’ --这句用来指定 restore的路径

restore(tablespace users);

switch datafile 3;  -- update the control file and recovery catalog

recover tablespace users;

sql “alter tablespace tbs1 online”; }

Incomplete Recovery:

1. Mount the database

2. Allocate multiple channels for parallelization.

3. Restore all datafiles.

4. Recover the database by using UNTIL TIME, UNTIL SEQUENCE, or UNTIL SCN.

5. Open the database by using RESETLOGS.

6. Perform a whole database backup.

run {

allocate channel c1 type disk;

allocate channel c2 type disk;

set until time = ‘2000-12-09:14:44:44’;

restore database;

recover database;

alter database open resetlogs; }

这里要注意一下: NLS_DATE_FORMAT 这个参数所对应的时间格式.

run {

set until sequence 120 thread 1;

alter database mount;

restore database;

recover database;

sql “alter database open resetlogs”; }

转载

恢复的几种情形

1.在mount 或open 阶段完成的灾难恢复

非系统表空间,undo表空间,所有的数据文件

2.在nomount 阶段完成的灾难恢复

控制文件(controlfile)

3.在mount 阶段完成的灾难恢复

系统表空间,联机重做日志文件

RMAN Restore, Recovery的更多相关文章

  1. RMAN restore fails with ORA-01180: can not create datafile 1

      最近在验证.测试备份有效性时,遇到了"ORA-01180: can not create datafile 1"这个错误,顺便结合metalink的官方文档"RMAN ...

  2. rman restore spfile from backup

    spfile一般在$ORACLE_HOME/dbs(linux)目录,如果你丢失了spfile并不会引起实例立刻停掉,你的实例可以继续操作,尽管当你restore spfile的时候需要关闭重启实例, ...

  3. Oracle 12c: RMAN restore/recover pluggable database

    查看数据库状态 运行在归档模式,可拔插数据库name=pdborcl SQL> archive log list; Database log mode Archive Mode Automati ...

  4. 转 Monitoring Restore/Recovery Progress

    ora-279 是可以忽略的报错 In general, a restore should take approximately the same time as a backup, if not l ...

  5. RMAN restore fails with ORA-01180: can not create datafile 1 (文档 ID 1265151.1)

    http://blog.itpub.net/26655292/viewspace-2131269/ ########Q&A issue1:ORA-01180: can not create d ...

  6. Checklist for an RMAN Restore (Doc ID 1554636.1)

    Checklist for an RMAN Restore (Doc ID 1554636.1) APPLIES TO: Oracle Database - Enterprise Edition - ...

  7. 11g RMAN Restore archivelog用法

    I.备份所有归档日志文件 RMAN> BACKUP FORMAT '/u01/backup/arch_%U_%T' skip inaccessible filesperset 5 ARCHIVE ...

  8. asm单机dg dbca报错ORA-01031 CRS-2676,rman restore主库控制文件报错ORA-15081

    dg-> ll $ORACLE_HOME/bin/oracle -r-xr-s--x 1 oracle asmadmin 210824714 Nov 20 16:41 /u01/app/orac ...

  9. 如何将RAC数据库的 RMAN Disk 备份 Restore 到另一个节点上的单个实例 (Doc ID 415579.1)

    HowTo Restore RMAN Disk backups of RAC Database to Single Instance On Another Node (Doc ID 415579.1) ...

随机推荐

  1. Python 爬取汽车领域问答语料(自用)

    #coding=utf-8 import time import requests from lxml import etree from pymongo import MongoClient fro ...

  2. Nginx负载均衡+监控状态检测

    Nginx负载均衡+监控状态检测 想用Nginx或者Tengine替代LVS,即能做七层的负载均衡,又能做监控状态检测,一旦发现后面的realserver挂了就自动剔除,恢复后自动加入服务池里,可以用 ...

  3. win10下JDK安装,配置环境变量后出现error:could not open '...jvm.cfg'

        分析: 大多是安装jdk的时候在注册表里注册过,打开注册表查看里面如下三个文件( Java Development Kit,Java Plug-in,Java Runtime Environm ...

  4. unable to connect to ssl://gateway.sandbox.push.apple.com:2195 错误

    使用APNS 搭建苹果推送服务器错误:unable to connect to ssl://gateway.sandbox.push.apple.com:2195 错误 1:检查你的服务器的端口 21 ...

  5. iOS 调用音乐播放以及视频播放器

    音乐播放 NSString *path = [[NSBundle mainBundle] pathForResource:@"预谋" ofType:@"mp3" ...

  6. ES6 set 应用场景

    1.数组去重 let arr = [3, 5, 2, 2, 5, 5]; let unique = [...new Set(arr)]; // [3, 5, 2] 2.并集(Union).交集(Int ...

  7. ASP.NET请求管道、应用程序生命周期、整体运行机制

    我们知道在ASP.NET中,若要对ASP.NET应用程序进行 初始化并使它处理请求,必须执行一些处理步骤,熟悉应用程序生命周期非常重要,这样才能在适当的生命周期阶段编写代码,达到预期的效果.永远不要做 ...

  8. 【Python 数据分析】jieba文本挖掘

    jieba是一个强大的分词库,完美支持中文分词 安装jieba 使用命令安装 pip install jieba 出现上图表示安装成功了 jieba分词模式 全模式 全模式:试图将句子精确地切开,适合 ...

  9. zabbix报错listener failed: zbx_tcp_listen() fatal error: unable to serve on any address

    I'm trying to install zabbix on a new (virtual) server. But i have troubles with the zabbix_agentd o ...

  10. 随机验证码模块(random)

    1. 生成一个6位数字+字母的验证码 (面试题) import random l = []for i in range(6): alpha = chr(random.randint(65,90)) a ...