[Oracle][PDB]PDB restore/recover 过程记录
友人给的PDB restore / recover 的过程。
实际上会创建一个辅助Instance,然后抽取出PDB,进行恢复。
(10:31:59) frank.yan: [Administrator.WIN-7ZFXNFKSD8P] ➤ ./rman target /
Recovery Manager: Release 12.1.0.1.0 - Production on Fri May 19 14:44:05 2017
Copyright (c) 1982, 2015, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORCL (DBID=1471571033)
RMAN> ALTER PLUGGABLE DATABASE orcl2pdb CLOSE; ★
using target database control file instead of recovery catalog
Statement processed
RMAN> run
{
set until time "to_date('2017-05-19 11:25:00','yyyy-mm-dd hh24:mi:ss')"; ★
RESTORE PLUGGABLE DATABASE orcl2pdb; ★
RECOVER PLUGGABLE DATABASE orcl2pdb; ★
}2> 3> 4> 5> 6>
executing command: SET until clause
Starting restore at 2017-05-19_14:44:41
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=25 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 00010 to C:\APP\ORCLHOMEUSER\ORADATA\ORCL\ORCL2PDB\SYSTEM01.DBF
channel ORA_DISK_1: restoring datafile 00011 to C:\APP\ORCLHOMEUSER\ORADATA\ORCL\ORCL2PDB\SYSAUX01.DBF
channel ORA_DISK_1: restoring datafile 00012 to C:\APP\ORCLHOMEUSER\ORADATA\ORCL\ORCL2PDB\ORCL2PDB_USERS01.DBF
channel ORA_DISK_1: reading from backup piece C:\APP\ORCLHOMEUSER\FAST_RECOVERY_AREA\ORCL\12819F783C454B38B6D844D4C0E70DAB\BACKUPSET\2017_05_19\O1_MF_NNNDF_CTGM_DAILY_ORA_20170_DKWOO8NX_.BKP
channel ORA_DISK_1: piece handle=C:\APP\ORCLHOMEUSER\FAST_RECOVERY_AREA\ORCL\12819F783C454B38B6D844D4C0E70DAB\BACKUPSET\2017_05_19\O1_MF_NNNDF_CTGM_DAILY_ORA_20170_DKWOO8NX_.BKP tag=CTGM_DAILY_ORA_201705191020
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:36
Finished restore at 2017-05-19_14:45:17
Starting recover at 2017-05-19_14:45:17
using channel ORA_DISK_1
RMAN-05026: WARNING: presuming following set of tablespaces applies to specified Point-in-Time
List of tablespaces expected to have UNDO segments
Tablespace SYSTEM
Tablespace UNDOTBS1
Creating automatic instance, with SID='xqny'
initialization parameters used for automatic instance:
db_name=ORCL
db_unique_name=xqny_pitr_orcl2pdb_ORCL
compatible=12.1.0.0.0
db_block_size=8192
db_files=200
sga_target=1G
processes=80
diagnostic_dest=C:\APP\ORCLHOMEUSER
_system_trig_enabled=FALSE
#No auxiliary destination in use
enable_pluggable_database=true
_clone_one_pdb_recovery=true
control_files=C:\APP\ORCLHOMEUSER\FAST_RECOVERY_AREA\ORCL\CONTROLFILE\O1_MF_DKX1MFKW_.CTL
#No auxiliary parameter file used
starting up automatic instance ORCL
Oracle instance started
Total System Global Area 1068937216 bytes
Fixed Size 2973040 bytes
Variable Size 281019024 bytes
Database Buffers 780140544 bytes
Redo Buffers 4804608 bytes
Automatic instance created
contents of Memory Script:
{
# set requested point in time
set until time "to_date('2017-05-19 11:25:00','yyyy-mm-dd hh24:mi:ss')";
# restore the controlfile
restore clone controlfile;
# mount the controlfile
sql clone 'alter database mount clone database';
}
executing Memory Script
executing command: SET until clause
Starting restore at 2017-05-19_14:46:09
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=11 device type=DISK
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: reading from backup piece C:\APP\ORCLHOMEUSER\FAST_RECOVERY_AREA\ORCL\AUTOBACKUP\2017_05_19\O1_MF_S_944392960_DKWOQL42_.BKP
channel ORA_AUX_DISK_1: piece handle=C:\APP\ORCLHOMEUSER\FAST_RECOVERY_AREA\ORCL\AUTOBACKUP\2017_05_19\O1_MF_S_944392960_DKWOQL42_.BKP tag=TAG20170519T112240
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:02
output file name=C:\APP\ORCLHOMEUSER\FAST_RECOVERY_AREA\ORCL\CONTROLFILE\O1_MF_DKX1MFKW_.CTL
Finished restore at 2017-05-19_14:46:11
sql statement: alter database mount clone database
contents of Memory Script:
{
# set requested point in time
set until time "to_date('2017-05-19 11:25:00','yyyy-mm-dd hh24:mi:ss')";
# switch to valid datafilecopies
switch clone datafile 10 to datafilecopy
"C:\APP\ORCLHOMEUSER\ORADATA\ORCL\ORCL2PDB\SYSTEM01.DBF";
switch clone datafile 11 to datafilecopy
"C:\APP\ORCLHOMEUSER\ORADATA\ORCL\ORCL2PDB\SYSAUX01.DBF";
switch clone datafile 12 to datafilecopy
"C:\APP\ORCLHOMEUSER\ORADATA\ORCL\ORCL2PDB\ORCL2PDB_USERS01.DBF";
# set destinations for recovery set and auxiliary set datafiles
set newname for datafile 1 to
"C:\APP\ORCLHOMEUSER\FAST_RECOVERY_AREA\ORCL\DATAFILE\O1_MF_SYSTEM_DKX1O0XH_.DBF";
set newname for datafile 5 to
"C:\APP\ORCLHOMEUSER\FAST_RECOVERY_AREA\ORCL\DATAFILE\O1_MF_UNDOTBS1_DKX1O0YY_.DBF";
set newname for datafile 3 to
"C:\APP\ORCLHOMEUSER\FAST_RECOVERY_AREA\ORCL\DATAFILE\O1_MF_SYSAUX_DKX1O124_.DBF";
set newname for datafile 6 to
"C:\APP\ORCLHOMEUSER\FAST_RECOVERY_AREA\ORCL\DATAFILE\O1_MF_USERS_DKX1O93O_.DBF";
# restore the tablespaces in the recovery set and the auxiliary set
restore clone datafile 1, 5, 3, 6;
switch clone datafile all;
}
executing Memory Script
executing command: SET until clause
datafile 10 switched to datafile copy
input datafile copy RECID=1 STAMP=944405178 file name=C:\APP\ORCLHOMEUSER\ORADATA\ORCL\ORCL2PDB\SYSTEM01.DBF
datafile 11 switched to datafile copy
input datafile copy RECID=2 STAMP=944405178 file name=C:\APP\ORCLHOMEUSER\ORADATA\ORCL\ORCL2PDB\SYSAUX01.DBF
datafile 12 switched to datafile copy
input datafile copy RECID=3 STAMP=944405178 file name=C:\APP\ORCLHOMEUSER\ORADATA\ORCL\ORCL2PDB\ORCL2PDB_USERS01.DBF
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 2017-05-19_14:46:18
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to C:\APP\ORCLHOMEUSER\FAST_RECOVERY_AREA\ORCL\DATAFILE\O1_MF_SYSTEM_DKX1O0XH_.DBF
channel ORA_AUX_DISK_1: restoring datafile 00005 to C:\APP\ORCLHOMEUSER\FAST_RECOVERY_AREA\ORCL\DATAFILE\O1_MF_UNDOTBS1_DKX1O0YY_.DBF
channel ORA_AUX_DISK_1: restoring datafile 00003 to C:\APP\ORCLHOMEUSER\FAST_RECOVERY_AREA\ORCL\DATAFILE\O1_MF_SYSAUX_DKX1O124_.DBF
channel ORA_AUX_DISK_1: restoring datafile 00006 to C:\APP\ORCLHOMEUSER\FAST_RECOVERY_AREA\ORCL\DATAFILE\O1_MF_USERS_DKX1O93O_.DBF
channel ORA_AUX_DISK_1: reading from backup piece C:\APP\ORCLHOMEUSER\FAST_RECOVERY_AREA\ORCL\BACKUPSET\2017_05_19\O1_MF_NNNDF_CTGM_DAILY_ORA_20170_DKWOM7FY_.BKP
channel ORA_AUX_DISK_1: piece handle=C:\APP\ORCLHOMEUSER\FAST_RECOVERY_AREA\ORCL\BACKUPSET\2017_05_19\O1_MF_NNNDF_CTGM_DAILY_ORA_20170_DKWOM7FY_.BKP tag=CTGM_DAILY_ORA_201705191020
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:36
Finished restore at 2017-05-19_14:47:55
datafile 1 switched to datafile copy
input datafile copy RECID=8 STAMP=944405275 file name=C:\APP\ORCLHOMEUSER\FAST_RECOVERY_AREA\ORCL\DATAFILE\O1_MF_SYSTEM_DKX1O0XH_.DBF
datafile 5 switched to datafile copy
input datafile copy RECID=9 STAMP=944405275 file name=C:\APP\ORCLHOMEUSER\FAST_RECOVERY_AREA\ORCL\DATAFILE\O1_MF_UNDOTBS1_DKX1O0YY_.DBF
datafile 3 switched to datafile copy
input datafile copy RECID=10 STAMP=944405276 file name=C:\APP\ORCLHOMEUSER\FAST_RECOVERY_AREA\ORCL\DATAFILE\O1_MF_SYSAUX_DKX1O124_.DBF
datafile 6 switched to datafile copy
input datafile copy RECID=11 STAMP=944405276 file name=C:\APP\ORCLHOMEUSER\FAST_RECOVERY_AREA\ORCL\DATAFILE\O1_MF_USERS_DKX1O93O_.DBF
contents of Memory Script:
{
# set requested point in time
set until time "to_date('2017-05-19 11:25:00','yyyy-mm-dd hh24:mi:ss')";
# online the datafiles restored or switched
sql clone "alter database datafile 1 online";
sql clone "alter database datafile 5 online";
sql clone "alter database datafile 3 online";
sql clone 'ORCL2PDB' "alter database datafile
10 online";
sql clone 'ORCL2PDB' "alter database datafile
11 online";
sql clone 'ORCL2PDB' "alter database datafile
12 online";
sql clone "alter database datafile 6 online";
# recover pdb
recover clone database tablespace "SYSTEM", "UNDOTBS1", "SYSAUX", "USERS" pluggable database
'ORCL2PDB' delete archivelog;
sql clone 'alter database open read only';
plsql >>;
plsql >>;
# shutdown clone before import
shutdown clone abort
plsql 'ORCL2PDB');
end; >>>;
}
executing Memory Script
executing command: SET until clause
sql statement: alter database datafile 1 online
sql statement: alter database datafile 5 online
sql statement: alter database datafile 3 online
sql statement: alter database datafile 10 online
sql statement: alter database datafile 11 online
sql statement: alter database datafile 12 online
sql statement: alter database datafile 6 online
Starting recover at 2017-05-19_14:47:57
using channel ORA_AUX_DISK_1
starting media recovery
archived log for thread 1 with sequence 197 is already on disk as file C:\APP\ORCLHOMEUSER\FAST_RECOVERY_AREA\ORCL\ARCHIVELOG\2017_05_19\O1_MF_1_197_DKWOQH74_.ARC
archived log for thread 1 with sequence 198 is already on disk as file C:\APP\ORCLHOMEUSER\FAST_RECOVERY_AREA\ORCL\ARCHIVELOG\2017_05_19\O1_MF_1_198_DKWPMJPQ_.ARC
archived log file name=C:\APP\ORCLHOMEUSER\FAST_RECOVERY_AREA\ORCL\ARCHIVELOG\2017_05_19\O1_MF_1_197_DKWOQH74_.ARC thread=1 sequence=197
archived log file name=C:\APP\ORCLHOMEUSER\FAST_RECOVERY_AREA\ORCL\ARCHIVELOG\2017_05_19\O1_MF_1_198_DKWPMJPQ_.ARC thread=1 sequence=198
media recovery complete, elapsed time: 00:00:01
Finished recover at 2017-05-19_14:48:01
sql statement: alter database open read only
Oracle instance shut down
Removing automatic instance
Automatic instance removed
auxiliary instance file C:\APP\ORCLHOMEUSER\FAST_RECOVERY_AREA\ORCL\DATAFILE\O1_MF_SYSAUX_DKX1O124_.DBF deleted
auxiliary instance file C:\APP\ORCLHOMEUSER\FAST_RECOVERY_AREA\ORCL\CONTROLFILE\O1_MF_DKX1MFKW_.CTL deleted
Finished recover at 2017-05-19_14:48:21
RMAN> ALTER PLUGGABLE DATABASE orcl2pdb OPEN RESETLOGS; ★
Statement processed
[Oracle][PDB]PDB restore/recover 过程记录的更多相关文章
- Oracle 12c: RMAN restore/recover pluggable database
查看数据库状态 运行在归档模式,可拔插数据库name=pdborcl SQL> archive log list; Database log mode Archive Mode Automati ...
- oracle 12cR2 RAC deconfig CRS过程记录
已经停了该节点的crs所有服务: [root@jhjzksrv02 install]# ./rootcrs.sh -force -deconfig -verboseUsing configuratio ...
- 实验记录:Oracle redo logfile的resize过程
实验记录:Oracle redo logfile的resize过程. 实验环境:RHEL 6.4 + Oracle 11.2.0.3 单实例 文件系统 实验目的:本实验是修改redo logfile的 ...
- [Oracle][Standby][PDB]在PDB中修改参数,设置范围为 SPFILE,报 ORA-65099错误
[Oracle][Standby][PDB]在PDB中修改参数,设置范围为 SPFILE,报 ORA-65099错误 在Data Gaurd 的 Standby (或 CDB 是 Read Only ...
- oracle 12c pdb开启和关闭
oracle 12c pdb开启和关闭 //开启数据库 sqlplus / as sysdba; //登录连接CDB,默认是root container;startu ...
- 【12c】12c RMAN新特性之通过网络远程恢复数据库(RESTORE/Recover from Service)
[12c]12c RMAN新特性之通过网络远程恢复数据库(RESTORE/Recover from Service) 通过网络远程恢复数据库(Restore/Recover from Service) ...
- Oracle数据迁移至HBase操作记录
Oracle数据迁移至HBase操作记录 @(HBase) 近期需要把Oracle数据库中的十几张表T级别的数据迁移至HBase中,过程中遇到了许多苦难和疑惑,在此记录一下希望能帮到一些有同样需求的兄 ...
- Windows平台下Oracle监听服务启动过程中日志输出
Windows平台下Oracle监听服务启动过程中日志输出记录. 日志目录:D:\app\Administrator\diag\tnslsnr\WIN-RU03CB21QGA\listener\tra ...
- oracle pl/sql远程连接过程
之前没用过oracle,现在公司用到就记录下安装过程吧.安装PL/SQL工具,安装oracle11G工具.打开PL/SQL 进行配置.
随机推荐
- Kotlin入门(6)条件分支的实现
上一篇文章介绍了字符串的相关操作,其中示例代码用到了if和for语句,表面上看,Kotlin对控制语句的处理与Java很像,可实际上,Kotlin在这方面做了不少的改进,所以本篇和下一篇文章就分别介绍 ...
- python中json序列化的东东
之所以写这个因为自己总是弄混了,容易弄错,记下来有事没事看看 序列化是指把变量从内存中变成可存储或传输的过程称之为序列化用(使用dump或者dumps),把变量内容从序列化的对象重新读到 内存里称 ...
- Python实例---模拟微信网页登录(day3)
第四步: 扫码成功后获取最近联系人信息---day3代码 settings.py """ Django settings for weixin project. Gene ...
- Alpha冲刺! Day12 - 砍柴
Alpha冲刺! Day12 - 砍柴 今日已完成 晨瑶:终于更了 Gitkraken 团队协作教程. 昭锡:初步学习了解Android动画. 永盛:用户逻辑基本完成. 立强:从众多开源库中找到两个合 ...
- linux位数查看
#getconf LONG_BIT
- File类_常见的方法(获取系统根目录与指定目录的容量)
获取系统根目录 import java.io.File; public class File_ListRoots { public static void main(String[] args) { ...
- OutputStreamWriter与InputStreamReader(转换流)
import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import jav ...
- 全排列(dfs)
无重复元素的全排列 输入n(<=11),按从小到大输出数字1 到n 个的全部排列.样例:输入:3输出:1:1 2 32:1 3 23:2 1 34:2 3 15:3 1 26:3 2 1 全排列 ...
- P1754 球迷购票问题
题目背景 盛况空前的足球赛即将举行.球赛门票售票处排起了球迷购票长龙. 按售票处规定,每位购票者限购一张门票,且每张票售价为50元.在排成长龙的球迷中有N个人手持面值50元的钱币,另有N个人手持面值1 ...
- 梯度下降(Gradient Descent)
在求解机器学习算法的模型参数,即无约束优化问题时,梯度下降(Gradient Descent)是最常采用的方法之一,另一种常用的方法是最小二乘法.这里就对梯度下降法做一个完整的总结. 1. 梯度 在微 ...