oracle rman全备恢复实践
来源:互联网 发布:mysql中文读出来乱码 编辑:程序博客网 时间:2024/06/05 00:28
rman恢复实践
设定参数:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/arch/rman/controlfile%F.ctnl';
CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT '/arch/rman/full%t.bak';
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/arch/rman/controlfile%F.ctnl';
CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT '/arch/rman/full%t.bak';
数据库rman 全备
rman>backup database plus archivelog delete input;
rman>backup database plus archivelog delete input;
备份产生的三个文件
-rw-r----- 1 oracle oinstall 7143424 Jan 28 18:05 controlfilec-2719028776-20100128-01.ctnl
-rw-r----- 1 oracle oinstall 41074688 Jan 28 18:03 full709495428.bak
-rw-r----- 1 oracle oinstall 763379712 Jan 28 18:05 full709495432.bak
-rw-r----- 1 oracle oinstall 17920 Jan 28 18:05 full709495518.bak
-rw-r----- 1 oracle oinstall 7143424 Jan 28 18:05 controlfilec-2719028776-20100128-01.ctnl
-rw-r----- 1 oracle oinstall 41074688 Jan 28 18:03 full709495428.bak
-rw-r----- 1 oracle oinstall 763379712 Jan 28 18:05 full709495432.bak
-rw-r----- 1 oracle oinstall 17920 Jan 28 18:05 full709495518.bak
rman恢复
------------------
1、启动数据库到 nomount 状态
$sqlplus / as sysdba
SQL> startup nomount
1、启动数据库到 nomount 状态
$sqlplus / as sysdba
SQL> startup nomount
2、spfile 恢复
$rman nocatalog
rman> connect target /
$rman nocatalog
rman> connect target /
run {
allocate channel c1 DEVICE TYPE DISK format '/arch/rman/controlfile%F.ctnl';
restore spfile to pfile '/arch/pfile.ora' from '/arch/rman/controlfilec-2719028776-20100128-01.ctnl';
release channel c1;
}
allocate channel c1 DEVICE TYPE DISK format '/arch/rman/controlfile%F.ctnl';
restore spfile to pfile '/arch/pfile.ora' from '/arch/rman/controlfilec-2719028776-20100128-01.ctnl';
release channel c1;
}
3、控制文件恢复
run {
allocate channel c1 DEVICE TYPE DISK format '/arch/rman/controlfile%F.ctnl';
restore controlfile from '/arch/rman/controlfilec-2719028776-20100128-01.ctnl';
release channel c1;
}
4、全库恢复
在恢复控制文件的情况下,可以修改数据到 mount状态,进行全库的恢复
rman> alter database mount;
run {
allocate channel c1 device type disk format '/arch/rman/full%t.bak';
restore database;
release channel c1;
}
allocate channel c1 device type disk format '/arch/rman/full%t.bak';
restore database;
release channel c1;
}
5、恢复archivelog
run {
allocate channel c1 device type disk format '/arch/rman/full%t.bak';
restore archivelog all;
}
allocate channel c1 device type disk format '/arch/rman/full%t.bak';
restore archivelog all;
}
run {
allocate channel c1 device type disk format '/arch/rman/full%t.bak';
restore archivelog from logseq=72 until logseq=73;
}
allocate channel c1 device type disk format '/arch/rman/full%t.bak';
restore archivelog from logseq=72 until logseq=73;
}
6、redolog 恢复
SQL>recover database using backup controlfile until cancel;
SQL>alter database open resetlogs; //现在有redolog 产生了,还有temp表空间文件也生成了或者分开两步执行
SQL>select * from dual;
SQL>select * from dual;
全库成功恢复
0 0
- oracle rman全备恢复实践
- Oracle rman 全备脚本
- Oracle RMAN 全备 脚本
- [转帖]RMAN 恢复实践
- Oracle 恢复[rman全备份集+当期归档日志]
- Oracle冷备份数据库及rman恢复实践
- oracle rman 恢复脚本
- rman恢复Oracle数据库
- ORACLE rman 部分恢复
- Oracle RMAN -不完全恢复
- RMAN - 备份与恢复实践
- RMAN - 备份与恢复实践
- Oracle RMAN-全备份
- Oracle RMAN 实践
- RMAN全库【完全恢复/不完全恢复】
- 只有rman全备的和所有归档的恢复
- 从rman全备恢复数据库的步骤
- ORACLE数据库RMAN备份恢复
- 第七节 独立按键之中断方式
- Label转成URL
- 四阶幻方的穷举求解.
- IDEA快捷键
- 基于NLPIR的lucene 自定义Analyzer实现类
- oracle rman全备恢复实践
- 网页漂浮窗
- 信息学奥林匹克竞赛-小鱼的航程(改进版)
- Mysql优化中遇到的问题和感受
- C/C++的内存泄漏检测工具Valgrind memcheck的使用经历
- 图像处理中的卷积---2.高斯卷积
- poj3107(树形dp)
- JQuery事件冒泡机制与解决
- 遗传算法染色体变长编码的实现