oracle 11g r2 rac到单实例的dg
rac环境--primary
CentOS release 6.5 (Final)
hostname rac1 rac2
ip 10.*.11 10.*.12
Instance_name bol1 bol2
DB_NAME bol
db_unique_name bol
Data、Control File、Redo File ASM
SQL*Plus: Release 11.2.0.4.0 Production
SQL> conn sys/oracle as sysdba
单实例环境--standby
CentOS release 6.5 (Final)
hostname dg1
ip 10.*.16
Instance_name orcl
DB_NAME bol
db_unique_name orcl
SQL*Plus: Release 11.2.0.4.0 Production
rac ip详细
[root@rac1 ~]# vim /etc/hosts
#Public IP
10.*.11 rac1
10.*.12 rac2
#Private IP
172.168.1.18 rac1-priv
172.168.1.19 rac2-priv
#Virtual IP
10.*.13 rac1-vip
10.*.14 rac2-vip
#Scan IP
10.*.15 rac-scan
文件系统规划
Primary Standby
+DATA/bol/datafile/test01.dbf /u01/app/oracle/oradata/orcl/data tempfile
+data/bol/tempfile /u01/app/oracle/oradata/orcl/control01.ctl
+fra/bol/archivelog /u01/app/oracle/fast_recovery_area/orcl
+fra/bol/onlinelog /u01/app/oracle/oradata/orcl/redo
2 主库操作,设置为归档和force logging
--primary SQL> conn /as sysdba Connected. SQL> archive log list; Database log mode Archive Mode Automatic archival Enabled Archive destination +FRA/bol/arch Oldest online log sequence 142 Next log sequence to archive 144 Current log sequence 144 ===select *from v$archived_log order by 1; SQL> show parameter db_name NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_name string bol SQL> show parameter db_unique_name NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_unique_name string bol SQL> alter database force logging; Database altered. SQL> select force_logging from v$database; FOR --- YES
===修改主库为归档模式
SQL> archive log list
切换归档,将所有节点都必须处于 mount 状态。 在其中一个节点修改模式,然后在其他节点正常启动即可。
SQL> shutdown immediate SQL> startup mount SQL> alter database archivelog; SQL> archive log list; SQL> select name , open_mode, log_mode,force_logging from gv$database; NAME OPEN_MODE LOG_MODE FOR --------- -------------------- ------------ --- BOL READ WRITE ARCHIVELOG YES SQL> show parameter db_recover NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_recovery_file_dest string +FRA db_recovery_file_dest_size big integer 5727M
===2 个节点的归档都指向了+FRA 这个磁盘组。 也可以指向其他的磁盘组或者本地的位置,如:
SQL> alter system set log_archive_dest_1='location=/u01/bol1arch' sid='bol1';
SQL> alter system set log_archive_dest_1='location=/u01/bol2arch' sid='bol2';
3 主备库添加 standby Redo log 文件
RAC 每个 Redo Thread 都需要创建对应的 Standby Redo Log。 创建原则和单实例一样,包括日志 文件大小相等,日志组数量要多 1 组。
主库
SQL> set lines 120 SQL> col member for a50 SQL> select a.thread#,a.group#,a.bytes/1024/1024,b.member from v$log a,v$logfile b where a.group#=b.group#; THREAD# GROUP# A.BYTES/1024/1024 MEMBER ---------- ---------- ----------------- -------------------------------------------------- 1 1 50 +DATA/bol/onlinelog/group_1.257.990861405 1 1 50 +FRA/bol/onlinelog/group_1.257.990861405 1 2 50 +DATA/bol/onlinelog/group_2.258.990861405 1 2 50 +FRA/bol/onlinelog/group_2.258.990861405 2 3 50 +DATA/bol/onlinelog/group_3.265.990862587 2 3 50 +FRA/bol/onlinelog/group_3.259.990862587 2 4 50 +DATA/bol/onlinelog/group_4.266.990862587 2 4 50 +FRA/bol/onlinelog/group_4.260.990862587 2 4 50 +FRA/bol/onlinelog/group_4.261.991639393 1 5 50 +DATA/bol/onlinelog/group_5.271.991639531 1 5 50 +FRA/bol/onlinelog/group_5.262.991639531 SQL> select thread#,group#,members,bytes/1024/1024 from v$log; THREAD# GROUP# MEMBERS BYTES/1024/1024 ---------- ---------- ---------- --------------- 1 1 2 50 1 2 2 50 2 3 2 50 2 4 3 50 1 5 2 50 --主库添加 standby redo log: alter database add standby logfile thread 1 group 11 ('+FRA') size 50m; alter database add standby logfile thread 1 group 12 ('+FRA') size 50m; alter database add standby logfile thread 1 group 13 ('+FRA') size 50m; alter database add standby logfile thread 1 group 14 ('+FRA') size 50m; alter database add standby logfile thread 1 group 15 ('+FRA') size 50m; alter database add standby logfile thread 1 group 16 ('+FRA') size 50m; alter database add standby logfile thread 1 group 17 ('+FRA') size 50m; alter database add standby logfile thread 2 group 18 ('+FRA') size 50m; alter database add standby logfile thread 2 group 19 ('+FRA') size 50m; alter database add standby logfile thread 2 group 20 ('+FRA') size 50m; alter database add standby logfile thread 2 group 21 ('+FRA') size 50m; alter database add standby logfile thread 2 group 22 ('+FRA') size 50m; alter database add standby logfile thread 2 group 23 ('+FRA') size 50m; SQL> select group#,type,member from v$logfile order by 1,2; GROUP# TYPE MEMBER ---------- ------- -------------------------------------------------- 1 ONLINE +DATA/bol/onlinelog/group_1.257.990861405 1 ONLINE +FRA/bol/onlinelog/group_1.257.990861405 2 ONLINE +DATA/bol/onlinelog/group_2.258.990861405 2 ONLINE +FRA/bol/onlinelog/group_2.258.990861405 3 ONLINE +DATA/bol/onlinelog/group_3.265.990862587 3 ONLINE +FRA/bol/onlinelog/group_3.259.990862587 4 ONLINE +DATA/bol/onlinelog/group_4.266.990862587 4 ONLINE +FRA/bol/onlinelog/group_4.260.990862587 4 ONLINE +FRA/bol/onlinelog/group_4.261.991639393 5 ONLINE +FRA/bol/onlinelog/group_5.262.991639531 5 ONLINE +DATA/bol/onlinelog/group_5.271.991639531 GROUP# TYPE MEMBER ---------- ------- -------------------------------------------------- 11 STANDBY +FRA/bol/onlinelog/group_11.323.1000118283 12 STANDBY +FRA/bol/onlinelog/group_12.322.1000118289 13 STANDBY +FRA/bol/onlinelog/group_13.321.1000118293 14 STANDBY +FRA/bol/onlinelog/group_14.320.1000118303 15 STANDBY +FRA/bol/onlinelog/group_15.319.1000118303 16 STANDBY +FRA/bol/onlinelog/group_16.318.1000118303 17 STANDBY +FRA/bol/onlinelog/group_17.313.1000118387 18 STANDBY +FRA/bol/onlinelog/group_18.312.1000118397 19 STANDBY +FRA/bol/onlinelog/group_19.317.1000118315 20 STANDBY +FRA/bol/onlinelog/group_20.316.1000118315 21 STANDBY +FRA/bol/onlinelog/group_21.315.1000118315 GROUP# TYPE MEMBER ---------- ------- -------------------------------------------------- 22 STANDBY +FRA/bol/onlinelog/group_22.314.1000118317 23 STANDBY +FRA/bol/onlinelog/group_23.311.1000118405 24 rows selected.
4 配置主备库的监听
用 net manager 工具,在备库创建一个监听。 也可以手动的修改 listener.ora 文件
--对于 RAC 环境:
在 grid 用户的 listener.ora 文件中加入如下内容:
[grid@rac1 ~]$ cd /u01/app/11.2.0/grid/network/admin/ [grid@rac1 admin]$ cat listener.ora LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))) # line added by Agent LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))) # line added by Agent ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON # line added by Agent ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent [grid@rac1 admin]$ vim listener.ora [grid@rac1 admin]$ cat listener.ora LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))) # line added by Agent LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))) # line added by Agent ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON # line added by Agent SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = bol) (ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1) (SID_NAME = bol1) ) ) LISTENER = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = LISTENER)) ) ADR_BASE_LISTENER = /u01/app/grid ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent LISTENER_SCAN1 = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = LISTENER_SCAN1)) ) ADR_BASE_LISTENER_SCAN1 = /u01/app/grid 节点 2,对应修改即可 SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = bol) (ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1) (SID_NAME = bol2) ) )
--这里写的 Oracle 用户的 ORACLE_HOME
然后重启监听
注意在 oracle 11gR2 的 RAC 环境下,监听是在 grid 用户下配置的。所以这里可以用 grid 用户连接并修改。 最后重启监听
对于单实例,直接在 listener.ora 里添加
[oracle@dg1 oracle]$ cd /u01/app/oracle/product/11.2.0/db_1/network/admin/ [oracle@dg1 admin]$ vim listener.ora [oracle@dg1 admin]$ cat listener.ora # listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora # Generated by Oracle configuration tools. SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = orcl) (ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1) (SID_NAME = orcl) ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = dg1)(PORT = 1521)) ) (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) ) ) ADR_BASE_LISTENER = /u01/app/oracle
配置主备库的 Net Server: tnsnames.ora
节点1,节点2,单实例 的 tnsnames.ora 文件是一致的,添加以下内容---其实也可以不一致
[oracle@rac1 admin]$ vim tnsnames.ora [oracle@rac1 admin]$ cat tnsnames.ora # tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora # Generated by Oracle configuration tools. BOL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = scanip)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = bol) ) ) bol1 = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.*.13)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = bol1) ) ) bol2 = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.*.14)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = bol2) ) ) orcl = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.*.16)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) ) [grid@rac1 admin]$ lsnrctl reload [oracle@dg1 admin]$ echo $ORACLE_HOME [oracle@dg1 admin]$ source /home/oracle/.bash_profile [oracle@dg1 admin]$ echo $ORACLE_HOME /u01/app/oracle/product/11.2.0/db_1 [oracle@dg1 admin]$ lsnrctl start
--备库 /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora [root@dg1 ~]# cat /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora bol= (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.*.11)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = 10.*.12)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME =bol) ) ) orcl= (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.*.16)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME =orcl) ) )
--主库ping备库
主库ping备库成功
[oracle@rac1 admin]$ tnsping orcl
TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 13-FEB-2019 15:56:29
Copyright (c) 1997, 2013, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.*.16)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
OK (30 msec)
--备库ping主库
[oracle@dg1 admin]$ tnsping bol
TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 13-FEB-2019 11:42:10
Copyright (c) 1997, 2013, Oracle. All rights reserved.
Used parameter files:
/u01/app/oracle/product/11.2.0/db_1/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.*.11)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = 10.*.12)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME =bol)))
OK (0 msec)
5 备库创建相应的目录
[oracle@dg1 admin]$ mkdir -p /u01/app/oracle/fast_recovery_area/orcl mkdir -p /u01/app/oracle/oradata/orcl/data mkdir -p /u01/app/oracle/oradata/orcl/tempfile [oracle@dg1 admin]$ mkdir -p /u01/app/oracle/admin/orcl/adump [oracle@dg1 admin]$ mkdir -p /u01/app/oracle/admin/orcl/data [oracle@dg1 admin]$ mkdir -p /u01/app/oracle/admin/orcl/redo [oracle@dg1 admin]$ mkdir -p /u01/app/oracle/admin/orcl/tempfile [oracle@dg1 oracle]$ mkdir -p /u01/app/oracle/archive
6 修改RAC参数,并生成pfile与密码文件一起传输到备库
复制rac1的密码文件传到备库
[oracle@rac1 dbs]$ scp orapwbol1 oracle@10.*.16:/u01/app/oracle/product/11.2.0/db_1/dbs/orapworcl
创建修改主备库的参数文件
--主库参数
db_file_name_convert 和 log_file_name_convert 仅当数据库被 standby 时才会生效,这里配置,是 为切换做准备。 log_file_name_convert 指的是 online redo log。
在 Oracle 11g 已经废除了 fal_client 参数。
RAC 的 spfile 是放在共享设备上的,所以如果想创建,就需要先创建一份 pfile 到本地,在修改,如果不想这么折腾,就直接使用 SQL 语句修改:
1)使用 ASM 作为存储时,datafile 和 tempfile 是分别放在两个目录下的,所以在Standby 上也单独创建一个tempdata 目录。并在db_file_name_convert 中作相应的设置。
2)在使用ASM 的RAC中,注意不要改变db_unique_name 的参数值;因为ASM 存放文件的规则,是按照+diskgroup_name/data_unique_name/file/tag_name.file_member.incarnation 这样一个规则存放的,
但是第二项database_unique_name 并不是db_name;如果改变了db_unique_name,则之后创建的数据文件会放在新的目录下,会导致db_file_name_convert 的失效,这一点需要特别注意。
3)如果RAC中使用db_create_online_log_dest_n 系列参数,要相应调整stangby 上的log_file_name_convert 参数。
--alter system set db_unique_name='bol' scope=spfile sid='*'; alter system set log_archive_config='dg_config=(bol,orcl)' scope=spfile sid='*'; alter system set log_archive_dest_1='location=+FRA valid_for=(all_logfiles,all_roles) db_unique_name=bol' scope=spfile sid='*'; alter system set log_archive_dest_2='service=orcl valid_for=(online_logfiles,primary_role) db_unique_name=orcl' scope=spfile sid='*'; alter system set log_archive_dest_state_1=enable scope=spfile sid='*'; alter system set log_archive_dest_state_2=enable scope=spfile sid='*'; alter system set standby_file_management='auto' scope=spfile sid='*'; alter system set fal_server='orcl' scope=spfile sid='*'; alter system set db_file_name_convert='+DATA/bol/datafile','/u01/app/oracle/oradata/orcl/data','+DATA/bol/tempfile','/u01/app/oracle/oradata/orcl/tempfile' scope=spfile sid='*'; alter system set log_file_name_convert='+FRA/bol/onlinelog','/u01/app/oracle/admin/orcl/redo' scope=spfile sid='*'; alter system set log_archive_format='%t_%s_%r.arch' scope=spfile sid='*';
--备库参数
--在主库创建pfile 文件并scp 到备库修改
主要指定一些pfile的路径,不要直接create pfile from spfile
SQL> create pfile='/u01/app/oracle/product/11.2.0/db_1/dbs/tmp.ora' from spfile; File created. [oracle@rac1 dbs]$ scp tmp.ora oracle@10.*.16:/u01/app/oracle/product/11.2.0/db_1/dbs/initorcl.ora [oracle@dg1 dbs]$ vim initorcl.ora [oracle@dg1 dbs]$ cat initorcl.ora orcl.__db_cache_size=503316480 orcl.__java_pool_size=16777216 orcl.__large_pool_size=33554432 orcl.__pga_aggregate_target=452984832 orcl.__sga_target=822083584 orcl.__shared_io_pool_size=0 orcl.__shared_pool_size=251658240 orcl.__streams_pool_size=0 *.audit_file_dest='/u01/app/oracle/admin/orcl/adump' *.audit_trail='db' *.compatible='11.2.0.4.0' *.control_files='/u01/app/oracle/oradata/orcl/control01.ctl','/u01/app/oracle/fast_recovery_area/orcl/control02.ctl' *.db_block_size=8192 *.db_domain='' *.db_file_name_convert='+DATA/bol/datafile','/u01/app/oracle/oradata/orcl/data','+DATA/bol/tempfile','/u01/app/oracle/oradata/orcl/tempfile' *.db_name='bol' *.service_names='orcl' *.db_unique_name='orcl' *.db_recovery_file_dest='/u01/app/oracle/fast_recovery_area' *.db_recovery_file_dest_size=6005194752 *.diagnostic_dest='/u01/app/oracle' *.dispatchers='(PROTOCOL=TCP) (SERVICE=bolXDB)' *.fal_server='bol' *.log_archive_config='dg_config=(bol,orcl)' *.log_archive_dest_1='location=/u01/app/oracle/archive valid_for=(all_logfiles,all_roles) db_unique_name=orcl' *.log_archive_dest_2='service=bol valid_for=(online_logfiles,primary_role) db_unique_name=bol' *.log_archive_dest_state_1='ENABLE' *.log_archive_dest_state_2='ENABLE' *.log_archive_format='%t_%s_%r.arch' *.log_file_name_convert='+FRA/bol/onlinelog','/u01/app/oracle/admin/orcl/redo' *.memory_target=1264582656 *.open_cursors=300 *.processes=350 *.remote_login_passwordfile='exclusive' *.standby_file_management='auto' *.undo_tablespace='UNDOTBS1'
使用 spfile 将备库启动 nomount 状态并启动监听
[oracle@dg1 dbs]$ sqlplus /nolog SQL*Plus: Release 11.2.0.4.0 Production on Wed Feb 13 15:27:54 2019 Copyright (c) 1982, 2013, Oracle. All rights reserved. SQL> conn /as sysdba Connected to an idle instance. SQL> create spfile from pfile; File created. SQL> startup nomount ORACLE instance started. Total System Global Area 1269366784 bytes Fixed Size 2252864 bytes Variable Size 822087616 bytes Database Buffers 436207616 bytes Redo Buffers 8818688 bytes
[oracle@dg1 dbs]$ lsnrctl start LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 13-FEB-2019 15:40:44 Copyright (c) 1991, 2013, Oracle. All rights reserved. Starting /u01/app/oracle/product/11.2.0/db_1/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 11.2.0.4.0 - Production System parameter file is /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora Log messages written to /u01/app/oracle/diag/tnslsnr/dg1/listener/alert/log.xml Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dg1)(PORT=1521))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dg1)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production Start Date 13-FEB-2019 15:40:47 Uptime 0 days 0 hr. 0 min. 10 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora Listener Log File /u01/app/oracle/diag/tnslsnr/dg1/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dg1)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) Services Summary... Service "orcl" has 1 instance(s). Instance "orcl", status UNKNOWN, has 1 handler(s) for this service... The command completed successfully
7 备库进行duplicate
[oracle@dg1 dbs]$ rman target sys/*@bol auxiliary sys/*@orcl nocatalog Recovery Manager: Release 11.2.0.4.0 - Production on Wed Feb 13 16:18:06 2019 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. connected to target database: BOL (DBID=4213574617) using target database control file instead of recovery catalog connected to auxiliary database: BOL (not mounted) RMAN> duplicate target database for standby from active database; Starting Duplicate Db at 13-FEB-19 allocated channel: ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: SID=10 device type=DISK
--详细日志
[oracle@dg1 dbs]$ rman target sys/oracle@bol auxiliary sys/oracle@orcl nocatalog Recovery Manager: Release 11.2.0.4.0 - Production on Wed Feb 13 16:18:06 2019 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. connected to target database: BOL (DBID=4213574617) using target database control file instead of recovery catalog connected to auxiliary database: BOL (not mounted) RMAN> duplicate target database for standby from active database; Starting Duplicate Db at 13-FEB-19 allocated channel: ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: SID=10 device type=DISK contents of Memory Script: { backup as copy reuse targetfile '/u01/app/oracle/product/11.2.0/db_1/dbs/orapwbol1' auxiliary format '/u01/app/oracle/product/11.2.0/db_1/dbs/orapworcl' ; } executing Memory Script Starting backup at 13-FEB-19 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=26 instance=bol1 device type=DISK Finished backup at 13-FEB-19 contents of Memory Script: { backup as copy current controlfile for standby auxiliary format '/u01/app/oracle/oradata/orcl/control01.ctl'; restore clone controlfile to '/u01/app/oracle/fast_recovery_area/orcl/control02.ctl' from '/u01/app/oracle/oradata/orcl/control01.ctl'; } executing Memory Script Starting backup at 13-FEB-19 using channel ORA_DISK_1 channel ORA_DISK_1: starting datafile copy copying standby control file output file name=/u01/app/oracle/product/11.2.0/db_1/dbs/snapcf_bol1.f tag=TAG20190213T161904 RECID=3 STAMP=1000138745 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03 Finished backup at 13-FEB-19 Starting restore at 13-FEB-19 using channel ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: copied control file copy Finished restore at 13-FEB-19 contents of Memory Script: { sql clone 'alter database mount standby database'; } executing Memory Script sql statement: alter database mount standby database contents of Memory Script: { set newname for tempfile 1 to "/u01/app/oracle/oradata/orcl/tempfile/temp.262.990861409"; switch clone tempfile all; set newname for datafile 1 to "/u01/app/oracle/oradata/orcl/data/system.259.990861405"; set newname for datafile 2 to "/u01/app/oracle/oradata/orcl/data/sysaux.260.990861407"; set newname for datafile 3 to "/u01/app/oracle/oradata/orcl/data/undotbs1.261.990861409"; set newname for datafile 4 to "/u01/app/oracle/oradata/orcl/data/undotbs2.263.990861413"; set newname for datafile 5 to "/u01/app/oracle/oradata/orcl/data/users.264.990861413"; set newname for datafile 6 to "/u01/app/oracle/oradata/orcl/data/test01.dbf"; set newname for datafile 7 to "/u01/app/oracle/oradata/orcl/data/sde_tbs.dbf"; set newname for datafile 9 to "/u01/app/oracle/oradata/orcl/data/example01.dbf"; set newname for datafile 10 to "/u01/app/oracle/oradata/orcl/data/cad01.dbf"; set newname for datafile 11 to "/u01/app/oracle/oradata/orcl/data/sj_data01.dbf"; backup as copy reuse datafile 1 auxiliary format "/u01/app/oracle/oradata/orcl/data/system.259.990861405" datafile 2 auxiliary format "/u01/app/oracle/oradata/orcl/data/sysaux.260.990861407" datafile 3 auxiliary format "/u01/app/oracle/oradata/orcl/data/undotbs1.261.990861409" datafile 4 auxiliary format "/u01/app/oracle/oradata/orcl/data/undotbs2.263.990861413" datafile 5 auxiliary format "/u01/app/oracle/oradata/orcl/data/users.264.990861413" datafile 6 auxiliary format "/u01/app/oracle/oradata/orcl/data/test01.dbf" datafile 7 auxiliary format "/u01/app/oracle/oradata/orcl/data/sde_tbs.dbf" datafile 9 auxiliary format "/u01/app/oracle/oradata/orcl/data/example01.dbf" datafile 10 auxiliary format "/u01/app/oracle/oradata/orcl/data/cad01.dbf" datafile 11 auxiliary format "/u01/app/oracle/oradata/orcl/data/sj_data01.dbf" ; sql 'alter system archive log current'; } executing Memory Script executing command: SET NEWNAME renamed tempfile 1 to /u01/app/oracle/oradata/orcl/tempfile/temp.262.990861409 in control file executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME Starting backup at 13-FEB-19 using channel ORA_DISK_1 channel ORA_DISK_1: starting datafile copy input datafile file number=00003 name=+DATA/bol/datafile/undotbs1.261.990861409 output file name=/u01/app/oracle/oradata/orcl/data/undotbs1.261.990861409 tag=TAG20190213T161917 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:45 channel ORA_DISK_1: starting datafile copy input datafile file number=00002 name=+DATA/bol/datafile/sysaux.260.990861407 output file name=/u01/app/oracle/oradata/orcl/data/sysaux.260.990861407 tag=TAG20190213T161917 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35 channel ORA_DISK_1: starting datafile copy input datafile file number=00001 name=+DATA/bol/datafile/system.259.990861405 output file name=/u01/app/oracle/oradata/orcl/data/system.259.990861405 tag=TAG20190213T161917 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35 channel ORA_DISK_1: starting datafile copy input datafile file number=00005 name=+DATA/bol/datafile/users.264.990861413 output file name=/u01/app/oracle/oradata/orcl/data/users.264.990861413 tag=TAG20190213T161917 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35 channel ORA_DISK_1: starting datafile copy input datafile file number=00007 name=+DATA/bol/datafile/sde_tbs.dbf output file name=/u01/app/oracle/oradata/orcl/data/sde_tbs.dbf tag=TAG20190213T161917 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:25 channel ORA_DISK_1: starting datafile copy input datafile file number=00004 name=+DATA/bol/datafile/undotbs2.263.990861413 output file name=/u01/app/oracle/oradata/orcl/data/undotbs2.263.990861413 tag=TAG20190213T161917 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:25 channel ORA_DISK_1: starting datafile copy input datafile file number=00010 name=+DATA/bol/datafile/cad01.dbf output file name=/u01/app/oracle/oradata/orcl/data/cad01.dbf tag=TAG20190213T161917 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:26 channel ORA_DISK_1: starting datafile copy input datafile file number=00011 name=+DATA/bol/datafile/sj_data01.dbf output file name=/u01/app/oracle/oradata/orcl/data/sj_data01.dbf tag=TAG20190213T161917 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15 channel ORA_DISK_1: starting datafile copy input datafile file number=00009 name=+DATA/bol/datafile/example01.dbf output file name=/u01/app/oracle/oradata/orcl/data/example01.dbf tag=TAG20190213T161917 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15 channel ORA_DISK_1: starting datafile copy input datafile file number=00006 name=+DATA/bol/datafile/test01.dbf output file name=/u01/app/oracle/oradata/orcl/data/test01.dbf tag=TAG20190213T161917 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07 Finished backup at 13-FEB-19 sql statement: alter system archive log current contents of Memory Script: { switch clone datafile all; } executing Memory Script datafile 1 switched to datafile copy input datafile copy RECID=3 STAMP=1000139021 file name=/u01/app/oracle/oradata/orcl/data/system.259.990861405 datafile 2 switched to datafile copy input datafile copy RECID=4 STAMP=1000139021 file name=/u01/app/oracle/oradata/orcl/data/sysaux.260.990861407 datafile 3 switched to datafile copy input datafile copy RECID=5 STAMP=1000139021 file name=/u01/app/oracle/oradata/orcl/data/undotbs1.261.990861409 datafile 4 switched to datafile copy input datafile copy RECID=6 STAMP=1000139021 file name=/u01/app/oracle/oradata/orcl/data/undotbs2.263.990861413 datafile 5 switched to datafile copy input datafile copy RECID=7 STAMP=1000139021 file name=/u01/app/oracle/oradata/orcl/data/users.264.990861413 datafile 6 switched to datafile copy input datafile copy RECID=8 STAMP=1000139021 file name=/u01/app/oracle/oradata/orcl/data/test01.dbf datafile 7 switched to datafile copy input datafile copy RECID=9 STAMP=1000139021 file name=/u01/app/oracle/oradata/orcl/data/sde_tbs.dbf datafile 9 switched to datafile copy input datafile copy RECID=10 STAMP=1000139021 file name=/u01/app/oracle/oradata/orcl/data/example01.dbf datafile 10 switched to datafile copy input datafile copy RECID=11 STAMP=1000139021 file name=/u01/app/oracle/oradata/orcl/data/cad01.dbf datafile 11 switched to datafile copy input datafile copy RECID=12 STAMP=1000139021 file name=/u01/app/oracle/oradata/orcl/data/sj_data01.dbf Finished Duplicate Db at 13-FEB-19