RMAN-05609: Must specify a username for target connection when using active duplicate

While I was trying to duplicate my database I got this error:

orcl_pri> rman target / auxiliary sys@orcl_dr
Recovery Manager: Release 12.1.0.2.0 - Production on Mon Apr 15 13:50:51 2019
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORCL (DBID=XXXXXXXXXX)
auxiliary database Password:
connected to auxiliary database: ORCL (not mounted)
RMAN> run {
allocate channel c1 type disk;
allocate auxiliary channel cr1 type disk;
duplicate target database for standby from active database nofilenamecheck;
}2> 3> 4> 5>
using target database control file instead of recovery catalog
allocated channel: c1
channel c1: SID=21 device type=DISK
allocated channel: cr1
channel cr1: SID=1140 device type=DISK
Starting Duplicate Db at 15-APR-19
released channel: c1
released channel: cr1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 04/15/2019 13:52:23
RMAN-05501: aborting duplication of target database
RMAN-05609: Must specify a username for target connection when using active duplicate
RMAN> exit
Recovery Manager complete.

The problem is the I used OS authentication. The solution is to use password auth. :

orcl_pri> rman target sys@orcl_pri auxiliary sys@orcl_dr

Recovery Manager: Release 12.1.0.2.0 - Production on Mon Apr 15 14:04:07 2019
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
target database Password:
connected to target database: ORCL (DBID=xxxxxxxxx)
auxiliary database Password:
connected to auxiliary database: ORCL (not mounted)
RMAN> run {
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
allocate auxiliary channel cr1 type disk;
allocate auxiliary channel cr2 type disk;
allocate auxiliary channel cr3 type disk;
duplicate target database for standby from active database nofilenamecheck;
}2> 3> 4> 5> 6> 7> 8> 9>
using target database control file instead of recovery catalog
allocated channel: c1
channel c1: SID=35 device type=DISK
allocated channel: c2
channel c2: SID=1156 device type=DISK
allocated channel: c3
channel c3: SID=21 device type=DISK
allocated channel: cr1
channel cr1: SID=1140 device type=DISK
allocated channel: cr2
channel cr2: SID=15 device type=DISK
allocated channel: cr3
channel cr3: SID=1150 device type=DISK
Starting Duplicate Db at 15-APR-19
........
input datafile copy RECID=34 STAMP=1005660559 file name=/orcl/datafiles/data1_01.dbf
datafile 35 switched to datafile copy
input datafile copy RECID=35 STAMP=1005660559 file name=/orcl/datafiles/index1_01.dbf
Finished Duplicate Db at 15-APR-19
released channel: c1
released channel: c2
released channel: c3
released channel: cr1
released channel: cr2
released channel: cr3
RMAN> exit
Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.