validate命令---rman进行备份和回复的验证
rman作为oracle备份与恢复工具,为我们提供了强大的功能,其中包括对数据文件的物理和逻辑检测以及备份文件的有效性检测。 首先,来看一下rman对数据文件的检测。我们知道,rman在备份数据时,会将数据读入读缓存,然会将数据从读缓存写入写缓存并最终写入数
rman作为oracle备份与恢复工具,为我们提供了强大的功能,其中包括对数据文件的物理和逻辑检测以及备份文件的有效性检测。
首先,来看一下rman对数据文件的检测。我们知道,rman在备份数据时,会将数据读入读缓存,然会将数据从读缓存写入写缓存并最终写入数据库。在从读缓存到写缓存的过程中,rman会进行物理一致性的检测(db_block_checksum未true)和逻辑一致性检测(使用了check logical选项)。例如:
SQL> show parameter db_block NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_block_buffers integer 0 db_block_checking string FALSE db_block_checksum string TRUE db_block_size integer 8192 SQL>
RMAN> backup tablespace test1; Starting backup at 2014-11-06 15:12:49 using channel ORA_DISK_1 channel ORA_DISK_1: starting full datafile backupset channel ORA_DISK_1: specifying datafile(s) in backupset input datafile fno=00005 name=/home/app/oraten/oradata/oraten/test01.dbf channel ORA_DISK_1: starting piece 1 at 2014-11-06 15:12:50 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03009: failure of backup command on ORA_DISK_1 channel at 11/06/2014 15:12:51 ORA-19566: exceeded limit of 0 corrupt blocks for file /home/app/oraten/oradata/oraten/test01.dbf
有时,我们仅仅希望验证一下数据文件是否可以备份,而不想进行真正的备份,这是我们就可以使用validate命令了,如
RMAN> backup validate database; Starting backup at 2014-11-06 15:14:23 using channel ORA_DISK_1 channel ORA_DISK_1: starting full datafile backupset channel ORA_DISK_1: specifying datafile(s) in backupset input datafile fno=00001 name=/home/app/oraten/oradata/oraten/system01.dbf input datafile fno=00003 name=/home/app/oraten/oradata/oraten/sysaux01.dbf input datafile fno=00002 name=/home/app/oraten/oradata/oraten/undotbs01.dbf input datafile fno=00005 name=/home/app/oraten/oradata/oraten/test01.dbf input datafile fno=00004 name=/home/app/oraten/oradata/oraten/users01.dbf channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01 channel ORA_DISK_1: starting full datafile backupset channel ORA_DISK_1: specifying datafile(s) in backupset including current control file in backupset including current SPFILE in backupset channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03 Finished backup at 2014-11-06 15:14:27
下面是官方文档中的描述:
VALIDATE Causes RMAN to scan the specified files and verify their contents, testing whether this file can be backed up. RMAN creates no output files. Use this
command periodically to check for physical and logical errors in database files.
使用validate命令可以验证备份集的有效性,官方文档:
To examine a backup set and report whether it can be restored. RMAN scans all of the backup pieces in the specified backup sets and looks at the checksums to verify that
the contents are intact so that the backup can be successfully restored if necessary. Use this command when you suspect that one or more backup pieces in a backup set
are missing or have been damaged. Use VALIDATE BACKUPSET to specify which backups to test; use the VALIDATE option of the RESTORE command to let RMAN
choose which backups to validate. For validating image copies, run RESTORE VALIDATE FROM DATAFILECOPY
示例:
RMAN> run { 2> set maxcorrupt for datafile 5 to 2; 3> backup database;}
RMAN> validate backupset 84; using channel ORA_DISK_1 channel ORA_DISK_1: starting validation of datafile backupset channel ORA_DISK_1: reading from backup piece /home/app/oraten/flash_recovery_area/ORATEN/backupset/2014_11_06/o1_mf_nnndf_TAG20141106T152820_b5p8ro7v_.bkp channel ORA_DISK_1: restored backup piece 1 piece handle=/home/app/oraten/flash_recovery_area/ORATEN/backupset/2014_11_06/o1_mf_nnndf_TAG20141106T152820_b5p8ro7v_.bkp tag=TAG20141106T152820 channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
RESTORE ... PREVIEW
该命令进行restore命令的预演,可以在任何resotre命令后加上preview来进行还原预演,这个命令只是从数据字典读出需要的备份的元数据,不进行文件的验证。
You can apply RESTORE ... PREVIEW to any RESTORE operation to create a detailed list of every backup to be used in the requested RESTORE operation, as well as the necessary target SCN for recovery after the RESTORE operation is complete. This command accesses the RMAN repository to query the backup metadata, but does not actually read the backup files to ensure that they can be restored.
RMAN> restore database preview; Starting restore at 2014-11-06 15:44:28 using channel ORA_DISK_1 List of Backup Sets =================== BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ ------------------- 84 Full 551.76M DISK 00:00:18 2014-11-06 15:28:24 BP Key: 52 Status: AVAILABLE Compressed: NO Tag: TAG20141106T152820 Piece Name: /home/app/oraten/flash_recovery_area/ORATEN/backupset/2014_11_06/o1_mf_nnndf_TAG20141106T152820_b5p8ro7v_.bkp List of Datafiles in backup set 84 File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- ------------------- ---- 1 Full 922948 2014-11-06 15:28:20 /home/app/oraten/oradata/oraten/system01.dbf 2 Full 922948 2014-11-06 15:28:20 /home/app/oraten/oradata/oraten/undotbs01.dbf 3 Full 922948 2014-11-06 15:28:20 /home/app/oraten/oradata/oraten/sysaux01.dbf 4 Full 922948 2014-11-06 15:28:20 /home/app/oraten/oradata/oraten/users01.dbf 5 Full 922948 2014-11-06 15:28:20 /home/app/oraten/oradata/oraten/test01.dbf archive logs generated after SCN 922948 not found in repository Media recovery start SCN is 922948 Recovery must be done beyond SCN 922948 to clear data files fuzziness Finished restore at 2014-11-06 15:44:28
A simulated recovery initiated with the RECOVER ... TEST command in RMAN or SQL*Plus. A trial recovery applies redo in a way similar to normal media recovery, but it never writes its changes to disk and it always rolls back its changes. Trial recovery occurs only in memory.
Trial recovery lets you foresee what problems might occur if you were to continue with normal recovery. For problems caused by ongoing memory corruption, trial recovery and normal recovery can encounter different errors.

热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)

热门话题

Windows恢复环境(WinRE)是用于修复Windows操作系统错误的环境。进入WinRE后,您可以执行系统还原、出厂重置、卸载更新等操作。如果无法引导到WinRE,本文将指导您使用修复程序解决此问题。无法引导到Windows恢复环境如果无法引导至Windows恢复环境,请使用下面提供的修复程序:检查Windows恢复环境的状态使用其他方法进入Windows恢复环境您是否意外删除了Windows恢复分区?执行Windows的就地升级或全新安装下面,我们已经详细解释了所有这些修复。1]检查Wi

DDREASE是一种用于从文件或块设备(如硬盘、SSD、RAM磁盘、CD、DVD和USB存储设备)恢复数据的工具。它将数据从一个块设备复制到另一个块设备,留下损坏的数据块,只移动好的数据块。ddreasue是一种强大的恢复工具,完全自动化,因为它在恢复操作期间不需要任何干扰。此外,由于有了ddasue地图文件,它可以随时停止和恢复。DDREASE的其他主要功能如下:它不会覆盖恢复的数据,但会在迭代恢复的情况下填补空白。但是,如果指示工具显式执行此操作,则可以将其截断。将数据从多个文件或块恢复到单

通过sudo命令,用户可以在提升权限模式下运行命令,而无需切换到超级用户模式。本文将介绍如何在Windows系统中模拟类似于sudo命令的功能。什么是数道司令部?Sudo(“超级用户do”的缩写)是一种命令行工具,允许基于Unix的操作系统(如Linux和MacOS)的用户以提升的权限执行命令,这些权限通常是管理员所拥有的。在Windows11/10中运行SUDO命令然而,随着最新发布的Windows11Insider预览版推出,Windows用户现在也可以体验到这一项功能。这一新功能使用户能够

如果您希望在Windows11的文件资源管理器中隐藏“开始备份”选项,以下是您可以采取的方法。有多种途径可用于在文件资源管理器中禁用或隐藏启动备份选项,我们将简要列出一些方法,帮助您快速完成这项任务。在开始之前,您需要了解这个选项与OneDrive密切相关。一旦您打开某个库文件夹(比如Document、Pictures、Music等),它会立即显示在文件资源管理器的路径中。如何在Windows11的文件资源管理器中删除启动备份要在Windows11的文件资源管理器中删除启动备份,请按照以下方法操

本文将向读者介绍在Win11系统中如何使用命令提示符(CommandPrompt)来查找网络适配器的物理地址(MAC地址)。MAC地址是网络接口卡(NIC)的唯一标识符,它在网络通信中扮演着重要角色。通过命令提示符,用户可以轻松地获取到当前计算机上所有网络适配器的MAC地址信息,这对于网络故障排查、配置网络设置等任务非常有帮助。方法一:使用「命令提示符」1、按【Win+X】组合键,或【右键】点击任务栏上的【Windows徽标】,在打开的菜单项中,选择【运行】;2、运行窗口,输入【cmd】命令,然

在PHP中备份和还原MySQL数据库可通过以下步骤实现:备份数据库:使用mysqldump命令转储数据库为SQL文件。还原数据库:使用mysql命令从SQL文件还原数据库。

Win11系统中,可以通过命令来启用或禁用Hyper-V增强会话模式。本文将介绍如何使用命令来进行操作,帮助用户更好地管理和控制系统中的Hyper-V功能。Hyper-V是Microsoft提供的一种虚拟化技术,它内置在WindowsServer和Windows10、11(家庭版除外)中,允许用户在Windows系统中运行虚拟操作系统。虽然虚拟机与宿主机操作系统相隔离,但通过设置,它们依然能够使用宿主机的资源,如声卡和存储设备等。其中一个关键设置就是启用「增强会话模式」。增强会话模式是Hyper

一、概述sar命令通过从系统活动中收集的数据来展示系统的使用情况报告。这些报告由不同部分组成,每个部分都包含数据类型和收集数据的时间。sar命令的默认模式显示访问CPU的各种资源(如用户、系统、I/O调度等)在不同时间增量下的CPU使用率。此外,它还显示给定时间段内空闲CPU的百分比。报告底部列出了每个数据点的平均值。sar默认每10分钟报告一次收集的数据,但您可以使用各种选项来筛选和调整这些报告。与uptime命令类似,sar命令也可帮助您监测CPU的负载情况。通过sar,您可以了解过度负载发
