基于cancel的不完全恢复
实验:基于cancel的不完全恢复 实验环境查看 lsnrctl status select open_mode from v$database; --监听与数据库状态 show parameter recovery; select flashback_on from v$database; archive log list; --闪回与归档的配置 1)准备环境:RMAN全库备份 RMAN
实验:基于cancel的不完全恢复
实验环境查看
lsnrctl status
select open_mode from v$database;
--监听与数据库状态
show parameter recovery;
select flashback_on from v$database;
archive log list;
--闪回与归档的配置
1)准备环境:RMAN全库备份
RMAN> backup as compressed backupset full database;
--压缩备份
--backup full database ;备份集备份
Starting backup at 20-MAR-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=45 device type=DISK
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/ORA11GR2/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/ORA11GR2/sysaux01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/ORA11GR2/undotbs01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/ORA11GR2/example01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/ORA11GR2/users01.dbf
channel ORA_DISK_1: starting piece 1 at 20-MAR-13
channel ORA_DISK_1: finished piece 1 at 20-MAR-13
piece handle=/u01/app/FRA/ORA11GR2/backupset/2013_03_20/o1_mf_nnndf_TAG20130320T151949_8nlrrrfm_.bkp tag=TAG20130320T151949 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:02:17
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 20-MAR-13
channel ORA_DISK_1: finished piece 1 at 20-MAR-13
piece handle=/u01/app/FRA/ORA11GR2/backupset/2013_03_20/o1_mf_ncsnf_TAG20130320T151949_8nlrx2qs_.bkp tag=TAG20130320T151949 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 20-MAR-13
2)创建测试数据
SYS@ORA11GR2>create table scott.t1 as select 1 as id from dual;
Table created.
SYS@ORA11GR2>alter system archive log current;
System altered.
SYS@ORA11GR2>create table scott.t2 as select 2 as id from dual;
Table created.
SYS@ORA11GR2>alter system archive log current;
System altered.
SYS@ORA11GR2>create table scott.t3 as select 3 as id from dual;
Table created.
SYS@ORA11GR2>alter system archive log current;
System altered.
SYS@ORA11GR2>
SYS@ORA11GR2>select table_name,tablespace_name from dba_tables where owner='SCOTT' AND table_name LIKE 'T_';
TABLE_NAME TABLESPACE_NAME
------------------------- ------------------------------
T3 USERS
T2 USERS
T1 USERS
完成测试数据构造后,查看生成的归档日志
ls /u01/app/oracle/fast_recovery_area/PROD/archivelog/2014_10_08
ls -lrt
3)删除所有数据文件和在线数据文件
在sqlplus里面删除:
SYS@PROD>select name from v$datafile;
NAME
--------------------
/u01/app/oracle/oradata/PROD/datafile/o1_mf_system_b2251bs1_.dbf
/u01/app/oracle/oradata/PROD/datafile/o1_mf_sysaux_b2251bvo_.dbf
/u01/app/oracle/oradata/PROD/datafile/o1_mf_undotbs1_b2251bw5_.dbf
/u01/app/oracle/oradata/PROD/datafile/o1_mf_users_b2251byw_.dbf
/u01/app/oracle/oradata/PROD/datafile/o1_mf_example_b2257d0c_.dbf
/u01/app/oracle/oradata/PROD/datafile/tbs_move_01.dbf
SYS@PROD>select member from v$logfile;
MEMBER
----------------------------------------------------------------------------------------------------------------------------------
/u01/app/oracle/oradata/PROD/onlinelog/o1_mf_3_b22567o2_.log
/u01/app/oracle/fast_recovery_area/PROD/onlinelog/o1_mf_3_b2256827_.log
/u01/app/oracle/oradata/PROD/onlinelog/o1_mf_2_b2255zsg_.log
/u01/app/oracle/fast_recovery_area/PROD/onlinelog/o1_mf_2_b22560gb_.log
/u01/app/oracle/oradata/PROD/onlinelog/o1_mf_1_b2255npg_.log
/u01/app/oracle/fast_recovery_area/PROD/onlinelog/o1_mf_1_b2255nxl_.log
SYS@PROD>!rm /u01/app/oracle/oradata/PROD/datafile/*.dbf;
SYS@PROD>!rm /u01/app/oracle/oradata/PROD/onlinelog/*.log;
SYS@PROD>!rm /u01/app/oracle/fast_recovery_area/PROD/onlinelog/*.log;
在OS里面删除:
[oracle@ocmu ORA11GR2]$ pwd
/u01/app/oracle/oradata/ORA11GR2
[oracle@ocmu ORA11GR2]$ ls
control01.ctl example01.dbf redo02.log sysaux01.dbf temp01.dbf users01.dbf
control02.ctl redo01.log redo03.log system01.dbf undotbs01.dbf
[oracle@ocmu ORA11GR2]$ rm *.log
[oracle@ocmu ORA11GR2]$ ls
control01.ctl example01.dbf system01.dbf undotbs01.dbf
control02.ctl sysaux01.dbf temp01.dbf users01.dbf
[oracle@ocmu ORA11GR2]$
4)数据库启动到mount模式
SYS@ORA11GR2>shutdown abort;
ORACLE instance shut down.
SYS@ORA11GR2>startup mount;
ORACLE instance started.
Total System Global Area 841162752 bytes
Fixed Size 1339768 bytes
Variable Size 532680328 bytes
Database Buffers 301989888 bytes
Redo Buffers 5152768 bytes
Database mounted.
SYS@ORA11GR2>
5)RMAN还原数据库
RMAN> restore database;
Starting restore at 20-MAR-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=18 device type=DISK
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to /u01/app/oracle/oradata/ORA11GR2/system01.dbf
channel ORA_DISK_1: restoring datafile 00002 to /u01/app/oracle/oradata/ORA11GR2/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/ORA11GR2/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/ORA11GR2/users01.dbf
channel ORA_DISK_1: restoring datafile 00005 to /u01/app/oracle/oradata/ORA11GR2/example01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/FRA/ORA11GR2/backupset/2013_03_20/o1_mf_nnndf_TAG20130320T151949_8nlrrrfm_.bkp
channel ORA_DISK_1: piece handle=/u01/app/FRA/ORA11GR2/backupset/2013_03_20/o1_mf_nnndf_TAG20130320T151949_8nlrrrfm_.bkp tag=TAG20130320T151949
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:03:26
Finished restore at 20-MAR-13
RMAN>
6)基于cancel恢复
SYS@ORA11GR2>recover database until cancel;
--在sqlplus中完成
ORA-00279: change 883460 generated at 03/20/2013 15:19:50 needed for thread 1
ORA-00289: suggestion :
/u01/app/FRA/ORA11GR2/archivelog/2013_03_20/o1_mf_1_8_8nlrzy8w_.arc
ORA-00280: change 883460 for thread 1 is in sequence #8
Specify log: {
--应用sequence #8为8,名字为o1_mf_1_8_8nlrzy8w_.arc的归档日志文件,直接按回车键
ORA-00279: change 884069 generated at 03/20/2013 15:23:42 needed for thread 1
ORA-00289: suggestion :
/u01/app/FRA/ORA11GR2/archivelog/2013_03_20/o1_mf_1_9_8nls091w_.arc
ORA-00280: change 884069 for thread 1 is in sequence #9
ORA-00278: log file
'/u01/app/FRA/ORA11GR2/archivelog/2013_03_20/o1_mf_1_8_8nlrzy8w_.arc' no longer
needed for this recovery
Specify log: {
--应用sequence #9为9的这个归档日志文件,直接按回车键
ORA-00279: change 884101 generated at 03/20/2013 15:23:53 needed for thread 1
ORA-00289: suggestion :
/u01/app/FRA/ORA11GR2/archivelog/2013_03_20/o1_mf_1_10_8nls0os6_.arc
ORA-00280: change 884101 for thread 1 is in sequence #10
ORA-00278: log file
'/u01/app/FRA/ORA11GR2/archivelog/2013_03_20/o1_mf_1_9_8nls091w_.arc' no longer
needed for this recovery
Specify log: {
cancel
--手动输入cancel结束恢复,不管后面有没有可恢复文件,都会结束;
Media recovery cancelled.
SYS@ORA11GR2>
SYS@ORA11GR2>alter database open resetlogs;
Database altered.
SYS@ORA11GR2>
7)检查
SYS@ORA11GR2>select table_name,tablespace_name from dba_tables where owner='SCOTT' AND table_name LIKE 'T_';
TABLE_NAME TABLESPACE_NAME
------------------------- ------------------------------
T2 USERS
T1 USERS
SYS@ORA11GR2>
注 应用了两个归档日志,第三个归档日志cancel了,从结果中也可以看到,恢复以后的数据库中,只
存在T1,T2两张表,它们俩的重做日志就在前两个归档中,T3表的所有重做条目都在第三个归档中,
由于采取了cancel,所以,T3表并未恢复

热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

AI Hentai Generator
免费生成ai无尽的。

热门文章

热工具

记事本++7.3.1
好用且免费的代码编辑器

SublimeText3汉化版
中文版,非常好用

禅工作室 13.0.1
功能强大的PHP集成开发环境

Dreamweaver CS6
视觉化网页开发工具

SublimeText3 Mac版
神级代码编辑软件(SublimeText3)

热门话题

打开微信,在我中选择设置,选择通用后选择存储空间,在存储空间选择管理,选择要恢复文件的对话选择感叹号图标。教程适用型号:iPhone13系统:iOS15.3版本:微信8.0.24解析1首先打开微信,在我的页面中点击设置选项。2接着在设置页面中找到并点击通用选项。3然后在通用页面中点击存储空间。4接下来在存储空间页面中点击管理。5最后选择要恢复文件的对话,点击右侧的感叹号图标。补充:微信文件一般几天过期1要是微信接收的文件并没有点开过的情况下,那在七十二钟头之后微信系统会清除掉,要是己经查看了微信

最近有的朋友遇到了win11键盘大不了字的问题,不知道按那个键可以恢复,其实这可能是由于我们的键盘被锁定了,只需要解锁就可以了。win11键盘打不了字按哪个键恢复1、首先,我们按下键盘上面的“左shift+左alt+numlock”组合键。2、然后,打开下图所示的菜单后,点击“是”按钮启用鼠标键。3、接着,点击打开任务栏的“开始菜单”或“搜索”图标。4、之后,在上方搜索搜索框输入“osk”打开屏幕键盘应用。5、最后,点击一下屏幕键盘右下角“numlock”键即可。Ps:如果你使用的是笔记本,那么

无痕浏览是一种非常方便的浏览方式,可以在使用电脑或移动设备上网时保护个人隐私。无痕浏览模式通常会阻止浏览器记录访问历史、保存Cookie和缓存文件,以及防止正在浏览的网站在浏览器中留下任何痕迹。但是,对于一些特殊的情况,我们可能需要恢复无痕浏览的浏览记录。首先,我们需要明确一点:无痕浏览模式的目的是保护隐私,防止他人从浏览器中获取用户的上网记录。因此,无痕浏

在抖音这个充满创意与活力的短视频平台上,我们不仅可以欣赏到各种精彩内容,还能与志同道合的朋友展开深入的交流。其中,聊天火花作为衡量双方互动热度的重要指标,常常在不经意间点燃我们与好友之间的情感纽带。然而,有时由于一些原因,聊天火花可能会断开,那么如果我们想要恢复聊天火花究竟该如何操作呢,这篇教程攻略就将为大家带来详细的内容攻略介绍,希望能帮助到大家。抖音聊天火花断了怎么恢复?1、打开抖音的消息页面,选择好友聊天。2、互发消息聊天。3、连续发消息3天,就可以获得火花标识。在3天基础上,互发图片或视

小米云相册怎么恢复到本地?小米云相册APP中是可以恢复到本地,但是多数的小伙伴不知道小米云相册如何恢复到本地中,接下来就是小编为用户带来的小米云相册恢复到本地方法图文教程,感兴趣的用户快来一起看看吧!小米云相册怎么恢复到本地1、首先打开小米手机中的设置功能,主界面选择【个人头像】;2、然后进入到小米账号的界面,点击【云服务】功能;3、接着跳转到小米云服务的功能,选择其中的【云备份】;4、最后在如下图所示的界面,点击【云相册】即可恢复相册到本地。

如果我们更换了自己的系统账户头像,但是不想要了,结果找不到win11怎么更改默认头像了,其实我们只要找到默认头像的文件夹就可以恢复了。win11头像恢复默认1、首先点开底部任务栏的“Windows徽标”2、接着在其中找到并打开“设置”3、然后进入左边栏的“账户”4、随后点开右侧的“账户信息”5、打开后,点击选择照片中的“浏览文件”6、最后进入“C:\ProgramData\Microsoft\UserAccountPictures”路径就可以找到系统默认头像图片了。

Windows10的2019年5月更新具有新的、更亮的默认桌面背景。它看起来很棒-带有新的浅色主题。如果您使用Windows10的深色主题,您可能需要更深的背景。奇怪的是,Windows10的原始桌面背景已从最新版本的Windows10中删除。您必须从Web下载它或从旧的Windows10PC复制其文件。尽管我们无法在Microsoft的官方网站上找到此壁纸图片,但您可以从其他来源下载它。我们在Imgur上找到了一份4K分辨率的Windows10原始桌面壁纸的副本。此外,还有其他尺寸和更多默认壁

我们日常使用键盘的时候,总是会遇见各种的键盘问题,最很多更新了win10系统,更是如此,当键盘都变成了快捷键的时候怎么办呢?下面一起来看看具体的解决方法吧。win10键盘变成快捷键恢复方法1、可能是+开启了快捷键。2、关闭的办法有+(前后不能颠倒按)。3、还有就是+退到到锁屏界面登陆就好了。4、另一种可能性就是锁住键盘了,按下+进行尝试。5、如果不行的话,按下++,然后再取消就行了。以上就是本站问您带来的win10键盘变成快捷键恢复方法,希望可以解决掉您的困惑。想了解更多的问题请收藏本站哟。欢迎
