惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The GitHub Blog
The GitHub Blog
Y
Y Combinator Blog
B
Blog RSS Feed
大猫的无限游戏
大猫的无限游戏
J
Java Code Geeks
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 【当耐特】
MongoDB | Blog
MongoDB | Blog
Hugging Face - Blog
Hugging Face - Blog
有赞技术团队
有赞技术团队
T
The Blog of Author Tim Ferriss
B
Blog
小众软件
小众软件
T
Tailwind CSS Blog
MyScale Blog
MyScale Blog
I
InfoQ
Engineering at Meta
Engineering at Meta
Blog — PlanetScale
Blog — PlanetScale
P
Proofpoint News Feed
H
Help Net Security
雷峰网
雷峰网
S
SegmentFault 最新的问题
V
Visual Studio Blog
爱范儿
爱范儿

博客园 - 孙晓东

perl多线程理解 ORA-00020: No more process state objects available故障一例 SOA架构设计经验分享—架构、职责、数据一致性 利用增量备份恢复因归档丢失造成的DG gap ORACLE之ASM概念 Oracle Dataguard的原理与基本配置 oracle之报错:ORA-00054: 资源正忙,要求指定 NOWAIT linux挂载windows上的共享文件夹 oracle操作之传输表空间 dba诊断之IO 用SecureCRT在windows和CentOS间上传下载文件 Centos6.5下设置静态IP oracle 11g dataguard创建的简单方法 linux下mysql安装、目录结构、配置 dba诊断之lock oracle11G在linux环境下的卸载操作 Ubuntu 14.04(32位)安装Oracle 11g(32位)全过程 linux系统下设置oracle开机自动启动 Redhat6.5 安装64位oracle11.2.0.1
异机恢复perform restores
孙晓东 · 2015-03-23 · via 博客园 - 孙晓东

Restoring and Recovering the database on a new host

第一台机器上mount模式下做全备

new host:

1.配置oracle_sid和之前一致

2.start rman and connect to the target instance in NOCATALOG mode. (rman target / nocatalog)

rman target /

<=>

rman target / nocatalog

3.set then database identifier(DBID).

4.start the instance in NOMOUNT mode.

5.restore the server parameter file from the backup sets.(pfile 传到new host 恢复出spfile)

6.shutdown the instance.

7.edit the restored initialization parameter file.

8.start the instance in NOMOUNT mode.

9.create a RUN block to :

     - Restore the control file

     - Mount the database

10.create the rman recovery script to restore and recover the database.

11.execute the rman script.

12.open the database with the resetlogs option.

backups 传到new host

还原spfile

FRA

catalog recover area;

非FRA

catalog start with '/oradata';

RMAN> run {

2> restore spfile from autobackup

3> recovery area = '<flash recovery area destination>'

4> db_name = '<db_name>';

5> }

offline的恢复(冷备)

startup force nomount;

restore controlfile;

alter database mount;

restore database;

recover database noredo;

alter database open resetlogs;

异机恢复(option)

从NODE2恢复到NODE1:

0、环境清理

登陆NODE1

shutdown immediate;

startup mount restrict;

drop database;

1、准备三样内容:

rman target / 获得DBID:758457693

全库的完整备份(含控制文件、SP文件、归档文件)

run {

allocate channel c1 device type disk format '/u01/oradata/newhost/%U';

backup as compressed backupset database include current controlfile plus archivelog;

}

cd /u01/oradata/newhost/

scp * node4:/u01/oradata/newhost/

单独将autobackup的spfile&controlfile复制过来。

2、在node1上完成实例的启动

关闭ASM实例,释放内存。

创建目录

cd /u01/oradata

mkdir sales arch backup newhost

mkdir -p /u01/app/oracle/fast_recovery_area/sales

rman target /

set dbid 758457693

startup nomount;

restore spfile to '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfilesales.ora' from '/u01/oradata/newhost/o1_mf_s_886008933_bv6p3553_.bkp';

startup nomount force;

3、完成控制文件的启动

restore controlfile from '/u01/oradata/newhost/o1_mf_s_886008933_bv6p3553_.bkp';

alter database mount;

4、恢复数据库

catalog start with '/u01/oradata/newhost/';

restore database;

SQL > recover database using backup controlfile until cancel;

SQL > alter database open resetlogs;