Hello community,
I have struggled with how to correctly allocate channels when doing active duplicates and end up leaving that command out of the run block in rman. I was hoping someone could help me figure this out so I could start using it. I am duplicating a database for standby (11.2.0.4 on linux). I start the standby nomount using its own spfile and then connect with rman:
$ rman target='sys/oracle@racdb2' auxiliary sys/oracle@racstby
I then paste in the run block using auxiliary channels and I get an error
Recovery Manager: Release 11.2.0.4.0 - Production on Wed Jul 6 20:35:19 2016
...
connected to target database: RACDB (DBID=858061715)
connected to auxiliary database: RACDB (not mounted)
RMAN> run {
2> allocate auxiliary channel d1 type disk;
3> allocate auxiliary channel d2 type disk;
4> DUPLICATE TARGET DATABASE
5> FOR STANDBY
6> FROM ACTIVE DATABASE
7> DORECOVER
8> ;
9> }
using target database control file instead of recovery catalog
allocated channel: d1
channel d1: SID=1 device type=DISK
allocated channel: d2
channel d2: SID=26 device type=DISK
Starting Duplicate Db at 06-july -2016 08:35:25 pm
(after a moment, I see it error out)
Starting backup at 06-july -2016 08:35:28 pm
released channel: d1
released channel: d2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 07/06/2016 20:35:28
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-06034: at least 1 channel must be allocated to execute this command
===================================================================================================================
so I try the same command without "auxiliary":
RMAN> run {
2> allocate channel d1 type disk;
3> allocate channel d2 type disk;
4> DUPLICATE TARGET DATABASE
5> FOR STANDBY
6> FROM ACTIVE DATABASE
7> DORECOVER
8> ;
9> }
and then I see this:
Starting Duplicate Db at 06-july -2016 08:37:52 pm
released channel: d1
released channel: d2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 07/06/2016 20:37:52
RMAN-05501: aborting duplication of target database
RMAN-05503: at least one auxiliary channel must be allocated to execute this command
===================================================================================================================
So it looks like auxiliary is expected. Is my syntax wrong? My duplicate succeeds if I just leave out the channel lines. Oddly enough, if I use a combination of the two channels, my duplicate also succeeds:
RMAN> run
2> {
3> allocate auxiliary channel d1 type disk;
4> allocate channel d2 type disk;
5> DUPLICATE TARGET DATABASE
6> FOR STANDBY
7> FROM ACTIVE DATABASE
8> DORECOVER
9> ;
10> }
Finished recover at 06-july -2016 08:28:33 pm
Finished Duplicate Db at 06-july -2016 08:28:35 pm
released channel: d1
released channel: d2
Thanks in advance,
John