1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
[oracle@rac2 ~]$ sqlplus sys/sys@w5005pr as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Thu Jan 7 23:43:03 2016
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
[oracle@rac2 ~]$
[oracle@rac2 ~]$ sqlplus sys/sys@w5005prg as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Thu Jan 7 23:43:11 2016
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
[oracle@rac2 ~]$
[oracle@rac1 ~]$
rman target sys/sys@w5005pr auxiliary sys/sys@w5005prg
Recovery Manager: Release 11.2.0.3.0 - Production on Thu Jan 7 23:45:10 2016
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: W5005PR (DBID=4158252169)
connected to auxiliary database: W5005PR (not mounted)
RMAN>
duplicate target database for standby from active database nofilenamecheck;
Starting Duplicate Db at 07-JAN-16
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=21 device type=DISK
contents of Memory Script:
{
backup as copy reuse
targetfile '/u01/app/oracle/product/11.2.0/db_1/dbs/orapww5005pr' auxiliary format
'/u01/app/oracle/product/11.2.0/db_1/dbs/orapww5005prg' ;
}
executing Memory Script
Starting backup at 07-JAN-16
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=78 device type=DISK
Finished backup at 07-JAN-16
contents of Memory Script:
{
sql clone "alter system set control_files =
''+DATA/w5005prg/controlfile/current.262.900546411'' comment=
''Set by RMAN'' scope=spfile";
backup as copy current controlfile for standby auxiliary format '+DATA/w5005prg/controlfile/current.263.900546411';
sql clone "alter system set control_files =
''+DATA/w5005prg/controlfile/current.263.900546411'' comment=
''Set by RMAN'' scope=spfile";
shutdown clone immediate;
startup clone nomount;
}
executing Memory Script
sql statement: alter system set control_files = ''+DATA/w5005prg/controlfile/current.262.900546411'' comment= ''Set by RMAN'' scope=spfile
Starting backup at 07-JAN-16
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_w5005pr.f tag=TAG20160107T234652 RECID=1 STAMP=900546413
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
Finished backup at 07-JAN-16
sql statement: alter system set control_files = ''+DATA/w5005prg/controlfile/current.263.900546411'' comment= ''Set by RMAN'' scope=spfile
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area 1269366784 bytes
Fixed Size 2227984 bytes
Variable Size 754974960 bytes
Database Buffers 503316480 bytes
Redo Buffers 8847360 bytes
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 clone tempfile 1 to new;
switch clone tempfile all;
set newname for clone datafile 1 to new;
set newname for clone datafile 2 to new;
set newname for clone datafile 3 to new;
set newname for clone datafile 4 to new;
backup as copy reuse
datafile 1 auxiliary format new
datafile 2 auxiliary format new
datafile 3 auxiliary format new
datafile 4 auxiliary format new
;
sql 'alter system archive log current';
}
executing Memory Script
executing command: SET NEWNAME
renamed tempfile 1 to +DATA in control file
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting backup at 07-JAN-16
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=+DATA/w5005pr/datafile/system.260.900456399
output file name=+DATA/w5005prg/datafile/system.264.900546429 tag=TAG20160107T234709
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting datafile copy
input datafile file number=00002 name=+DATA/w5005pr/datafile/sysaux.265.900456401
output file name=+DATA/w5005prg/datafile/sysaux.265.900546465 tag=TAG20160107T234709
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting datafile copy
input datafile file number=00003 name=+DATA/w5005pr/datafile/undotbs1.264.900456401
output file name=+DATA/w5005prg/datafile/undotbs1.266.900546499 tag=TAG20160107T234709
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting datafile copy
input datafile file number=00004 name=+DATA/w5005pr/datafile/users.269.900456401
output file name=+DATA/w5005prg/datafile/users.267.900546507 tag=TAG20160107T234709
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 07-JAN-16
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=1 STAMP=900546507 file name=+DATA/w5005prg/datafile/system.264.900546429
datafile 2 switched to datafile copy
input datafile copy RECID=2 STAMP=900546507 file name=+DATA/w5005prg/datafile/sysaux.265.900546465
datafile 3 switched to datafile copy
input datafile copy RECID=3 STAMP=900546507 file name=+DATA/w5005prg/datafile/undotbs1.266.900546499
datafile 4 switched to datafile copy
input datafile copy RECID=4 STAMP=900546507 file name=+DATA/w5005prg/datafile/users.267.900546507
Finished Duplicate Db at 07-JAN-16
RMAN> exit
Recovery Manager complete.
[oracle@rac1 ~]$
[oracle@rac1 ~]$