While i was setting up my 12C Standby database i faced an error which says RMAN-05609: Must specify a username for target connection when using active duplicate , because we had to put a username instead of using OS authentication, so here is how we solved it.
[oracle@node4 ~]$ rman target/ auxiliary sys@drs
Recovery Manager: Release 12.1.0.1.0 - Production on Mon Sep 8 14:59:08 2014
Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved.
connected to target database: PRD (DBID=1921407359)
auxiliary database Password:
connected to auxiliary database: PRD (not mounted)
RMAN> duplicate target database to drs from active database;
Starting Duplicate Db at 08-SEP-14
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 09/08/2014 14:59:27
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.
## Now we specify a username and the error does not come
[oracle@node4 ~]$ rman target sys@prd auxiliary sys@drs
Recovery Manager: Release 12.1.0.1.0 - Production on Mon Sep 8 14:59:44 2014
Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved.
target database Password:
connected to target database: PRD (DBID=1921407359)
auxiliary database Password:
connected to auxiliary database: PRD (not mounted)
RMAN> duplicate target database for standby from active database;
Starting Duplicate Db at 08-SEP-14
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/12.1.0/dbhome_1/dbs/orapwprd' auxiliary format
'/u01/app/oracle/product/12.1.0/dbhome_1/dbs/orapwdrs' ;
}
executing Memory Script
Starting backup at 08-SEP-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=49 device type=DISK
Finished backup at 08-SEP-14
contents of Memory Script:
{
restore clone from service 'prd' standby controlfile;
}
executing Memory Script
Starting restore at 08-SEP-14
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service prd
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03
output file name=/u01/app/oracle/oradata/drs/control01.ctl
output file name=/u01/app/oracle/fast_recovery_area/drs/control02.ctl
Finished restore at 08-SEP-14
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/drs/temp01.dbf";
switch clone tempfile all;
set newname for datafile 1 to
"/u01/app/oracle/oradata/drs/system01.dbf";
set newname for datafile 2 to
"/u01/app/oracle/oradata/drs/example01.dbf";
set newname for datafile 3 to
"/u01/app/oracle/oradata/drs/sysaux01.dbf";
set newname for datafile 4 to
"/u01/app/oracle/oradata/drs/undotbs01.dbf";
set newname for datafile 6 to
"/u01/app/oracle/oradata/drs/users01.dbf";
restore
from service 'prd' clone database
;
sql 'alter system archive log current';
}
executing Memory Script
executing command: SET NEWNAME
renamed tempfile 1 to /u01/app/oracle/oradata/drs/temp01.dbf in control file
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 08-SEP-14
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service prd
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /u01/app/oracle/oradata/drs/system01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:26
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service prd
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00002 to /u01/app/oracle/oradata/drs/example01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:15
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service prd
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/drs/sysaux01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:35
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service prd
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/drs/undotbs01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:07
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service prd
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00006 to /u01/app/oracle/oradata/drs/users01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 08-SEP-14
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=857746892 file name=/u01/app/oracle/oradata/drs/system01.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=2 STAMP=857746892 file name=/u01/app/oracle/oradata/drs/example01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=3 STAMP=857746892 file name=/u01/app/oracle/oradata/drs/sysaux01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=4 STAMP=857746892 file name=/u01/app/oracle/oradata/drs/undotbs01.dbf
datafile 6 switched to datafile copy
input datafile copy RECID=5 STAMP=857746892 file name=/u01/app/oracle/oradata/drs/users01.dbf
Finished Duplicate Db at 08-SEP-14
RMAN> exit
Recovery Manager complete.
[oracle@node4 ~]$ rman target/ auxiliary sys@drs
Recovery Manager: Release 12.1.0.1.0 - Production on Mon Sep 8 14:59:08 2014
Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved.
connected to target database: PRD (DBID=1921407359)
auxiliary database Password:
connected to auxiliary database: PRD (not mounted)
RMAN> duplicate target database to drs from active database;
Starting Duplicate Db at 08-SEP-14
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 09/08/2014 14:59:27
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.
## Now we specify a username and the error does not come
[oracle@node4 ~]$ rman target sys@prd auxiliary sys@drs
Recovery Manager: Release 12.1.0.1.0 - Production on Mon Sep 8 14:59:44 2014
Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved.
target database Password:
connected to target database: PRD (DBID=1921407359)
auxiliary database Password:
connected to auxiliary database: PRD (not mounted)
RMAN> duplicate target database for standby from active database;
Starting Duplicate Db at 08-SEP-14
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/12.1.0/dbhome_1/dbs/orapwprd' auxiliary format
'/u01/app/oracle/product/12.1.0/dbhome_1/dbs/orapwdrs' ;
}
executing Memory Script
Starting backup at 08-SEP-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=49 device type=DISK
Finished backup at 08-SEP-14
contents of Memory Script:
{
restore clone from service 'prd' standby controlfile;
}
executing Memory Script
Starting restore at 08-SEP-14
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service prd
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03
output file name=/u01/app/oracle/oradata/drs/control01.ctl
output file name=/u01/app/oracle/fast_recovery_area/drs/control02.ctl
Finished restore at 08-SEP-14
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/drs/temp01.dbf";
switch clone tempfile all;
set newname for datafile 1 to
"/u01/app/oracle/oradata/drs/system01.dbf";
set newname for datafile 2 to
"/u01/app/oracle/oradata/drs/example01.dbf";
set newname for datafile 3 to
"/u01/app/oracle/oradata/drs/sysaux01.dbf";
set newname for datafile 4 to
"/u01/app/oracle/oradata/drs/undotbs01.dbf";
set newname for datafile 6 to
"/u01/app/oracle/oradata/drs/users01.dbf";
restore
from service 'prd' clone database
;
sql 'alter system archive log current';
}
executing Memory Script
executing command: SET NEWNAME
renamed tempfile 1 to /u01/app/oracle/oradata/drs/temp01.dbf in control file
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 08-SEP-14
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service prd
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /u01/app/oracle/oradata/drs/system01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:26
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service prd
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00002 to /u01/app/oracle/oradata/drs/example01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:15
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service prd
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/drs/sysaux01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:35
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service prd
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/drs/undotbs01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:07
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service prd
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00006 to /u01/app/oracle/oradata/drs/users01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 08-SEP-14
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=857746892 file name=/u01/app/oracle/oradata/drs/system01.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=2 STAMP=857746892 file name=/u01/app/oracle/oradata/drs/example01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=3 STAMP=857746892 file name=/u01/app/oracle/oradata/drs/sysaux01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=4 STAMP=857746892 file name=/u01/app/oracle/oradata/drs/undotbs01.dbf
datafile 6 switched to datafile copy
input datafile copy RECID=5 STAMP=857746892 file name=/u01/app/oracle/oradata/drs/users01.dbf
Finished Duplicate Db at 08-SEP-14
RMAN> exit
Recovery Manager complete.
No comments:
Post a Comment