rman整库备份还原.docx

上传人:b****6 文档编号:14228416 上传时间:2023-06-21 格式:DOCX 页数:9 大小:276.70KB
下载 相关 举报
rman整库备份还原.docx_第1页
第1页 / 共9页
rman整库备份还原.docx_第2页
第2页 / 共9页
rman整库备份还原.docx_第3页
第3页 / 共9页
rman整库备份还原.docx_第4页
第4页 / 共9页
rman整库备份还原.docx_第5页
第5页 / 共9页
rman整库备份还原.docx_第6页
第6页 / 共9页
rman整库备份还原.docx_第7页
第7页 / 共9页
rman整库备份还原.docx_第8页
第8页 / 共9页
rman整库备份还原.docx_第9页
第9页 / 共9页
亲,该文档总共9页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

rman整库备份还原.docx

《rman整库备份还原.docx》由会员分享,可在线阅读,更多相关《rman整库备份还原.docx(9页珍藏版)》请在冰点文库上搜索。

rman整库备份还原.docx

rman整库备份还原

整库丢失

1登录rman

rmantarget/

2备份数据库和归档文件

backupdatabaseplusarchivelogall;

3产看备份情况

listbackup;

4模拟数据变化

createtabletest31asselect*fromdba_users;

altersystemswitchlogfile;

createtabletest32asselect*fromdba_users;

altersystemswitchlogfile;

createtabletest33asselect*fromdba_users;

5删除整个数据库

cd/home/app/oracle/oradata

rm–rfora

数据库已经损坏

6根据数据库启动流程,首先恢复spfile

viinitora.ora

i

db_name='ora'

:

wq

-bash-4.2$sqlplus/assysdba

shutimmediateforce;

还原数据库

找到备份文件

rmantarget/

进入rman设置dbid为备份片的id

setdbid=1589493431

还原数据库

恢复控制文件

restorecontrolfilefromautobackup;

设置数据库为mount状态

alterdatabasemount;

恢复数据库

restoredatabase;

recoverdatabase;

Startingrecoverat22-MAR-18

usingchannelORA_DISK_1

startingmediarecovery

archivedlogforthread1withsequence10isalreadyondiskasfile/home/archivelog/1_10_971265017.dbf

archivedlogforthread1withsequence11isalreadyondiskasfile/home/archivelog/1_11_971265017.dbf

archivedlogfilename=/home/archivelog/1_10_971265017.dbfthread=1sequence=10

archivedlogfilename=/home/archivelog/1_11_971265017.dbfthread=1sequence=11

unabletofindarchivedlog

archivedlogthread=1sequence=12

RMAN-00571:

===========================================================

RMAN-00569:

===============ERRORMESSAGESTACKFOLLOWS===============

RMAN-00571:

===========================================================

RMAN-03002:

failureofrecovercommandat03/22/201813:

57:

25

RMAN-06054:

mediarecoveryrequestingunknownarchivedlogforthread1withsequence12andstartingSCNof1879455

开始恢复在22-MAR-18

使用通道ORA_DISK_1

媒体开始复苏

以序列10为线程1的归档日志已经在磁盘上作为文件/home/archivelog/1_10_971265017.dbf。

以序列11为线程1的归档日志已经在磁盘上作为文件/home/archivelog/1_11_971265017.dbf。

归档日志文件名称=/home/archivelog_10_971265017/1。

dbf线程=1序列=10

归档日志文件名称=/home/archivelog_11_971265017/1。

dbf线程=1=11序列

无法找到归档日志。

归档日志线程=1序列=12

rman-00571:

===========================================================

rman-00569:

===============错误消息堆栈如下===============

rman-00571:

===========================================================

RMAN-03002:

故障恢复命令在03/22/201813:

57:

25。

RMAN-06054:

媒体恢复请求未知存档的线程1的归档日志,并使用序列12和启动SCN(1879455)。

报错找不到归档日志,用已下命令手动回复归档

catalogstartwith'/home/archivelog/';

刷新数据库日志

SQL>alterdatabaseopenresetlogs;

Databasealtered.

SQL>selectstatusfromv$instance;

STATUS

------------

OPEN

查看原来创建的test313233回复回来没有了

完成数据库恢复

下面是一些报错的记录

RMAN>recoverdatabase;

Startingrecoverat22-MAR-18

usingchannelORA_DISK_1

startingmediarecovery

unabletofindarchivedlog

archivedlogthread=1sequence=10

RMAN-00571:

===========================================================

RMAN-00569:

===============ERRORMESSAGESTACKFOLLOWS===============

RMAN-00571:

===========================================================

RMAN-03002:

failureofrecovercommandat03/22/201813:

55:

51

RMAN-06054:

mediarecoveryrequestingunknownarchivedlogforthread1withsequence10andstartingSCNof1878762

RMAN>catalogstartwith'/home/archivelog/';

searchingforallfilesthatmatchthepattern/home/archivelog/

ListofFilesUnknowntotheDatabase

=====================================

FileName:

/home/archivelog/1_10_971265017.dbf

FileName:

/home/archivelog/1_11_971265017.dbf

Doyoureallywanttocatalogtheabovefiles(enterYESorNO)?

yes

catalogingfiles...

catalogingdone

ListofCatalogedFiles

=======================

FileName:

/home/archivelog/1_10_971265017.dbf

FileName:

/home/archivelog/1_11_971265017.dbf

RMAN>recoverdatabase

2>;

Startingrecoverat22-MAR-18

usingchannelORA_DISK_1

startingmediarecovery

archivedlogforthread1withsequence10isalreadyondiskasfile/home/archivelog/1_10_971265017.dbf

archivedlogforthread1withsequence11isalreadyondiskasfile/home/archivelog/1_11_971265017.dbf

archivedlogfilename=/home/archivelog/1_10_971265017.dbfthread=1sequence=10

archivedlogfilename=/home/archivelog/1_11_971265017.dbfthread=1sequence=11

unabletofindarchivedlog

archivedlogthread=1sequence=12

RMAN-00571:

===========================================================

RMAN-00569:

===============ERRORMESSAGESTACKFOLLOWS===============

RMAN-00571:

===========================================================

RMAN-03002:

failureofrecovercommandat03/22/201813:

57:

25

RMAN-06054:

mediarecoveryrequestingunknownarchivedlogforthread1withsequence12andstartingSCNof1879455

RMAN>exit

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 人文社科 > 法律资料

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2