TR-4990:《使用ANF上的增量合并快速恢复Oracle VLDB》
NetApp公司Allen Cao、Niyaz Mohamed
本解决方案提供了有关快速恢复在Azure NetApp Files容量池上使用NFS挂载部署到Azure VM计算实例的Oracle VLDB的概述和详细信息、以暂存备用数据库副本、该副本将通过RMAN不断进行增量合并。
目的
使用Oracle Recovery Manager (RMAN)备份工具在Oracle中恢复超大型数据库(VLDB)可能是一项极具挑战性的任务。发生故障时从备份介质还原数据库的过程可能会非常耗时、从而会延迟数据库恢复、并可能显著影响服务级别协议(Service Level Agreement、SLA)。但是、从10g开始、Oracle引入了RMAN功能、允许用户在DB服务器主机上的其他磁盘存储上创建Oracle数据库数据文件的暂存映像副本。这些映像副本可以每天使用RMAN进行增量更新。如果发生故障、数据库管理员(Database Administrator、DBA)可以快速将Oracle数据库从故障介质切换到映像副本、而无需进行完整的数据库介质恢复。结果是SLA得到了大幅改进、尽管成本是所需数据库存储的两倍。
如果您对VLDB的SLA非常感兴趣、并考虑将Oracle数据库迁移到Azure等公共云、则可以使用Microsoft Azure NetApp Files (ANF)等资源设置类似的数据库保护结构、以便暂存备用数据库映像副本。在本文档中、我们将演示如何从ANF容量池配置和导出NFS文件系统、以便挂载到Oracle数据库服务器上、暂存备用数据库副本、以便在主存储发生故障时快速恢复。
此解决方案 可解决以下使用情形:
-
Oracle VLDB映像副本通过RMAN在Microsoft ANF容量池存储以外的NFS挂载点上进行增量合并。
-
在同一Azure数据库服务器VM发生故障时快速恢复Oracle VLDB。
-
在备用Azure数据库服务器VM发生故障时快速恢复Oracle VLDB。
audience
此解决方案 适用于以下人员:
-
在Azure中通过RMAN设置Oracle VLDB映像副本增量合并以加快数据库恢复的数据库提供商。
-
在Azure公共云中测试Oracle工作负载的数据库解决方案架构师。
-
负责管理部署到ANF容量池存储的Oracle数据库的存储管理员。
-
希望在Azure云环境中设置Oracle数据库的应用程序所有者。
解决方案 测试和验证环境
此解决方案的测试和验证是在Microsoft ANF容量池存储和Azure VM计算环境中执行的、这些环境可能与最终部署环境不匹配。有关详细信息,请参见一节 部署注意事项的关键因素。
架构
硬件和软件组件
* 硬件 * |
||
ANF存储 |
Microsoft提供的当前版本 |
具有高级服务级别的2 TiB ANF容量池存储 |
适用于数据库服务器的Azure VM |
standard_B4ms—4个vCPU、16 GiB |
2个VM、一个用作主数据库服务器、另一个用作备用 |
软件 |
||
RedHat Linux |
RHEL Linux 8.6 (LVM)- x64 Gen2 |
已部署RedHat订阅以进行测试 |
Oracle 数据库 |
版本19.18 |
已应用RU修补程序p34765931_190000_Linux-x86-64.zip |
Oracle OPatch |
版本12.2.0.1.36 |
最新修补程序p6880880_190000_Linux-x86-64.zip |
NFS |
版本 3.0 |
已启用Oracle DNFS |
部署注意事项的关键因素
-
*用于RMAN增量合并的Oracle VLDB存储布局。*在我们的测试和验证中、用于Oracle增量备份和合并的NFS卷是从一个ANF容量池中分配的、该容量池每个卷具有100 TiB的容量限制、总容量限制为1000 TiB。对于超过阈值的部署、可以将多个卷和ANF容量池与多个NFS挂载点并行连接、以提供更高的容量。
-
使用RMAN增量合并的Oracle可恢复性。 RMAN增量备份和合并通常根据RTO和RPO目标以用户定义的频率执行。如果主数据存储和/或归档日志完全丢失、则可能会发生数据丢失。Oracle数据库可以恢复到ANF数据库备份映像副本提供的最后一次增量备份。为了最大限度地减少数据丢失、可以在ANF NFS挂载点上设置Oracle闪存恢复区域、并将归档日志与数据库映像副本一起备份到ANF NFS挂载。
-
*在ANF NFS文件系统之外运行Oracle VLDB。*与用于数据库备份的其他批量存储不同、Microsoft ANF是支持云的生产级存储、可提供高级别的性能和存储效率。Oracle VLDB从主存储切换到ANF NFS文件系统上的映像副本后、可以在解决主存储故障的同时保持较高的数据库性能。您可以放心地知道、主存储故障不会影响用户应用程序体验。
-
* Azure计算实例。*在这些测试和验证中、我们使用Standard"标准B4ms Azure VM作为Oracle数据库服务器。还有其他Azure VM可能已经过优化、更适合数据库工作负载。此外、您还需要根据实际工作负载要求、根据vCPU数量和RAM量相应地调整Azure VM的大小。
-
* ANF容量池服务级别。* ANF容量池提供三种服务级别:标准、高级、超级。默认情况下、自动QoS会对容量池中创建的卷执行适用场景操作、从而限制卷上的吞吐量。可以根据容量池大小和服务级别手动调整卷上的吞吐量。
-
DNFS配置。 DNFS内置在Oracle内核中、众所周知、在将Oracle部署到NFS存储时、它可以显著提高Oracle数据库性能。DNFS打包到Oracle二进制文件中、但默认情况下不启用。对于NFS上的任何Oracle数据库部署、都应启用此功能。对于VLDB的多个ANF容量池部署、应正确配置指向不同ANF容量池存储的DNFS多路径。
解决方案 部署
我们假定您已将Oracle VLDB部署在VNet中的Azure云环境中。如果您需要有关在Azure中部署Oracle的帮助、请参阅以下技术报告以获取帮助。
Oracle VLDB可以运行在ANF存储上、也可以运行在Azure云生态系统中的任何其他可选存储上。下一节介绍了为Oracle VLDB的映像副本设置RMAN增量合并的分步部署过程、该副本暂存在ANF存储的NFS挂载中。
部署的前提条件
Details
部署需要满足以下前提条件。
-
已设置Azure帐户、并且已在Azure帐户中创建必要的Azure vNet和网段。
-
从Azure门户控制台中、您必须部署两个Azure VM实例、一个用作主Oracle数据库服务器、另一个用作可选备用数据库服务器。有关环境设置的详细信息、请参见上一节中的架构图。另请查看 "Azure虚拟机系列" 有关详细信息 …
-
从Azure门户控制台中、部署ANF存储以托管用于存储Oracle数据库备用映像副本的NFS卷。如果您不熟悉ANF的部署、请参见文档 "快速入门:设置 Azure NetApp Files 并创建 NFS 卷" 了解分步说明。
确保您已在Azure VM根卷中至少分配128 G、以便有足够的空间来暂存Oracle安装文件。 |
配置和导出要挂载到Oracle主VLDB服务器上的NFS卷
Details
在本节中、我们将介绍通过Azure门户控制台从ANF容量池配置NFS卷。如果设置了多个ANF容量池来容纳数据库的大小、请对其他ANF容量池重复上述过程。
-
首先、从Azure门户控制台导航到用于暂存Oracle VLDB映像副本的ANF容量池。
-
从选定容量池-
database`下、单击 `Volumes
然后、Add volume
以启动添加卷工作流。 -
填写
Volume name
,Quota
,Virtual network
,和Delegated subnet
移动到Protocol
页面。 -
记下文件路径、输入允许的客户端CIDR范围、然后启用
Root Access
卷。 -
根据需要添加卷标记。
-
查看并创建卷。
-
以具有sudo权限的用户身份登录到主Oracle VLDB服务器、然后挂载从ANF存储导出的NFS卷。根据需要更改ANF NFS服务器IP地址和文件路径。可以从ANF卷控制台页面检索ANF NFS服务器IP地址。
sudo mkdir /nfsanf
sudo mount 172.30.136.68:/ora-01-u02-copy /nfsanf -o rw,bg,hard,vers=3,proto=tcp,timeo=600,rsize=262144,wsize=262144,nointr
-
将挂载点所有权更改为oracle:oisntall、根据需要更改为Oracle用户名和主组。
sudo chown oracle:oinstall /nfsanf
将Oracle RMAN增量合并设置为ANF上的映像副本
Details
RMAN增量合并会在每个增量备份/合并间隔持续更新暂存数据库数据文件映像副本。数据库备份的映像副本将与您执行增量备份/合并的频率相同。因此、在确定RMAN增量备份和合并的频率时、应考虑数据库性能、RTO和RPO目标。
-
以Oracle用户身份登录到主Oracle VLDB服务器。
-
在挂载点/nfsanf下创建oracopy目录、用于存储Oracle闪存恢复区域的Oracle数据文件映像副本和归档日志目录。
mkdir /nfsanf/oracopy
mkdir /nfsanf/archlog
-
通过sqlplus登录到Oracle数据库、启用块更改跟踪以加快增量备份、如果Oracle闪存恢复区域当前位于主存储上、则将其更改为ANF NFS挂载。这样可以将RMAN默认控制文件/spfile自动备份和归档日志备份到ANF NFS挂载以进行恢复。
sqlplus / as sysdba
从sqlplus提示符处、执行以下命令。
alter database enable block change tracking using file '/nfsanf/oracopy/bct_ntap1.ctf'
alter system set db_recovery_file_dest='/nfsanf/archlog/' scope=both;
预期输出:
[oracle@ora-01 ~]$ sqlplus / as sysdba SQL*Plus: Release 19.0.0.0.0 - Production on Wed Mar 20 16:44:21 2024 Version 19.18.0.0.0 Copyright (c) 1982, 2022, Oracle. All rights reserved. Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.18.0.0.0 SQL> alter database enable block change tracking using file '/nfsanf/oracopy/bct_ntap1.ctf'; Database altered. SQL> alter system set db_recovery_file_dest='/nfsanf/archlog/' scope=both; System altered. SQL>
-
创建RMAN备份和增量合并脚本。该脚本会为并行RMAN备份和合并分配多个通道。首次执行将生成初始完整基线映像副本。在完整运行中、它会首先清除保留窗口之外的过时备份、以保持暂存区域干净。然后、它会在合并和备份之前切换当前日志文件。增量备份会在合并后进行、以便数据库映像副本会在当前数据库状态后经过一个备份/合并周期。可以反转合并和备份顺序、以便根据用户的偏好加快恢复速度。RMAN脚本可以集成到一个简单的shell脚本中、以便从主数据库服务器上的crontab执行。确保在RMAN设置中打开控制文件自动备份。
vi /home/oracle/rman_bkup_merge.cmd Add following lines: RUN { allocate channel c1 device type disk format '/nfsanf/oracopy/%U'; allocate channel c2 device type disk format '/nfsanf/oracopy/%U'; allocate channel c3 device type disk format '/nfsanf/oracopy/%U'; allocate channel c4 device type disk format '/nfsanf/oracopy/%U'; delete obsolete; sql 'alter system archive log current'; recover copy of database with tag 'OraCopyBKUPonANF_level_0'; backup incremental level 1 copies=1 for recover of copy with tag 'OraCopyBKUPonANF_level_0' database; }
-
在主Oracle VLDB服务器上、以Oracle用户身份本地登录到RMAN、无论是否具有RMAN目录。在此演示中、我们不会连接到RMAN目录。
rman target / nocatalog; output: [oracle@ora-01 ~]$ rman target / nocatalog Recovery Manager: Release 19.0.0.0.0 - Production on Wed Mar 20 16:54:24 2024 Version 19.18.0.0.0 Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved. connected to target database: NTAP1 (DBID=2441823937) using target database control file instead of recovery catalog
-
从RMAN提示符处、执行该脚本。首次执行时创建基线数据库映像副本、后续执行时合并并增量更新基线映像副本。下面介绍了如何执行该脚本以及典型输出。设置通道数、使其与主机上的CPU核匹配。
RMAN> @/home/oracle/rman_bkup_merge.cmd RMAN> RUN 2> { 3> allocate channel c1 device type disk format '/nfsanf/oracopy/%U'; 4> allocate channel c2 device type disk format '/nfsanf/oracopy/%U'; 5> allocate channel c3 device type disk format '/nfsanf/oracopy/%U'; 6> allocate channel c4 device type disk format '/nfsanf/oracopy/%U'; 7> delete obsolete; 8> sql 'alter system archive log current'; 9> recover copy of database with tag 'OraCopyBKUPonANF_level_0'; 10> backup incremental level 1 copies=1 for recover of copy with tag 'OraCopyBKUPonANF_level_0' database; 11> } allocated channel: c1 channel c1: SID=142 device type=DISK allocated channel: c2 channel c2: SID=277 device type=DISK allocated channel: c3 channel c3: SID=414 device type=DISK allocated channel: c4 channel c4: SID=28 device type=DISK RMAN retention policy will be applied to the command RMAN retention policy is set to redundancy 1 Deleting the following obsolete backups and copies: Type Key Completion Time Filename/Handle -------------------- ------ ------------------ -------------------- Backup Set 1 18-MAR-24 Backup Piece 1 18-MAR-24 /u03/orareco/NTAP1/autobackup/2024_03_18/o1_mf_s_1163958359__04h19dgr_.bkp Backup Set 2 18-MAR-24 Backup Piece 2 18-MAR-24 /u03/orareco/NTAP1/autobackup/2024_03_18/o1_mf_s_1163961675__07l1m2lg_.bkp Backup Set 3 18-MAR-24 Backup Piece 3 18-MAR-24 /u03/orareco/NTAP1/autobackup/2024_03_18/o1_mf_s_1163962888__08p6y7lx_.bkp Backup Set 4 18-MAR-24 Backup Piece 4 18-MAR-24 /u03/orareco/NTAP1/autobackup/2024_03_18/o1_mf_s_1163963796__09k8g1m4_.bkp Backup Set 5 18-MAR-24 Backup Piece 5 18-MAR-24 /u03/orareco/NTAP1/autobackup/2024_03_18/o1_mf_s_1163964697__0bd3tqg3_.bkp Backup Set 6 18-MAR-24 Backup Piece 6 18-MAR-24 /u03/orareco/NTAP1/autobackup/2024_03_18/o1_mf_s_1163965895__0chx6mzt_.bkp Backup Set 7 18-MAR-24 Backup Piece 7 18-MAR-24 /u03/orareco/NTAP1/autobackup/2024_03_18/o1_mf_s_1163966806__0dbyx344_.bkp Backup Set 8 18-MAR-24 Backup Piece 8 18-MAR-24 /u03/orareco/NTAP1/autobackup/2024_03_18/o1_mf_s_1163968012__0fgvg805_.bkp Backup Set 9 18-MAR-24 Backup Piece 9 18-MAR-24 /u03/orareco/NTAP1/autobackup/2024_03_18/o1_mf_s_1163968919__0g9x5t1v_.bkp Backup Set 10 18-MAR-24 Backup Piece 10 18-MAR-24 /u03/orareco/NTAP1/autobackup/2024_03_18/o1_mf_s_1163969821__0h4rfdzj_.bkp Backup Set 11 18-MAR-24 Backup Piece 11 18-MAR-24 /u03/orareco/NTAP1/autobackup/2024_03_18/o1_mf_s_1163971026__0j8o4wk8_.bkp Backup Set 12 18-MAR-24 Backup Piece 12 18-MAR-24 /u03/orareco/NTAP1/autobackup/2024_03_18/o1_mf_s_1163971931__0k3pnn2o_.bkp Backup Set 13 18-MAR-24 Backup Piece 13 18-MAR-24 /u03/orareco/NTAP1/autobackup/2024_03_18/o1_mf_s_1163972835__0kyg92t1_.bkp deleted backup piece backup piece handle=/u03/orareco/NTAP1/autobackup/2024_03_18/o1_mf_s_1163963796__09k8g1m4_.bkp RECID=4 STAMP=1163963804 deleted backup piece backup piece handle=/u03/orareco/NTAP1/autobackup/2024_03_18/o1_mf_s_1163962888__08p6y7lx_.bkp RECID=3 STAMP=1163962897 deleted backup piece backup piece handle=/u03/orareco/NTAP1/autobackup/2024_03_18/o1_mf_s_1163961675__07l1m2lg_.bkp RECID=2 STAMP=1163961683 deleted backup piece backup piece handle=/u03/orareco/NTAP1/autobackup/2024_03_18/o1_mf_s_1163958359__04h19dgr_.bkp RECID=1 STAMP=1163958361 deleted backup piece backup piece handle=/u03/orareco/NTAP1/autobackup/2024_03_18/o1_mf_s_1163964697__0bd3tqg3_.bkp RECID=5 STAMP=1163964705 deleted backup piece backup piece handle=/u03/orareco/NTAP1/autobackup/2024_03_18/o1_mf_s_1163965895__0chx6mzt_.bkp RECID=6 STAMP=1163965906 deleted backup piece backup piece handle=/u03/orareco/NTAP1/autobackup/2024_03_18/o1_mf_s_1163966806__0dbyx344_.bkp RECID=7 STAMP=1163966814 deleted backup piece backup piece handle=/u03/orareco/NTAP1/autobackup/2024_03_18/o1_mf_s_1163968012__0fgvg805_.bkp RECID=8 STAMP=1163968018 deleted backup piece backup piece handle=/u03/orareco/NTAP1/autobackup/2024_03_18/o1_mf_s_1163968919__0g9x5t1v_.bkp RECID=9 STAMP=1163968926 deleted backup piece backup piece handle=/u03/orareco/NTAP1/autobackup/2024_03_18/o1_mf_s_1163969821__0h4rfdzj_.bkp RECID=10 STAMP=1163969827 Deleted 3 objects deleted backup piece backup piece handle=/u03/orareco/NTAP1/autobackup/2024_03_18/o1_mf_s_1163971026__0j8o4wk8_.bkp RECID=11 STAMP=1163971032 Deleted 3 objects deleted backup piece backup piece handle=/u03/orareco/NTAP1/autobackup/2024_03_18/o1_mf_s_1163971931__0k3pnn2o_.bkp RECID=12 STAMP=1163971938 Deleted 3 objects deleted backup piece backup piece handle=/u03/orareco/NTAP1/autobackup/2024_03_18/o1_mf_s_1163972835__0kyg92t1_.bkp RECID=13 STAMP=1163972837 Deleted 4 objects sql statement: alter system archive log current Starting recover at 20-MAR-24 no copy of datafile 1 found to recover no copy of datafile 3 found to recover no copy of datafile 4 found to recover . . no copy of datafile 31 found to recover no copy of datafile 32 found to recover Finished recover at 20-MAR-24 Starting backup at 20-MAR-24 no parent backup or copy of datafile 1 found no parent backup or copy of datafile 3 found no parent backup or copy of datafile 4 found . . no parent backup or copy of datafile 19 found no parent backup or copy of datafile 20 found channel c1: starting datafile copy input datafile file number=00021 name=/u02/oradata/NTAP1/NTAP1_pdb1/soe_01.dbf channel c2: starting datafile copy input datafile file number=00022 name=/u02/oradata/NTAP1/NTAP1_pdb1/soe_02.dbf channel c3: starting datafile copy input datafile file number=00023 name=/u02/oradata/NTAP1/NTAP1_pdb1/soe_03.dbf channel c4: starting datafile copy input datafile file number=00024 name=/u02/oradata/NTAP1/NTAP1_pdb1/soe_04.dbf output file name=/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-22_0g2m6brl tag=ORACOPYBKUPONANF_LEVEL_0 RECID=4 STAMP=1164132108 channel c2: datafile copy complete, elapsed time: 01:06:39 channel c2: starting datafile copy input datafile file number=00025 name=/u02/oradata/NTAP1/NTAP1_pdb1/soe_05.dbf output file name=/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-24_0i2m6brl tag=ORACOPYBKUPONANF_LEVEL_0 RECID=5 STAMP=1164132121 channel c4: datafile copy complete, elapsed time: 01:06:45 channel c4: starting datafile copy input datafile file number=00026 name=/u02/oradata/NTAP1/NTAP1_pdb1/soe_06.dbf output file name=/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-23_0h2m6brl tag=ORACOPYBKUPONANF_LEVEL_0 RECID=6 STAMP=1164132198 channel c3: datafile copy complete, elapsed time: 01:08:05 channel c3: starting datafile copy input datafile file number=00027 name=/u02/oradata/NTAP1/NTAP1_pdb1/soe_07.dbf output file name=/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-21_0f2m6brl tag=ORACOPYBKUPONANF_LEVEL_0 RECID=7 STAMP=1164132248 channel c1: datafile copy complete, elapsed time: 01:08:57 channel c1: starting datafile copy input datafile file number=00028 name=/u02/oradata/NTAP1/NTAP1_pdb1/soe_08.dbf output file name=/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-25_0j2m6fol tag=ORACOPYBKUPONANF_LEVEL_0 RECID=9 STAMP=1164136123 channel c2: datafile copy complete, elapsed time: 01:06:46 channel c2: starting datafile copy input datafile file number=00029 name=/u02/oradata/NTAP1/NTAP1_pdb1/soe_09.dbf output file name=/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-26_0k2m6fot tag=ORACOPYBKUPONANF_LEVEL_0 RECID=8 STAMP=1164136113 channel c4: datafile copy complete, elapsed time: 01:06:36 channel c4: starting datafile copy input datafile file number=00030 name=/u02/oradata/NTAP1/NTAP1_pdb1/soe_10.dbf output file name=/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-27_0l2m6frc tag=ORACOPYBKUPONANF_LEVEL_0 RECID=10 STAMP=1164136293 channel c3: datafile copy complete, elapsed time: 01:08:10 channel c3: starting datafile copy input datafile file number=00031 name=/u02/oradata/NTAP1/NTAP1_pdb1/soe_11.dbf output file name=/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-28_0m2m6fsu tag=ORACOPYBKUPONANF_LEVEL_0 RECID=11 STAMP=1164136333 channel c1: datafile copy complete, elapsed time: 01:07:52 channel c1: starting datafile copy input datafile file number=00032 name=/u02/oradata/NTAP1/NTAP1_pdb1/soe_12.dbf output file name=/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-29_0n2m6jlr tag=ORACOPYBKUPONANF_LEVEL_0 RECID=12 STAMP=1164140082 channel c2: datafile copy complete, elapsed time: 01:06:01 channel c2: starting datafile copy input datafile file number=00001 name=/u02/oradata/NTAP1/system01.dbf output file name=/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-30_0o2m6jlr tag=ORACOPYBKUPONANF_LEVEL_0 RECID=13 STAMP=1164140190 channel c4: datafile copy complete, elapsed time: 01:07:49 channel c4: starting datafile copy input datafile file number=00003 name=/u02/oradata/NTAP1/sysaux01.dbf output file name=/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-1_0r2m6nhk tag=ORACOPYBKUPONANF_LEVEL_0 RECID=14 STAMP=1164140240 channel c2: datafile copy complete, elapsed time: 00:02:38 channel c2: starting datafile copy input datafile file number=00004 name=/u02/oradata/NTAP1/undotbs01.dbf output file name=/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-4_0t2m6nml tag=ORACOPYBKUPONANF_LEVEL_0 RECID=15 STAMP=1164140372 channel c2: datafile copy complete, elapsed time: 00:02:15 channel c2: starting datafile copy input datafile file number=00011 name=/u02/oradata/NTAP1/NTAP1_pdb1/undotbs01.dbf output file name=/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-3_0s2m6nl1 tag=ORACOPYBKUPONANF_LEVEL_0 RECID=16 STAMP=1164140377 channel c4: datafile copy complete, elapsed time: 00:03:01 channel c4: starting datafile copy input datafile file number=00010 name=/u02/oradata/NTAP1/NTAP1_pdb1/sysaux01.dbf output file name=/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-32_0q2m6jsi tag=ORACOPYBKUPONANF_LEVEL_0 RECID=17 STAMP=1164140385 channel c1: datafile copy complete, elapsed time: 01:07:29 channel c1: starting datafile copy input datafile file number=00014 name=/u02/oradata/NTAP1/NTAP1_pdb2/sysaux01.dbf output file name=/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-31_0p2m6jrb tag=ORACOPYBKUPONANF_LEVEL_0 RECID=18 STAMP=1164140406 channel c3: datafile copy complete, elapsed time: 01:08:31 channel c3: starting datafile copy input datafile file number=00018 name=/u02/oradata/NTAP1/NTAP1_pdb3/sysaux01.dbf output file name=/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-10_0v2m6nqs tag=ORACOPYBKUPONANF_LEVEL_0 RECID=19 STAMP=1164140459 channel c4: datafile copy complete, elapsed time: 00:01:26 channel c4: starting datafile copy input datafile file number=00006 name=/u02/oradata/NTAP1/pdbseed/sysaux01.dbf output file name=/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-14_102m6nr3 tag=ORACOPYBKUPONANF_LEVEL_0 RECID=20 STAMP=1164140468 channel c1: datafile copy complete, elapsed time: 00:01:22 channel c1: starting datafile copy input datafile file number=00009 name=/u02/oradata/NTAP1/NTAP1_pdb1/system01.dbf output file name=/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-11_0u2m6nqs tag=ORACOPYBKUPONANF_LEVEL_0 RECID=21 STAMP=1164140471 channel c2: datafile copy complete, elapsed time: 00:01:33 channel c2: starting datafile copy input datafile file number=00013 name=/u02/oradata/NTAP1/NTAP1_pdb2/system01.dbf output file name=/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-18_112m6nrt tag=ORACOPYBKUPONANF_LEVEL_0 RECID=22 STAMP=1164140476 channel c3: datafile copy complete, elapsed time: 00:00:57 channel c3: starting datafile copy input datafile file number=00017 name=/u02/oradata/NTAP1/NTAP1_pdb3/system01.dbf output file name=/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-6_122m6nti tag=ORACOPYBKUPONANF_LEVEL_0 RECID=23 STAMP=1164140488 channel c4: datafile copy complete, elapsed time: 00:00:25 channel c4: starting datafile copy input datafile file number=00005 name=/u02/oradata/NTAP1/pdbseed/system01.dbf output file name=/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-13_142m6ntp tag=ORACOPYBKUPONANF_LEVEL_0 RECID=24 STAMP=1164140532 channel c2: datafile copy complete, elapsed time: 00:01:06 channel c2: starting datafile copy input datafile file number=00008 name=/u02/oradata/NTAP1/pdbseed/undotbs01.dbf output file name=/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-17_152m6nts tag=ORACOPYBKUPONANF_LEVEL_0 RECID=25 STAMP=1164140539 channel c3: datafile copy complete, elapsed time: 00:01:03 channel c3: starting datafile copy input datafile file number=00015 name=/u02/oradata/NTAP1/NTAP1_pdb2/undotbs01.dbf output file name=/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-9_132m6ntm tag=ORACOPYBKUPONANF_LEVEL_0 RECID=26 STAMP=1164140541 channel c1: datafile copy complete, elapsed time: 00:01:13 channel c1: starting datafile copy input datafile file number=00019 name=/u02/oradata/NTAP1/NTAP1_pdb3/undotbs01.dbf output file name=/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-5_162m6nuc tag=ORACOPYBKUPONANF_LEVEL_0 RECID=27 STAMP=1164140541 channel c4: datafile copy complete, elapsed time: 00:00:41 channel c4: starting datafile copy input datafile file number=00007 name=/u02/oradata/NTAP1/users01.dbf output file name=/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-8_172m6nvr tag=ORACOPYBKUPONANF_LEVEL_0 RECID=28 STAMP=1164140552 channel c2: datafile copy complete, elapsed time: 00:00:16 channel c2: starting datafile copy input datafile file number=00012 name=/u02/oradata/NTAP1/NTAP1_pdb1/users01.dbf output file name=/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-15_182m6nvs tag=ORACOPYBKUPONANF_LEVEL_0 RECID=30 STAMP=1164140561 channel c3: datafile copy complete, elapsed time: 00:00:24 channel c3: starting datafile copy input datafile file number=00016 name=/u02/oradata/NTAP1/NTAP1_pdb2/users01.dbf output file name=/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-USERS_FNO-7_1a2m6o01 tag=ORACOPYBKUPONANF_LEVEL_0 RECID=29 STAMP=1164140560 channel c4: datafile copy complete, elapsed time: 00:00:16 channel c4: starting datafile copy input datafile file number=00020 name=/u02/oradata/NTAP1/NTAP1_pdb3/users01.dbf output file name=/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-19_192m6nvv tag=ORACOPYBKUPONANF_LEVEL_0 RECID=31 STAMP=1164140564 channel c1: datafile copy complete, elapsed time: 00:00:21 output file name=/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-USERS_FNO-12_1b2m6o0e tag=ORACOPYBKUPONANF_LEVEL_0 RECID=32 STAMP=1164140564 channel c2: datafile copy complete, elapsed time: 00:00:02 output file name=/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-USERS_FNO-16_1c2m6o0k tag=ORACOPYBKUPONANF_LEVEL_0 RECID=34 STAMP=1164140565 channel c3: datafile copy complete, elapsed time: 00:00:01 output file name=/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-USERS_FNO-20_1d2m6o0k tag=ORACOPYBKUPONANF_LEVEL_0 RECID=33 STAMP=1164140565 channel c4: datafile copy complete, elapsed time: 00:00:01 Finished backup at 20-MAR-24 Starting Control File and SPFILE Autobackup at 20-MAR-24 piece handle=/nfsanf/archlog/NTAP1/autobackup/2024_03_20/o1_mf_s_1164140565__5g56ypks_.bkp comment=NONE Finished Control File and SPFILE Autobackup at 20-MAR-24 released channel: c1 released channel: c2 released channel: c3 released channel: c4 RMAN> **end-of-file** RMAN>
-
在备份后列出数据库映像副本、以观察是否已在ANF NFS挂载点中创建数据库映像副本。
RMAN> list copy of database tag 'OraCopyBKUPonANF_level_0'; List of Datafile Copies ======================= Key File S Completion Time Ckp SCN Ckp Time Sparse ------- ---- - --------------- ---------- --------------- ------ 14 1 A 20-MAR-24 4161498 20-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-1_0r2m6nhk Tag: ORACOPYBKUPONANF_LEVEL_0 16 3 A 20-MAR-24 4161568 20-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-3_0s2m6nl1 Tag: ORACOPYBKUPONANF_LEVEL_0 15 4 A 20-MAR-24 4161589 20-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-4_0t2m6nml Tag: ORACOPYBKUPONANF_LEVEL_0 27 5 A 20-MAR-24 2379694 18-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-5_162m6nuc Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 2, PDB Name: PDB$SEED 23 6 A 20-MAR-24 2379694 18-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-6_122m6nti Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 2, PDB Name: PDB$SEED 29 7 A 20-MAR-24 4161872 20-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-USERS_FNO-7_1a2m6o01 Tag: ORACOPYBKUPONANF_LEVEL_0 28 8 A 20-MAR-24 2379694 18-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-8_172m6nvr Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 2, PDB Name: PDB$SEED 26 9 A 20-MAR-24 4161835 20-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-9_132m6ntm Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 3, PDB Name: NTAP1_PDB1 19 10 A 20-MAR-24 4161784 20-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-10_0v2m6nqs Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 3, PDB Name: NTAP1_PDB1 21 11 A 20-MAR-24 4161780 20-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-11_0u2m6nqs Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 3, PDB Name: NTAP1_PDB1 32 12 A 20-MAR-24 4161880 20-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-USERS_FNO-12_1b2m6o0e Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 3, PDB Name: NTAP1_PDB1 24 13 A 20-MAR-24 4161838 20-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-13_142m6ntp Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 4, PDB Name: NTAP1_PDB2 20 14 A 20-MAR-24 4161785 20-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-14_102m6nr3 Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 4, PDB Name: NTAP1_PDB2 30 15 A 20-MAR-24 4161863 20-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-15_182m6nvs Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 4, PDB Name: NTAP1_PDB2 34 16 A 20-MAR-24 4161884 20-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-USERS_FNO-16_1c2m6o0k Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 4, PDB Name: NTAP1_PDB2 25 17 A 20-MAR-24 4161841 20-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-17_152m6nts Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 5, PDB Name: NTAP1_PDB3 22 18 A 20-MAR-24 4161810 20-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-18_112m6nrt Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 5, PDB Name: NTAP1_PDB3 31 19 A 20-MAR-24 4161869 20-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-19_192m6nvv Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 5, PDB Name: NTAP1_PDB3 33 20 A 20-MAR-24 4161887 20-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-USERS_FNO-20_1d2m6o0k Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 5, PDB Name: NTAP1_PDB3 7 21 A 20-MAR-24 4152514 20-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-21_0f2m6brl Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 3, PDB Name: NTAP1_PDB1 4 22 A 20-MAR-24 4152518 20-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-22_0g2m6brl Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 3, PDB Name: NTAP1_PDB1 6 23 A 20-MAR-24 4152522 20-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-23_0h2m6brl Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 3, PDB Name: NTAP1_PDB1 5 24 A 20-MAR-24 4152529 20-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-24_0i2m6brl Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 3, PDB Name: NTAP1_PDB1 9 25 A 20-MAR-24 4156120 20-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-25_0j2m6fol Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 3, PDB Name: NTAP1_PDB1 8 26 A 20-MAR-24 4156130 20-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-26_0k2m6fot Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 3, PDB Name: NTAP1_PDB1 10 27 A 20-MAR-24 4156159 20-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-27_0l2m6frc Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 3, PDB Name: NTAP1_PDB1 11 28 A 20-MAR-24 4156183 20-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-28_0m2m6fsu Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 3, PDB Name: NTAP1_PDB1 12 29 A 20-MAR-24 4158795 20-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-29_0n2m6jlr Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 3, PDB Name: NTAP1_PDB1 13 30 A 20-MAR-24 4158803 20-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-30_0o2m6jlr Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 3, PDB Name: NTAP1_PDB1 18 31 A 20-MAR-24 4158871 20-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-31_0p2m6jrb Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 3, PDB Name: NTAP1_PDB1 17 32 A 20-MAR-24 4158886 20-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-32_0q2m6jsi Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 3, PDB Name: NTAP1_PDB1
-
通过Oracle RMAN命令提示符报告架构、以观察当前VLDB数据文件是否位于主存储上。
RMAN> report schema; Report of database schema for database with db_unique_name NTAP1 List of Permanent Datafiles =========================== File Size(MB) Tablespace RB segs Datafile Name ---- -------- -------------------- ------- ------------------------ 1 1060 SYSTEM YES /u02/oradata/NTAP1/system01.dbf 3 1000 SYSAUX NO /u02/oradata/NTAP1/sysaux01.dbf 4 695 UNDOTBS1 YES /u02/oradata/NTAP1/undotbs01.dbf 5 400 PDB$SEED:SYSTEM NO /u02/oradata/NTAP1/pdbseed/system01.dbf 6 440 PDB$SEED:SYSAUX NO /u02/oradata/NTAP1/pdbseed/sysaux01.dbf 7 5 USERS NO /u02/oradata/NTAP1/users01.dbf 8 235 PDB$SEED:UNDOTBS1 NO /u02/oradata/NTAP1/pdbseed/undotbs01.dbf 9 410 NTAP1_PDB1:SYSTEM YES /u02/oradata/NTAP1/NTAP1_pdb1/system01.dbf 10 520 NTAP1_PDB1:SYSAUX NO /u02/oradata/NTAP1/NTAP1_pdb1/sysaux01.dbf 11 580 NTAP1_PDB1:UNDOTBS1 YES /u02/oradata/NTAP1/NTAP1_pdb1/undotbs01.dbf 12 5 NTAP1_PDB1:USERS NO /u02/oradata/NTAP1/NTAP1_pdb1/users01.dbf 13 410 NTAP1_PDB2:SYSTEM YES /u02/oradata/NTAP1/NTAP1_pdb2/system01.dbf 14 500 NTAP1_PDB2:SYSAUX NO /u02/oradata/NTAP1/NTAP1_pdb2/sysaux01.dbf 15 235 NTAP1_PDB2:UNDOTBS1 YES /u02/oradata/NTAP1/NTAP1_pdb2/undotbs01.dbf 16 5 NTAP1_PDB2:USERS NO /u02/oradata/NTAP1/NTAP1_pdb2/users01.dbf 17 410 NTAP1_PDB3:SYSTEM YES /u02/oradata/NTAP1/NTAP1_pdb3/system01.dbf 18 500 NTAP1_PDB3:SYSAUX NO /u02/oradata/NTAP1/NTAP1_pdb3/sysaux01.dbf 19 235 NTAP1_PDB3:UNDOTBS1 YES /u02/oradata/NTAP1/NTAP1_pdb3/undotbs01.dbf 20 5 NTAP1_PDB3:USERS NO /u02/oradata/NTAP1/NTAP1_pdb3/users01.dbf 21 31744 NTAP1_PDB1:SOE NO /u02/oradata/NTAP1/NTAP1_pdb1/soe_01.dbf 22 31744 NTAP1_PDB1:SOE NO /u02/oradata/NTAP1/NTAP1_pdb1/soe_02.dbf 23 31744 NTAP1_PDB1:SOE NO /u02/oradata/NTAP1/NTAP1_pdb1/soe_03.dbf 24 31744 NTAP1_PDB1:SOE NO /u02/oradata/NTAP1/NTAP1_pdb1/soe_04.dbf 25 31744 NTAP1_PDB1:SOE NO /u02/oradata/NTAP1/NTAP1_pdb1/soe_05.dbf 26 31744 NTAP1_PDB1:SOE NO /u02/oradata/NTAP1/NTAP1_pdb1/soe_06.dbf 27 31744 NTAP1_PDB1:SOE NO /u02/oradata/NTAP1/NTAP1_pdb1/soe_07.dbf 28 31744 NTAP1_PDB1:SOE NO /u02/oradata/NTAP1/NTAP1_pdb1/soe_08.dbf 29 31744 NTAP1_PDB1:SOE NO /u02/oradata/NTAP1/NTAP1_pdb1/soe_09.dbf 30 31744 NTAP1_PDB1:SOE NO /u02/oradata/NTAP1/NTAP1_pdb1/soe_10.dbf 31 31744 NTAP1_PDB1:SOE NO /u02/oradata/NTAP1/NTAP1_pdb1/soe_11.dbf 32 31744 NTAP1_PDB1:SOE NO /u02/oradata/NTAP1/NTAP1_pdb1/soe_12.dbf List of Temporary Files ======================= File Size(MB) Tablespace Maxsize(MB) Tempfile Name ---- -------- -------------------- ----------- -------------------- 1 123 TEMP 32767 /u02/oradata/NTAP1/temp01.dbf 2 123 PDB$SEED:TEMP 32767 /u02/oradata/NTAP1/pdbseed/temp012024-03-18_16-07-32-463-PM.dbf 3 31744 NTAP1_PDB1:TEMP 32767 /u02/oradata/NTAP1/NTAP1_pdb1/temp01.dbf 4 123 NTAP1_PDB2:TEMP 32767 /u02/oradata/NTAP1/NTAP1_pdb2/temp01.dbf 5 123 NTAP1_PDB3:TEMP 32767 /u02/oradata/NTAP1/NTAP1_pdb3/temp01.dbf 6 31744 NTAP1_PDB1:TEMP 31744 /u02/oradata/NTAP1/NTAP1_pdb1/temp02.dbf RMAN>
-
验证从操作系统NFS挂载点复制的数据库映像。
[oracle@ora-01 ~]$ ls -l /nfsanf/oracopy total 399482176 -rw-r----- 1 oracle oinstall 11600384 Mar 20 21:44 bct_ntap1.ctf -rw-r----- 1 oracle oinstall 33286004736 Mar 20 18:03 data_D-NTAP1_I-2441823937_TS-SOE_FNO-21_0f2m6brl -rw-r----- 1 oracle oinstall 33286004736 Mar 20 18:01 data_D-NTAP1_I-2441823937_TS-SOE_FNO-22_0g2m6brl -rw-r----- 1 oracle oinstall 33286004736 Mar 20 18:03 data_D-NTAP1_I-2441823937_TS-SOE_FNO-23_0h2m6brl -rw-r----- 1 oracle oinstall 33286004736 Mar 20 18:02 data_D-NTAP1_I-2441823937_TS-SOE_FNO-24_0i2m6brl -rw-r----- 1 oracle oinstall 33286004736 Mar 20 19:08 data_D-NTAP1_I-2441823937_TS-SOE_FNO-25_0j2m6fol -rw-r----- 1 oracle oinstall 33286004736 Mar 20 19:08 data_D-NTAP1_I-2441823937_TS-SOE_FNO-26_0k2m6fot -rw-r----- 1 oracle oinstall 33286004736 Mar 20 19:11 data_D-NTAP1_I-2441823937_TS-SOE_FNO-27_0l2m6frc -rw-r----- 1 oracle oinstall 33286004736 Mar 20 19:12 data_D-NTAP1_I-2441823937_TS-SOE_FNO-28_0m2m6fsu -rw-r----- 1 oracle oinstall 33286004736 Mar 20 20:14 data_D-NTAP1_I-2441823937_TS-SOE_FNO-29_0n2m6jlr -rw-r----- 1 oracle oinstall 33286004736 Mar 20 20:16 data_D-NTAP1_I-2441823937_TS-SOE_FNO-30_0o2m6jlr -rw-r----- 1 oracle oinstall 33286004736 Mar 20 20:20 data_D-NTAP1_I-2441823937_TS-SOE_FNO-31_0p2m6jrb -rw-r----- 1 oracle oinstall 33286004736 Mar 20 20:19 data_D-NTAP1_I-2441823937_TS-SOE_FNO-32_0q2m6jsi -rw-r----- 1 oracle oinstall 545267712 Mar 20 20:20 data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-10_0v2m6nqs -rw-r----- 1 oracle oinstall 524296192 Mar 20 20:21 data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-14_102m6nr3 -rw-r----- 1 oracle oinstall 524296192 Mar 20 20:21 data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-18_112m6nrt -rw-r----- 1 oracle oinstall 1048584192 Mar 20 20:19 data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-3_0s2m6nl1 -rw-r----- 1 oracle oinstall 461381632 Mar 20 20:21 data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-6_122m6nti -rw-r----- 1 oracle oinstall 1111498752 Mar 20 20:17 data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-1_0r2m6nhk -rw-r----- 1 oracle oinstall 429924352 Mar 20 20:22 data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-13_142m6ntp -rw-r----- 1 oracle oinstall 429924352 Mar 20 20:22 data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-17_152m6nts -rw-r----- 1 oracle oinstall 419438592 Mar 20 20:22 data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-5_162m6nuc -rw-r----- 1 oracle oinstall 429924352 Mar 20 20:22 data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-9_132m6ntm -rw-r----- 1 oracle oinstall 608182272 Mar 20 20:21 data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-11_0u2m6nqs -rw-r----- 1 oracle oinstall 246423552 Mar 20 20:22 data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-15_182m6nvs -rw-r----- 1 oracle oinstall 246423552 Mar 20 20:22 data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-19_192m6nvv -rw-r----- 1 oracle oinstall 728768512 Mar 20 20:19 data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-4_0t2m6nml -rw-r----- 1 oracle oinstall 246423552 Mar 20 20:22 data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-8_172m6nvr -rw-r----- 1 oracle oinstall 5251072 Mar 20 20:22 data_D-NTAP1_I-2441823937_TS-USERS_FNO-12_1b2m6o0e -rw-r----- 1 oracle oinstall 5251072 Mar 20 20:22 data_D-NTAP1_I-2441823937_TS-USERS_FNO-16_1c2m6o0k -rw-r----- 1 oracle oinstall 5251072 Mar 20 20:22 data_D-NTAP1_I-2441823937_TS-USERS_FNO-20_1d2m6o0k -rw-r----- 1 oracle oinstall 5251072 Mar 20 20:22 data_D-NTAP1_I-2441823937_TS-USERS_FNO-7_1a2m6o01 [oracle@ora-01 ~]$
至此、Oracle VLDB备用映像副本备份和合并的设置完成。
将Oracle VLDB切换到映像副本、以便快速恢复
Details
如果因主存储问题描述发生故障(例如数据丢失或损坏)、则可以快速将数据库切换到ANF NFS挂载上的映像副本、并将其恢复到当前状态、而无需还原数据库。消除介质还原可显著加快VLDB的数据库恢复速度。此使用情形假定Oracle VLDB数据库服务器完好无损、并且数据库控制文件、归档日志和当前日志均可用于恢复。
-
在切换之前、以Oracle用户身份登录到Azure主VLDB服务器主机并创建测试表。
[oracle@ora-01 ~]$ sqlplus / as sysdba SQL*Plus: Release 19.0.0.0.0 - Production on Thu Mar 21 15:13:52 2024 Version 19.18.0.0.0 Copyright (c) 1982, 2022, Oracle. All rights reserved. Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.18.0.0.0 SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 NTAP1_PDB1 READ WRITE NO 4 NTAP1_PDB2 READ WRITE NO 5 NTAP1_PDB3 READ WRITE NO SQL> alter session set container=ntap1_pdb1; Session altered. SQL> create table test (id integer, dt timestamp, event varchar(100)); Table created. SQL> insert into test values(1, sysdate, 'test oracle incremental merge switch to copy'); 1 row created. SQL> commit; Commit complete. SQL> select * from test; ID ---------- DT --------------------------------------------------------------------------- EVENT -------------------------------------------------------------------------------- 1 21-MAR-24 03.15.03.000000 PM test oracle incremental merge switch to copy
-
通过关闭中止数据库、然后在挂载阶段启动Oracle来模拟故障。
SQL> shutdown abort; ORACLE instance shut down. SQL> startup mount; ORACLE instance started. Total System Global Area 6442449688 bytes Fixed Size 9177880 bytes Variable Size 1325400064 bytes Database Buffers 5100273664 bytes Redo Buffers 7598080 bytes Database mounted. SQL> exit
-
作为Oracle用户、通过RMAN连接到Oracle数据库、以切换要复制的数据库。
[oracle@ora-01 ~]$ rman target / nocatalog Recovery Manager: Release 19.0.0.0.0 - Production on Thu Mar 21 15:20:58 2024 Version 19.18.0.0.0 Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved. connected to target database: NTAP1 (DBID=2441823937, not open) using target database control file instead of recovery catalog RMAN> switch database to copy; datafile 1 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-1_0r2m6nhk" datafile 3 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-3_0s2m6nl1" datafile 4 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-4_0t2m6nml" datafile 5 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-5_162m6nuc" datafile 6 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-6_122m6nti" datafile 7 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-USERS_FNO-7_1a2m6o01" datafile 8 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-8_172m6nvr" datafile 9 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-9_132m6ntm" datafile 10 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-10_0v2m6nqs" datafile 11 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-11_0u2m6nqs" datafile 12 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-USERS_FNO-12_1b2m6o0e" datafile 13 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-13_142m6ntp" datafile 14 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-14_102m6nr3" datafile 15 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-15_182m6nvs" datafile 16 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-USERS_FNO-16_1c2m6o0k" datafile 17 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-17_152m6nts" datafile 18 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-18_112m6nrt" datafile 19 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-19_192m6nvv" datafile 20 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-USERS_FNO-20_1d2m6o0k" datafile 21 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-21_0f2m6brl" datafile 22 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-22_0g2m6brl" datafile 23 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-23_0h2m6brl" datafile 24 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-24_0i2m6brl" datafile 25 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-25_0j2m6fol" datafile 26 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-26_0k2m6fot" datafile 27 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-27_0l2m6frc" datafile 28 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-28_0m2m6fsu" datafile 29 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-29_0n2m6jlr" datafile 30 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-30_0o2m6jlr" datafile 31 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-31_0p2m6jrb" datafile 32 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-32_0q2m6jsi"
-
恢复并打开数据库、使其从上次增量备份恢复到最新状态。
RMAN> recover database; Starting recover at 21-MAR-24 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=392 device type=DISK channel ORA_DISK_1: starting incremental datafile backup set restore channel ORA_DISK_1: specifying datafile(s) to restore from backup set destination for restore of datafile 00009: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-9_0q1sd7cm destination for restore of datafile 00023: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-23_041sd6s5 destination for restore of datafile 00027: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-27_081sd70i destination for restore of datafile 00031: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-31_0c1sd74u destination for restore of datafile 00034: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-34_0f1sd788 channel ORA_DISK_1: reading from backup piece /nfsanf/oracopy/321sfous_98_1_1 channel ORA_DISK_1: piece handle=/nfsanf/oracopy/321sfous_98_1_1 tag=ORACOPYBKUPONANF_LEVEL_0 channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: restore complete, elapsed time: 00:00:01 channel ORA_DISK_1: starting incremental datafile backup set restore channel ORA_DISK_1: specifying datafile(s) to restore from backup set destination for restore of datafile 00010: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-10_0k1sd7bb destination for restore of datafile 00021: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-21_021sd6pv destination for restore of datafile 00025: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-25_061sd6uc . . . channel ORA_DISK_1: starting incremental datafile backup set restore channel ORA_DISK_1: specifying datafile(s) to restore from backup set destination for restore of datafile 00016: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-USERS_FNO-16_121sd7dn channel ORA_DISK_1: reading from backup piece /nfsanf/oracopy/3i1sfov0_114_1_1 channel ORA_DISK_1: piece handle=/nfsanf/oracopy/3i1sfov0_114_1_1 tag=ORACOPYBKUPONANF_LEVEL_0 channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: restore complete, elapsed time: 00:00:01 channel ORA_DISK_1: starting incremental datafile backup set restore channel ORA_DISK_1: specifying datafile(s) to restore from backup set destination for restore of datafile 00020: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-USERS_FNO-20_131sd7do channel ORA_DISK_1: reading from backup piece /nfsanf/oracopy/3j1sfov0_115_1_1 channel ORA_DISK_1: piece handle=/nfsanf/oracopy/3j1sfov0_115_1_1 tag=ORACOPYBKUPONANF_LEVEL_0 channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: restore complete, elapsed time: 00:00:01 starting media recovery media recovery complete, elapsed time: 00:00:01 Finished recover at 21-MAR-24 RMAN> alter database open; Statement processed RMAN>
-
在恢复后从sqlplus检查数据库结构、观察所有VLDB数据文件(控制、临时和当前日志文件除外)现在都已切换到ANF NFS文件系统上的副本。
SQL> select name from v$datafile 2 union 3 select name from v$tempfile 4 union 5 select name from v$controlfile 6 union 7* select member from v$logfile SQL> / NAME -------------------------------------------------------------------------------- /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-21_0f2m6brl /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-22_0g2m6brl /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-23_0h2m6brl /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-24_0i2m6brl /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-25_0j2m6fol /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-26_0k2m6fot /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-27_0l2m6frc /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-28_0m2m6fsu /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-29_0n2m6jlr /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-30_0o2m6jlr /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-31_0p2m6jrb NAME -------------------------------------------------------------------------------- /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-32_0q2m6jsi /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-10_0v2m6nqs /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-14_102m6nr3 /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-18_112m6nrt /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-3_0s2m6nl1 /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-6_122m6nti /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-13_142m6ntp /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-17_152m6nts /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-1_0r2m6nhk /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-5_162m6nuc /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-9_132m6ntm NAME -------------------------------------------------------------------------------- /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-11_0u2m6nqs /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-15_182m6nvs /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-19_192m6nvv /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-4_0t2m6nml /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-8_172m6nvr /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-USERS_FNO-12_1b2m6o0e /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-USERS_FNO-16_1c2m6o0k /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-USERS_FNO-20_1d2m6o0k /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-USERS_FNO-7_1a2m6o01 /u02/oradata/NTAP1/NTAP1_pdb1/temp01.dbf /u02/oradata/NTAP1/NTAP1_pdb1/temp02.dbf NAME -------------------------------------------------------------------------------- /u02/oradata/NTAP1/NTAP1_pdb2/temp01.dbf /u02/oradata/NTAP1/NTAP1_pdb3/temp01.dbf /u02/oradata/NTAP1/control01.ctl /u02/oradata/NTAP1/pdbseed/temp012024-03-18_16-07-32-463-PM.dbf /u02/oradata/NTAP1/temp01.dbf /u03/orareco/NTAP1/control02.ctl /u03/orareco/NTAP1/onlinelog/redo01.log /u03/orareco/NTAP1/onlinelog/redo02.log /u03/orareco/NTAP1/onlinelog/redo03.log 42 rows selected.
-
从SQL plus中、检查切换到复制之前插入的测试表的内容。
SQL> alter session set container=ntap1_pdb1; Session altered. SQL> select * from test; ID ---------- DT --------------------------------------------------------------------------- EVENT -------------------------------------------------------------------------------- 1 21-MAR-24 03.15.03.000000 PM test oracle incremental merge switch to copy SQL>
-
您可以在ANF NFS挂载中长时间运行Oracle VLDB、同时保持预期的性能级别。修复主存储问题描述后、您可以通过反转增量备份合并过程并将停机时间降至最低来回滚到该主存储LUN。
从映像副本到备用数据库服务器的Oracle VLDB恢复
Details
如果发生故障、并且主存储和主数据库服务器主机均丢失、则无法从原始服务器执行恢复。但是、ANF NFS文件系统上提供的Oracle数据库备份映像副本非常方便。您可以使用备份映像副本将主数据库快速恢复到备用数据库服务器(如果有)。在本节中、我们将展示此类恢复的分步过程。
-
插入一行以测试我们之前为Oracle VLDB还原到备用主机验证创建的表。
SQL> insert into test values(2, sysdate, 'test recovery on a new Azure VM host with image copy on ANF'); 1 row created. SQL> commit; Commit complete. SQL> select * from test; ID ---------- DT --------------------------------------------------------------------------- EVENT -------------------------------------------------------------------------------- 1 21-MAR-24 03.15.03.000000 PM test oracle incremental merge switch to copy 2 22-MAR-24 02.22.06.000000 PM test recovery on a new Azure VM host with image copy on ANF ID ---------- DT --------------------------------------------------------------------------- EVENT -------------------------------------------------------------------------------- SQL>
-
以Oracle用户身份运行RMAN增量备份并合并、以将事务转储到ANF NFS挂载上的备份集。
[oracle@ip-172-30-15-99 ~]$ rman target / nocatalog Recovery Manager: Release 19.0.0.0.0 - Production on Tue May 30 17:26:03 2023 Version 19.18.0.0.0 Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved. connected to target database: NTAP1 (DBID=2441823937) using target database control file instead of recovery catalog RMAN> @rman_bkup_merge.cmd
-
关闭主VLDB服务器主机、以模拟存储和数据库服务器主机完全故障。
-
在操作系统和版本相同的备用数据库服务器ora-02上、应将操作系统内核作为主VLDB服务器主机进行修补。此外、使用纯软件选项在备用数据库服务器上安装和配置了相同版本的Oracle和修补程序。
-
将Oracle环境配置为类似于主VLDB服务器ora_01、例如oratab和Oracle用户.bash_profile等 最好将这些文件备份到ANF NFS挂载点。
-
然后、将ANF NFS文件系统上的Oracle数据库备份映像副本挂载到备用数据库服务器上进行恢复。以下步骤演示了流程详细信息。
以azueruser身份创建挂载点。
sudo mkdir /nfsanf
以azureuser身份挂载用于存储Oracle VLDB备份映像副本的NFS卷。
sudo mount 172.30.136.68:/ora-01-u02-copy /nfsanf -o rw,bg,hard,vers=3,proto=tcp,timeo=600,rsize=262144,wsize=262144,nointr
-
验证ANF NFS挂载点上的Oracle数据库备份映像副本。
[oracle@ora-02 ~]$ ls -ltr /nfsanf/oracopy/ total 400452728 -rw-r-----. 1 oracle oinstall 461381632 Mar 21 23:47 data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-6_242m9oan -rw-r-----. 1 oracle oinstall 419438592 Mar 21 23:49 data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-5_282m9oem -rw-r-----. 1 oracle oinstall 246423552 Mar 21 23:49 data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-8_292m9oem -rw-r-----. 1 oracle oinstall 21438464 Mar 22 14:35 2h2mbccv_81_1_1 -rw-r-----. 1 oracle oinstall 17956864 Mar 22 14:35 2i2mbcd0_82_1_1 -rw-r-----. 1 oracle oinstall 17956864 Mar 22 14:35 2j2mbcd1_83_1_1 -rw-r-----. 1 oracle oinstall 15245312 Mar 22 14:35 2k2mbcd3_84_1_1 -rw-r-----. 1 oracle oinstall 1638400 Mar 22 14:35 2m2mbcdn_86_1_1 -rw-r-----. 1 oracle oinstall 40042496 Mar 22 14:35 2l2mbcdn_85_1_1 -rw-r-----. 1 oracle oinstall 21856256 Mar 22 14:35 2n2mbcdo_87_1_1 -rw-r-----. 1 oracle oinstall 3710976 Mar 22 14:35 2o2mbcdv_88_1_1 -rw-r-----. 1 oracle oinstall 3416064 Mar 22 14:35 2p2mbcdv_89_1_1 -rw-r-----. 1 oracle oinstall 2596864 Mar 22 14:35 2r2mbce0_91_1_1 -rw-r-----. 1 oracle oinstall 2531328 Mar 22 14:35 2s2mbce1_92_1_1 -rw-r-----. 1 oracle oinstall 4718592 Mar 22 14:35 2v2mbce2_95_1_1 -rw-r-----. 1 oracle oinstall 4243456 Mar 22 14:35 302mbce2_96_1_1 -rw-r-----. 1 oracle oinstall 57344 Mar 22 14:35 312mbce3_97_1_1 -rw-r-----. 1 oracle oinstall 57344 Mar 22 14:35 322mbce3_98_1_1 -rw-r-----. 1 oracle oinstall 57344 Mar 22 14:35 332mbce3_99_1_1 -rw-r-----. 1 oracle oinstall 608182272 Mar 22 15:31 data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-11_202m9o22 -rw-r-----. 1 oracle oinstall 33286004736 Mar 22 15:31 data_D-NTAP1_I-2441823937_TS-SOE_FNO-30_1q2m9k7a -rw-r-----. 1 oracle oinstall 555753472 Mar 22 15:31 data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-10_212m9o52 -rw-r-----. 1 oracle oinstall 33286004736 Mar 22 15:31 data_D-NTAP1_I-2441823937_TS-SOE_FNO-26_1m2m9g9j -rw-r-----. 1 oracle oinstall 33286004736 Mar 22 15:31 data_D-NTAP1_I-2441823937_TS-SOE_FNO-27_1n2m9gcg -rw-r-----. 1 oracle oinstall 429924352 Mar 22 15:31 data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-9_252m9oc5 -rw-r-----. 1 oracle oinstall 33286004736 Mar 22 15:31 data_D-NTAP1_I-2441823937_TS-SOE_FNO-22_1i2m9cap -rw-r-----. 1 oracle oinstall 33286004736 Mar 22 15:31 data_D-NTAP1_I-2441823937_TS-SOE_FNO-23_1j2m9cap -rw-r-----. 1 oracle oinstall 5251072 Mar 22 15:31 data_D-NTAP1_I-2441823937_TS-USERS_FNO-12_2d2m9ofs -rw-r-----. 1 oracle oinstall 33286004736 Mar 22 15:31 data_D-NTAP1_I-2441823937_TS-SOE_FNO-28_1o2m9gd4 -rw-r-----. 1 oracle oinstall 33286004736 Mar 22 15:31 data_D-NTAP1_I-2441823937_TS-SOE_FNO-31_1r2m9kfk -rw-r-----. 1 oracle oinstall 33286004736 Mar 22 15:31 data_D-NTAP1_I-2441823937_TS-SOE_FNO-29_1p2m9ju6 -rw-r-----. 1 oracle oinstall 33286004736 Mar 22 15:31 data_D-NTAP1_I-2441823937_TS-SOE_FNO-32_1s2m9kgg -rw-r-----. 1 oracle oinstall 33286004736 Mar 22 15:31 data_D-NTAP1_I-2441823937_TS-SOE_FNO-25_1l2m9g3u -rw-r-----. 1 oracle oinstall 33286004736 Mar 22 15:31 data_D-NTAP1_I-2441823937_TS-SOE_FNO-24_1k2m9cap -rw-r-----. 1 oracle oinstall 33286004736 Mar 22 15:31 data_D-NTAP1_I-2441823937_TS-SOE_FNO-21_1h2m9cap -rw-r-----. 1 oracle oinstall 1121984512 Mar 22 15:31 data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-1_1t2m9nij -rw-r-----. 1 oracle oinstall 1142956032 Mar 22 15:31 data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-3_1u2m9nog -rw-r-----. 1 oracle oinstall 728768512 Mar 22 15:31 data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-4_1v2m9nu6 -rw-r-----. 1 oracle oinstall 534781952 Mar 22 15:31 data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-14_222m9o53 -rw-r-----. 1 oracle oinstall 534781952 Mar 22 15:31 data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-18_232m9oa8 -rw-r-----. 1 oracle oinstall 429924352 Mar 22 15:31 data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-13_262m9oca -rw-r-----. 1 oracle oinstall 246423552 Mar 22 15:31 data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-15_2a2m9of6 -rw-r-----. 1 oracle oinstall 429924352 Mar 22 15:31 data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-17_272m9oel -rw-r-----. 1 oracle oinstall 5251072 Mar 22 15:31 data_D-NTAP1_I-2441823937_TS-USERS_FNO-7_2c2m9ofn -rw-r-----. 1 oracle oinstall 5251072 Mar 22 15:31 data_D-NTAP1_I-2441823937_TS-USERS_FNO-16_2e2m9og8 -rw-r-----. 1 oracle oinstall 246423552 Mar 22 15:31 data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-19_2b2m9ofn -rw-r-----. 1 oracle oinstall 5251072 Mar 22 15:32 data_D-NTAP1_I-2441823937_TS-USERS_FNO-20_2f2m9og8 -rw-r-----. 1 oracle oinstall 76546048 Mar 22 15:37 362mbft5_102_1_1 -rw-r-----. 1 oracle oinstall 14671872 Mar 22 15:37 392mbg1i_105_1_1 -rw-r-----. 1 oracle oinstall 79462400 Mar 22 15:37 372mbftb_103_1_1 -rw-r-----. 1 oracle oinstall 917504 Mar 22 15:37 3a2mbg23_106_1_1 -rw-r-----. 1 oracle oinstall 428498944 Mar 22 15:37 352mbfst_101_1_1 -rw-r-----. 1 oracle oinstall 88702976 Mar 22 15:37 382mbftm_104_1_1 -rw-r-----. 1 oracle oinstall 5021696 Mar 22 15:37 3b2mbg2b_107_1_1 -rw-r-----. 1 oracle oinstall 278528 Mar 22 15:38 3c2mbg2f_108_1_1 -rw-r-----. 1 oracle oinstall 278528 Mar 22 15:38 3d2mbg2i_109_1_1 -rw-r-----. 1 oracle oinstall 425984 Mar 22 15:38 3f2mbg2m_111_1_1 -rw-r-----. 1 oracle oinstall 442368 Mar 22 15:38 3g2mbg2q_112_1_1 -rw-r-----. 1 oracle oinstall 278528 Mar 22 15:38 3j2mbg37_115_1_1 -rw-r-----. 1 oracle oinstall 270336 Mar 22 15:38 3k2mbg3a_116_1_1 -rw-r-----. 1 oracle oinstall 57344 Mar 22 15:38 3l2mbg3f_117_1_1 -rw-r-----. 1 oracle oinstall 57344 Mar 22 15:38 3n2mbg3k_119_1_1 -rw-r-----. 1 oracle oinstall 57344 Mar 22 15:38 3m2mbg3g_118_1_1 -rw-r-----. 1 oracle oinstall 11600384 Mar 22 15:52 bct_ntap1.ctf [oracle@ora-02 ~]$
-
验证ANF NFS挂载上可用于恢复的Oracle归档日志、并记下最后一个日志文件日志顺序号。在本例中、此值为10。我们的恢复点最高为日志顺序编号11。
[oracle@ora-02 ~]$ ls -ltr /nfsanf/archlog/NTAP1/archivelog/2024_03_22 total 1429548 -r--r-----. 1 oracle oinstall 176650752 Mar 22 12:00 o1_mf_1_2__9m198x6t_.arc -r--r-----. 1 oracle oinstall 17674752 Mar 22 14:34 o1_mf_1_3__9vn701r5_.arc -r--r-----. 1 oracle oinstall 188782080 Mar 22 15:20 o1_mf_1_4__9y6gn5co_.arc -r--r-----. 1 oracle oinstall 183638016 Mar 22 15:21 o1_mf_1_5__9y7p68s6_.arc -r--r-----. 1 oracle oinstall 193106944 Mar 22 15:21 o1_mf_1_6__9y8ygtss_.arc -r--r-----. 1 oracle oinstall 179439104 Mar 22 15:22 o1_mf_1_7__9ybjdp55_.arc -r--r-----. 1 oracle oinstall 198815232 Mar 22 15:23 o1_mf_1_8__9yctxjgy_.arc -r--r-----. 1 oracle oinstall 185494528 Mar 22 15:24 o1_mf_1_9__9yfrj0b1_.arc -r--r-----. 1 oracle oinstall 134470144 Mar 22 15:29 o1_mf_1_10__9yomybbc_.arc [oracle@ora-02 ~]$
-
作为Oracle用户、将oracle_home变量设置为备用数据库服务器ora-02上的当前Oracle安装、将oracle_sid设置为主Oracle实例SID。在本示例中、此值为NTAP1。
[oracle@ora-02 ~]$ export ORACLE_HOME=/u01/app/oracle/product/19.0.0/NTAP2 [oracle@ora-02 ~]$ export ORACLE_SID=NTAP1 [oracle@ora-02 ~]$ export PATH=$PATH:$ORACLE_HOME/bin
-
以Oracle用户身份、在$oracle_HOME/dbs目录中创建一个通用Oracle init文件、并配置适当的管理目录。最重要的是、拥有Oracle
flash recovery area
指向主Oracle VLDB服务器中定义的ANF NFS挂载路径。flash recovery area
第节介绍了配置Setup Oracle RMAN incremental merge to image copy on ANF
。将Oracle控制文件设置为ANF NFS文件系统。vi $ORACLE_HOME/dbs/initNTAP1.ora
包含以下示例条目:
*.audit_file_dest='/u01/app/oracle/admin/NTAP1/adump' *.audit_trail='db' *.compatible='19.0.0' *.control_files=('/nfsanf/oracopy/NTAP1.ctl') *.db_block_size=8192 *.db_create_file_dest='/nfsanf/oracopy/' *.db_domain='solutions.netapp.com' *.db_name='NTAP1' *.db_recovery_file_dest_size=85899345920 *.db_recovery_file_dest='/nfsanf/archlog/' *.diagnostic_dest='/u01/app/oracle' *.dispatchers='(PROTOCOL=TCP) (SERVICE=NTAP1XDB)' *.enable_pluggable_database=true *.local_listener='LISTENER' *.nls_language='AMERICAN' *.nls_territory='AMERICA' *.open_cursors=300 *.pga_aggregate_target=1024m *.processes=320 *.remote_login_passwordfile='EXCLUSIVE' *.sga_target=10240m *.undo_tablespace='UNDOTBS1'
如果出现差异、应将上述init文件替换为从主Oracle VLDB服务器还原的备份init文件。
-
以Oracle用户身份启动RMAN、以便在备用数据库服务器主机上运行Oracle恢复。首先、在中启动Oracle实例
nomount
状态。[oracle@ora-02 ~]$ rman target / nocatalog Recovery Manager: Release 19.0.0.0.0 - Production on Fri Mar 22 16:02:55 2024 Version 19.18.0.0.0 Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved. connected to target database (not started) RMAN> startup nomount; Oracle instance started Total System Global Area 10737418000 bytes Fixed Size 9174800 bytes Variable Size 1577058304 bytes Database Buffers 9126805504 bytes Redo Buffers 24379392 bytes
-
设置数据库ID。数据库ID可从ANF NFS挂载点上映像副本的Oracle文件名中检索。
RMAN> set dbid = 2441823937; executing command: SET DBID
-
从自动备份还原控制文件。如果启用了Oracle控制文件和spfile自动备份、则它们会在每个增量备份和合并周期中进行备份。如果有多个副本可用、则会还原最新备份。
RMAN> restore controlfile from autobackup; Starting restore at 22-MAR-24 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=2 device type=DISK recovery area destination: /nfsanf/archlog/ database name (or database unique name) used for search: NTAP1 channel ORA_DISK_1: AUTOBACKUP /nfsanf/archlog/NTAP1/autobackup/2024_03_22/o1_mf_s_1164296325__9z77zyxb_.bkp found in the recovery area channel ORA_DISK_1: looking for AUTOBACKUP on day: 20240322 channel ORA_DISK_1: restoring control file from AUTOBACKUP /nfsanf/archlog/NTAP1/autobackup/2024_03_22/o1_mf_s_1164296325__9z77zyxb_.bkp channel ORA_DISK_1: control file restore from AUTOBACKUP complete output file name=/nfsanf/oracopy/NTAP1.ctl Finished restore at 22-MAR-24
-
将init文件从spfile还原到/tmp文件夹、以便稍后更新参数文件以与主VLDB匹配。
RMAN> restore spfile to pfile '/tmp/archive/initNTAP1.ora' from autobackup; Starting restore at 22-MAR-24 using channel ORA_DISK_1 recovery area destination: /nfsanf/archlog/ database name (or database unique name) used for search: NTAP1 channel ORA_DISK_1: AUTOBACKUP /nfsanf/archlog/NTAP1/autobackup/2024_03_22/o1_mf_s_1164296325__9z77zyxb_.bkp found in the recovery area channel ORA_DISK_1: looking for AUTOBACKUP on day: 20240322 channel ORA_DISK_1: restoring spfile from AUTOBACKUP /nfsanf/archlog/NTAP1/autobackup/2024_03_22/o1_mf_s_1164296325__9z77zyxb_.bkp channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete Finished restore at 22-MAR-24
-
挂载控制文件并验证数据库备份映像副本。
RMAN> alter database mount; released channel: ORA_DISK_1 Statement processed RMAN> list copy of database tag 'ORACOPYBKUPONANF_LEVEL_0'; List of Datafile Copies ======================= Key File S Completion Time Ckp SCN Ckp Time Sparse ------- ---- - --------------- ---------- --------------- ------ 82 1 A 22-MAR-24 4598427 22-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-1_1t2m9nij Tag: ORACOPYBKUPONANF_LEVEL_0 83 3 A 22-MAR-24 4598423 22-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-3_1u2m9nog Tag: ORACOPYBKUPONANF_LEVEL_0 84 4 A 22-MAR-24 4598431 22-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-4_1v2m9nu6 Tag: ORACOPYBKUPONANF_LEVEL_0 58 5 A 21-MAR-24 2379694 18-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-5_282m9oem Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 2, PDB Name: PDB$SEED 52 6 A 21-MAR-24 2379694 18-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-6_242m9oan Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 2, PDB Name: PDB$SEED 90 7 A 22-MAR-24 4598462 22-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-USERS_FNO-7_2c2m9ofn Tag: ORACOPYBKUPONANF_LEVEL_0 59 8 A 21-MAR-24 2379694 18-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-8_292m9oem Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 2, PDB Name: PDB$SEED 71 9 A 22-MAR-24 4598313 22-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-9_252m9oc5 Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 3, PDB Name: NTAP1_PDB1 68 10 A 22-MAR-24 4598308 22-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-10_212m9o52 Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 3, PDB Name: NTAP1_PDB1 66 11 A 22-MAR-24 4598304 22-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-11_202m9o22 Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 3, PDB Name: NTAP1_PDB1 74 12 A 22-MAR-24 4598318 22-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-USERS_FNO-12_2d2m9ofs Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 3, PDB Name: NTAP1_PDB1 86 13 A 22-MAR-24 4598445 22-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-13_262m9oca Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 4, PDB Name: NTAP1_PDB2 85 14 A 22-MAR-24 4598437 22-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-14_222m9o53 Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 4, PDB Name: NTAP1_PDB2 87 15 A 22-MAR-24 4598454 22-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-15_2a2m9of6 Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 4, PDB Name: NTAP1_PDB2 89 16 A 22-MAR-24 4598466 22-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-USERS_FNO-16_2e2m9og8 Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 4, PDB Name: NTAP1_PDB2 91 17 A 22-MAR-24 4598450 22-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-17_272m9oel Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 5, PDB Name: NTAP1_PDB3 88 18 A 22-MAR-24 4598441 22-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-18_232m9oa8 Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 5, PDB Name: NTAP1_PDB3 92 19 A 22-MAR-24 4598458 22-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-19_2b2m9ofn Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 5, PDB Name: NTAP1_PDB3 93 20 A 22-MAR-24 4598470 22-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-USERS_FNO-20_2f2m9og8 Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 5, PDB Name: NTAP1_PDB3 81 21 A 22-MAR-24 4598318 22-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-21_1h2m9cap Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 3, PDB Name: NTAP1_PDB1 72 22 A 22-MAR-24 4598304 22-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-22_1i2m9cap Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 3, PDB Name: NTAP1_PDB1 73 23 A 22-MAR-24 4598308 22-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-23_1j2m9cap Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 3, PDB Name: NTAP1_PDB1 80 24 A 22-MAR-24 4598313 22-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-24_1k2m9cap Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 3, PDB Name: NTAP1_PDB1 79 25 A 22-MAR-24 4598318 22-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-25_1l2m9g3u Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 3, PDB Name: NTAP1_PDB1 69 26 A 22-MAR-24 4598304 22-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-26_1m2m9g9j Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 3, PDB Name: NTAP1_PDB1 70 27 A 22-MAR-24 4598308 22-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-27_1n2m9gcg Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 3, PDB Name: NTAP1_PDB1 75 28 A 22-MAR-24 4598313 22-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-28_1o2m9gd4 Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 3, PDB Name: NTAP1_PDB1 77 29 A 22-MAR-24 4598318 22-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-29_1p2m9ju6 Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 3, PDB Name: NTAP1_PDB1 67 30 A 22-MAR-24 4598304 22-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-30_1q2m9k7a Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 3, PDB Name: NTAP1_PDB1 76 31 A 22-MAR-24 4598308 22-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-31_1r2m9kfk Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 3, PDB Name: NTAP1_PDB1 78 32 A 22-MAR-24 4598313 22-MAR-24 NO Name: /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-32_1s2m9kgg Tag: ORACOPYBKUPONANF_LEVEL_0 Container ID: 3, PDB Name: NTAP1_PDB1
-
切换要复制的数据库、以便在不还原数据库的情况下运行恢复。
RMAN> switch database to copy; Starting implicit crosscheck backup at 22-MAR-24 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=12 device type=DISK Crosschecked 33 objects Finished implicit crosscheck backup at 22-MAR-24 Starting implicit crosscheck copy at 22-MAR-24 using channel ORA_DISK_1 Crosschecked 31 objects Finished implicit crosscheck copy at 22-MAR-24 searching for all files in the recovery area cataloging files... cataloging done List of Cataloged Files ======================= File Name: /nfsanf/archlog/NTAP1/autobackup/2024_03_20/o1_mf_s_1164140565__5g56ypks_.bkp File Name: /nfsanf/archlog/NTAP1/autobackup/2024_03_22/o1_mf_s_1164296325__9z77zyxb_.bkp datafile 1 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-1_1t2m9nij" datafile 3 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-3_1u2m9nog" datafile 4 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-4_1v2m9nu6" datafile 5 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-5_282m9oem" datafile 6 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-6_242m9oan" datafile 7 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-USERS_FNO-7_2c2m9ofn" datafile 8 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-8_292m9oem" datafile 9 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-9_252m9oc5" datafile 10 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-10_212m9o52" datafile 11 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-11_202m9o22" datafile 12 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-USERS_FNO-12_2d2m9ofs" datafile 13 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-13_262m9oca" datafile 14 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-14_222m9o53" datafile 15 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-15_2a2m9of6" datafile 16 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-USERS_FNO-16_2e2m9og8" datafile 17 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-17_272m9oel" datafile 18 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-18_232m9oa8" datafile 19 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-19_2b2m9ofn" datafile 20 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-USERS_FNO-20_2f2m9og8" datafile 21 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-21_1h2m9cap" datafile 22 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-22_1i2m9cap" datafile 23 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-23_1j2m9cap" datafile 24 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-24_1k2m9cap" datafile 25 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-25_1l2m9g3u" datafile 26 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-26_1m2m9g9j" datafile 27 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-27_1n2m9gcg" datafile 28 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-28_1o2m9gd4" datafile 29 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-29_1p2m9ju6" datafile 30 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-30_1q2m9k7a" datafile 31 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-31_1r2m9kfk" datafile 32 switched to datafile copy "/nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-32_1s2m9kgg"
-
在闪存恢复区域运行Oracle恢复、直到最后一个可用归档日志为止。
RMAN> run { 2> set until sequence=11; 3> recover database; 4> } executing command: SET until clause Starting recover at 22-MAR-24 using channel ORA_DISK_1 starting media recovery archived log for thread 1 with sequence 4 is already on disk as file /nfsanf/archlog/NTAP1/archivelog/2024_03_22/o1_mf_1_4__9y6gn5co_.arc archived log for thread 1 with sequence 5 is already on disk as file /nfsanf/archlog/NTAP1/archivelog/2024_03_22/o1_mf_1_5__9y7p68s6_.arc archived log for thread 1 with sequence 6 is already on disk as file /nfsanf/archlog/NTAP1/archivelog/2024_03_22/o1_mf_1_6__9y8ygtss_.arc archived log for thread 1 with sequence 7 is already on disk as file /nfsanf/archlog/NTAP1/archivelog/2024_03_22/o1_mf_1_7__9ybjdp55_.arc archived log for thread 1 with sequence 8 is already on disk as file /nfsanf/archlog/NTAP1/archivelog/2024_03_22/o1_mf_1_8__9yctxjgy_.arc archived log for thread 1 with sequence 9 is already on disk as file /nfsanf/archlog/NTAP1/archivelog/2024_03_22/o1_mf_1_9__9yfrj0b1_.arc archived log for thread 1 with sequence 10 is already on disk as file /nfsanf/archlog/NTAP1/archivelog/2024_03_22/o1_mf_1_10__9yomybbc_.arc archived log file name=/nfsanf/archlog/NTAP1/archivelog/2024_03_22/o1_mf_1_4__9y6gn5co_.arc thread=1 sequence=4 archived log file name=/nfsanf/archlog/NTAP1/archivelog/2024_03_22/o1_mf_1_5__9y7p68s6_.arc thread=1 sequence=5 archived log file name=/nfsanf/archlog/NTAP1/archivelog/2024_03_22/o1_mf_1_6__9y8ygtss_.arc thread=1 sequence=6 archived log file name=/nfsanf/archlog/NTAP1/archivelog/2024_03_22/o1_mf_1_7__9ybjdp55_.arc thread=1 sequence=7 archived log file name=/nfsanf/archlog/NTAP1/archivelog/2024_03_22/o1_mf_1_8__9yctxjgy_.arc thread=1 sequence=8 archived log file name=/nfsanf/archlog/NTAP1/archivelog/2024_03_22/o1_mf_1_9__9yfrj0b1_.arc thread=1 sequence=9 archived log file name=/nfsanf/archlog/NTAP1/archivelog/2024_03_22/o1_mf_1_10__9yomybbc_.arc thread=1 sequence=10 media recovery complete, elapsed time: 00:01:17 Finished recover at 22-MAR-24 RMAN> exit Recovery Manager complete.
要加快恢复速度、请使用recovery _parlism参数启用并行会话、或者在恢复命令中指定并行程度以进行数据库恢复: RECOVER DATABASE PARALLEL (DEGREE d INSTANCES DEFAULT);
。通常、并行度应等于主机上的CPU核数。 -
退出RMAN、以Oracle用户身份通过sqlplus登录到Oracle、以便在恢复不完整后打开数据库并重置日志。
SQL> select name, open_mode from v$database; NAME OPEN_MODE --------- -------------------- NTAP1 MOUNTED SQL> select instance_name, host_name from v$instance; INSTANCE_NAME ---------------- HOST_NAME ---------------------------------------------------------------- NTAP1 ora-02 SQL> SQL> select member from v$logfile; MEMBER -------------------------------------------------------------------------------- /u03/orareco/NTAP1/onlinelog/redo03.log /u03/orareco/NTAP1/onlinelog/redo02.log /u03/orareco/NTAP1/onlinelog/redo01.log SQL> alter database rename file '/u03/orareco/NTAP1/onlinelog/redo01.log' to '/nfsanf/oracopy/redo01.log'; Database altered. SQL> alter database rename file '/u03/orareco/NTAP1/onlinelog/redo02.log' to '/nfsanf/oracopy/redo02.log'; Database altered. SQL> alter database rename file '/u03/orareco/NTAP1/onlinelog/redo03.log' to '/nfsanf/oracopy/redo03.log'; Database altered. SQL> alter database open resetlogs; Database altered. SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 NTAP1_PDB1 READ WRITE NO 4 NTAP1_PDB2 READ WRITE NO 5 NTAP1_PDB3 READ WRITE NO
-
验证已还原到新主机的数据库结构、以及在主VLDB发生故障之前插入的测试行。
SQL> select name from v$datafile; NAME -------------------------------------------------------------------------------- /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-1_1t2m9nij /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-3_1u2m9nog /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-4_1v2m9nu6 /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-5_282m9oem /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-6_242m9oan /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-USERS_FNO-7_2c2m9ofn /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-8_292m9oem /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-9_252m9oc5 /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-10_212m9o52 /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-11_202m9o22 /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-USERS_FNO-12_2d2m9ofs NAME -------------------------------------------------------------------------------- /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-13_262m9oca /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-14_222m9o53 /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-15_2a2m9of6 /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-USERS_FNO-16_2e2m9og8 /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSTEM_FNO-17_272m9oel /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SYSAUX_FNO-18_232m9oa8 /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-UNDOTBS1_FNO-19_2b2m9ofn /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-USERS_FNO-20_2f2m9og8 /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-21_1h2m9cap /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-22_1i2m9cap /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-23_1j2m9cap NAME -------------------------------------------------------------------------------- /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-24_1k2m9cap /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-25_1l2m9g3u /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-26_1m2m9g9j /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-27_1n2m9gcg /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-28_1o2m9gd4 /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-29_1p2m9ju6 /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-30_1q2m9k7a /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-31_1r2m9kfk /nfsanf/oracopy/data_D-NTAP1_I-2441823937_TS-SOE_FNO-32_1s2m9kgg 31 rows selected. SQL> select member from v$logfile; MEMBER -------------------------------------------------------------------------------- /nfsanf/oracopy/redo03.log /nfsanf/oracopy/redo02.log /nfsanf/oracopy/redo01.log SQL> select name from v$controlfile; NAME -------------------------------------------------------------------------------- /nfsanf/oracopy/NTAP1.ctl SQL> alter session set container=ntap1_pdb1; Session altered. SQL> select * from test; ID ---------- DT --------------------------------------------------------------------------- EVENT -------------------------------------------------------------------------------- 1 21-MAR-24 03.15.03.000000 PM test oracle incremental merge switch to copy 2 22-MAR-24 02.22.06.000000 PM test recovery on a new Azure VM host with image copy on ANF
-
删除无效的临时文件并将新的临时文件添加到临时表空间。
SQL> select name from v$tempfile; NAME -------------------------------------------------------------------------------- /u02/oradata/NTAP1/NTAP1_pdb1/temp01.dbf /u02/oradata/NTAP1/NTAP1_pdb1/temp02.dbf SQL> alter tablespace temp add tempfile '/nfsanf/oracopy/ntap1_pdb1_temp01.dbf' size 100M; Tablespace altered. SQL> select name from v$tempfile; NAME -------------------------------------------------------------------------------- /u02/oradata/NTAP1/NTAP1_pdb1/temp01.dbf /u02/oradata/NTAP1/NTAP1_pdb1/temp02.dbf /nfsanf/oracopy/ntap1_pdb1_temp01.dbf SQL> alter database tempfile '/u02/oradata/NTAP1/NTAP1_pdb1/temp01.dbf' offline; Database altered. SQL> alter database tempfile '/u02/oradata/NTAP1/NTAP1_pdb1/temp01.dbf' drop; Database altered. SQL> alter database tempfile '/u02/oradata/NTAP1/NTAP1_pdb1/temp02.dbf' offline; Database altered. SQL> alter database tempfile '/u02/oradata/NTAP1/NTAP1_pdb1/temp02.dbf' drop; Database altered. SQL> select name from v$tempfile; NAME -------------------------------------------------------------------------------- /nfsanf/oracopy/ntap1_pdb1_temp01.dbf SQL>
-
其他恢复后任务
- Add ANF NFS mount to fstab so that the NFS file system will be mounted when DB server host rebooted. As azureuser, sudo vi /etc/fstab and add following entry: 172.30.136.68:/ora-01-u02-copy /nfsanf nfs rw,bg,hard,vers=3,proto=tcp,timeo=600,rsize=262144,wsize=262144,nointr 0 0 - Update the Oracle init file from primary databse init file backup that is restored to /tmp/archive and create spfile as needed.
这样、Oracle VLDB数据库便可从ANF NFS文件系统上的备份映像副本恢复到备用数据库服务器主机。
从何处查找追加信息
要了解有关本文档中所述信息的更多信息,请查看以下文档和 / 或网站:
-
RMAN:合并增量备份策略(文档ID 745798.1)
-
RMAN备份和恢复用户指南
-
Azure NetApp Files