Hello All.
I am configuring a Data Guard environment. Both 11rg2 Oracle Databases are on the same server called gg.oracle.localdomain
I am following this document right here: http://romain.novalan.fr/wiki/Oracle_:_Data_Guard_with_two_single_instance_11gR2_databases#Duplicate_from_the_primary_backup
I am STUCK at the 3.6 Duplicate from the primary backup part. I have found that this document is incomplete and simply leaves all kinds of things out...
I need somebody that really knows how to configure a 2 11gr2 Database Data-Guard Environment.
Here is all my information to show you all what I have done...
hostname gg.oracle.localdomain
Here is all the information regarding the Primary Database.
ID: oradest
echo $ORACLE_HOME
/u03/app/oradest/product/11.2.0/db_dest
echo $ORACLE_SID
destiny
#########################################################################################
Now, I will list all the parameters in the destiny database that are related to the Data-Guard config.
SQL> show parameter fal
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
fal_client string destiny_prim
fal_server string source_sec
SQL> show parameter dg_broker_config_file1
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
dg_broker_config_file1 string /u03/app/oradest/oradata/desti
ny/dg1db_prim.dat
SQL> show parameter dg_broker_start
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
dg_broker_start boolean FALSE
SQL> show parameter log_archive_config
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_config string DG_CONFIG=(destiny_prim,source
_sec)
SQL> show parameter log_archive_dest_1
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_1 string LOCATION=/u03/app/oradest/flas
h_recovery_area/DESTINY/archiv
elog VALID_FOR=(ALL_LOGFILES,A
LL_ROLES) DB_UNIQUE_NAME=desti
ny_prim
SQL> show parameter log_archive_dest_2
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2 string SERVICE=source_sec VALID_FOR=(
ONLINE_LOGFILE,PRIMARY_ROLE) D
B_UNIQUE_NAME=source_sec
SQL> show parameter remote_login_passwordfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
remote_login_passwordfile string SHARED
SQL> show parameter name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_file_name_convert string
db_name string destiny
db_unique_name string destiny_prim
global_names boolean FALSE
instance_name string destiny
lock_name_space string
log_file_name_convert string
service_names string destiny_prim.oracle.localdomain
Here is my listener.ora and tnsname.ora files for the "DESTINY" PRIM database....
I'm not sure if these are right??
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
[oradest@gg admin]$ cat listener.ora
# listener.ora Network Configuration File: /u03/app/oradest/product/11.2.0/db_dest/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = gg.oracle.localdomain)(PORT = 1522))
)
SID_LIST_LISTENER2 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = DESTINY.ORACLE.LOCALDOMAIN)
(ORACLE_HOME = /u03/app/oradest/product/11.2.0/db_dest)
(SID_NAME = destiny)
)
)
ADR_BASE_LISTENER2 = /u03/app/oradest
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
[oradest@gg admin]$ cat tnsnames.ora
SOURCE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = gg.oracle.localdomain)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = source.oracle.localdomain)
)
)
DESTINY =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = gg.oracle.localdomain)(PORT = 1522))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = destiny.oracle.localdomain)
)
)
ORACLONE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = gg.oracle.localdomain)(PORT = 1523))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = oraclone.oracle.localdomain)
)
)
#######################################################################################
#######################################################################################
Now, I will list all the parameters in the oraclone database that are related to the Data-Guard config.
This is the secondary database....
Here is all the information regarding the Secondary Database.
ID: oraclone
echo $ORACLE_HOME
/u05/app/oraclone/product/11.2.0/db_5
echo $ORACLE_SID
oraclone
SQL> show parameter fal
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
fal_client string orclone_sec
fal_server string destiny_prim
SQL> show parameter dg_broker_config_file1
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
dg_broker_config_file1 string /u05/app/oraclone/oradata/orac
lone/dg1db_prim.dat
SQL> show parameter dg_broker_start
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
dg_broker_start boolean FALSE
SQL> show parameter log_archive_config
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_config string DG_CONFIG=(destiny_prim,oraclo
ne_sec)
SQL> show parameter log_archive_dest_1
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_1 string LOCATION=/u05/app/oraclone/fla
sh_recovery_area/ORACLONE/arch
ivelog VALID_FOR=(ALL_LOGFILES
,ALL_ROLES) DB_UNIQUE_NAME=ora
clone_sec
SQL> show parameter log_archive_dest_2
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2 string SERVICE=oraclone_sec VALID_FOR
=(ONLINE_LOGFILE,PRIMARY_ROLE)
DB_UNIQUE_NAME=destiny_prim
SQL> show parameter remote_login_passwordfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
remote_login_passwordfile string SHARED
SQL> show parameter name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_file_name_convert string
db_name string DESTINY >>>>>>>>>>>>>>>> IS THIS CORRECT????
db_unique_name string oraclone_sec
global_names boolean FALSE
instance_name string oraclone
lock_name_space string
log_file_name_convert string
service_names string oraclone_sec.oracle.localdomain
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>OK,
Is the Secondary Data-Guard Database supposed to have the same db_name as the Primary Database???
Here are the listener.ora and tnsnames.ora on the Secondary Database.....
I'm not sure if these are right???
[oraclone@gg admin]$ cat listener.ora
# listener.ora Network Configuration File: /u03/app/oradest/product/11.2.0/db_dest/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER3 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = gg.oracle.localdomain)(PORT = 1523))
)
SID_LIST_LISTENER3 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = ORACLONE.ORACLE.LOCALDOMAIN)
(ORACLE_HOME = /u05/app/oraclone/product/11.2.0/db_5)
(SID_NAME = oraclone)
)
)
ADR_BASE_LISTENER2 = /u05/app/oraclone
[oraclone@gg admin]$ cat tnsnames.ora
SOURCE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = gg.oracle.localdomain)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = source.oracle.localdomain)
)
)
DESTINY =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = gg.oracle.localdomain)(PORT = 1522))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = destiny.oracle.localdomain)
)
)
ORACLONE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = gg.oracle.localdomain)(PORT = 1523))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = oraclone.oracle.localdomain)
)
)
DESTINY_PRIM =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = gg.oracle.localdomain)(PORT = 1522))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = destiny_prim.oracle.localdomain)
)
)
I cannot get the DESTINY_PRIM to do a tnsping!!!!!!
NOW<
I connect to the "oraclone" database, using the oraclone environment, using the rman executable sourced as oraclone...
I issue this command, "startup nomount" for the oraclone...
NOW<
I issue this command using the oraclone environment................
rman target sys/PWD@destiny auxiliary sys/PWD
then I GET connected and this is the Feedback from RMAN....
Recovery Manager: Release 11.2.0.1.0 - Production on Mon Aug 25 22:37:44 2014
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: DESTINY (DBID=2366452012)
connected to auxiliary database: DESTINY (not mounted)
IS ths correct????
NOW I EXECUTE THE ACTUAL DUPLICATE DATABASE COMMAND....AND THIS IS WHAT I GET...
RMAN> duplicate target DATABASE FOR standby nofilenamecheck;
Starting Duplicate Db at 25-AUG-14
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=54 device type=DISK
contents of Memory Script:
{
restore clone standby controlfile;
}
executing Memory Script
Starting restore at 25-AUG-14
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: reading from backup piece /u03/app/oradest/flash_recovery_area/DESTINY_PRIM/backupset/2014_08_25/o1_mf_ncsnf_TAG20140825T012420_9zol5lqp_.bkp
channel ORA_AUX_DISK_1: piece handle=/u03/app/oradest/flash_recovery_area/DESTINY_PRIM/backupset/2014_08_25/o1_mf_ncsnf_TAG20140825T012420_9zol5lqp_.bkp tag=TAG20140825T012420
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03
output file name=/u05/app/oraclone/oradata/oraclone/control01.ctl
output file name=/u05/app/oraclone/flash_recovery_area/oraclone/control02.ctl
Finished restore at 25-AUG-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
"/u03/app/oradest/oradata/destiny/temp01.dbf";
switch clone tempfile all;
set newname for datafile 1 to
"/u03/app/oradest/oradata/destiny/system01.dbf";
set newname for datafile 2 to
"/u03/app/oradest/oradata/destiny/sysaux01.dbf";
set newname for datafile 3 to
"/u03/app/oradest/oradata/destiny/undotbs01.dbf";
set newname for datafile 4 to
"/u03/app/oradest/oradata/destiny/users01.dbf";
set newname for datafile 5 to
"/u03/app/oradest/oradata/destiny/example01.dbf";
restore
clone database
;
}
executing Memory Script
executing command: SET NEWNAME
renamed tempfile 1 to /u03/app/oradest/oradata/destiny/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 25-AUG-14
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /u03/app/oradest/oradata/destiny/system01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00002 to /u03/app/oradest/oradata/destiny/sysaux01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00003 to /u03/app/oradest/oradata/destiny/undotbs01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00004 to /u03/app/oradest/oradata/destiny/users01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00005 to /u03/app/oradest/oradata/destiny/example01.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u03/app/oradest/flash_recovery_area/DESTINY_PRIM/backupset/2014_08_25/o1_mf_nnndf_TAG20140825T012420_9zol44nk_.bkp
channel ORA_AUX_DISK_1: ORA-19870: error while restoring backup piece /u03/app/oradest/flash_recovery_area/DESTINY_PRIM/backupset/2014_08_25/o1_mf_nnndf_TAG20140825T012420_9zol44nk_.bkp
ORA-19504: failed to create file "/u03/app/oradest/oradata/destiny/system01.dbf"
ORA-27041: unable to open file
Linux-x86_64 Error: 13: Permission denied
Additional information: 4
failover to previous backup
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /u03/app/oradest/oradata/destiny/system01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00002 to /u03/app/oradest/oradata/destiny/sysaux01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00003 to /u03/app/oradest/oradata/destiny/undotbs01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00004 to /u03/app/oradest/oradata/destiny/users01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00005 to /u03/app/oradest/oradata/destiny/example01.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u03/app/oradest/flash_recovery_area/DESTINY_PRIM/backupset/2014_08_25/o1_mf_nnndf_TAG20140825T005245_9zoj8xy1_.bkp
channel ORA_AUX_DISK_1: ORA-19870: error while restoring backup piece /u03/app/oradest/flash_recovery_area/DESTINY_PRIM/backupset/2014_08_25/o1_mf_nnndf_TAG20140825T005245_9zoj8xy1_.bkp
ORA-19505: failed to identify file "/u03/app/oradest/flash_recovery_area/DESTINY_PRIM/backupset/2014_08_25/o1_mf_nnndf_TAG20140825T005245_9zoj8xy1_.bkp"
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information:
failover to previous backup
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /u03/app/oradest/oradata/destiny/system01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00002 to /u03/app/oradest/oradata/destiny/sysaux01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00003 to /u03/app/oradest/oradata/destiny/undotbs01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00004 to /u03/app/oradest/oradata/destiny/users01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00005 to /u03/app/oradest/oradata/destiny/example01.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u03/app/oradest/flash_recovery_area/DESTINY_PRIM/backupset/2014_08_25/o1_mf_nnndf_TAG20140825T004843_9zoj1d0f_.bkp
channel ORA_AUX_DISK_1: ORA-19870: error while restoring backup piece /u03/app/oradest/flash_recovery_area/DESTINY_PRIM/backupset/2014_08_25/o1_mf_nnndf_TAG20140825T004843_9zoj1d0f_.bkp
ORA-19505: failed to identify file "/u03/app/oradest/flash_recovery_area/DESTINY_PRIM/backupset/2014_08_25/o1_mf_nnndf_TAG20140825T004843_9zoj1d0f_.bkp"
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information:
failover to previous backup
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /u03/app/oradest/oradata/destiny/system01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00002 to /u03/app/oradest/oradata/destiny/sysaux01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00003 to /u03/app/oradest/oradata/destiny/undotbs01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00004 to /u03/app/oradest/oradata/destiny/users01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00005 to /u03/app/oradest/oradata/destiny/example01.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u03/app/oradest/flash_recovery_area/DESTINY_PRIM/backupset/2014_08_23/o1_mf_nnndf_TAG20140823T190612_9zl7m6xg_.bkp
channel ORA_AUX_DISK_1: ORA-19870: error while restoring backup piece /u03/app/oradest/flash_recovery_area/DESTINY_PRIM/backupset/2014_08_23/o1_mf_nnndf_TAG20140823T190612_9zl7m6xg_.bkp
ORA-19505: failed to identify file "/u03/app/oradest/flash_recovery_area/DESTINY_PRIM/backupset/2014_08_23/o1_mf_nnndf_TAG20140823T190612_9zl7m6xg_.bkp"
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information:
failover to previous backup
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /u03/app/oradest/oradata/destiny/system01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00002 to /u03/app/oradest/oradata/destiny/sysaux01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00003 to /u03/app/oradest/oradata/destiny/undotbs01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00004 to /u03/app/oradest/oradata/destiny/users01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00005 to /u03/app/oradest/oradata/destiny/example01.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u03/app/oradest/flash_recovery_area/DESTINY_PRIM/backupset/2014_08_23/o1_mf_nnndf_TAG20140823T163736_9zkywp8n_.bkp
channel ORA_AUX_DISK_1: ORA-19870: error while restoring backup piece /u03/app/oradest/flash_recovery_area/DESTINY_PRIM/backupset/2014_08_23/o1_mf_nnndf_TAG20140823T163736_9zkywp8n_.bkp
ORA-19505: failed to identify file "/u03/app/oradest/flash_recovery_area/DESTINY_PRIM/backupset/2014_08_23/o1_mf_nnndf_TAG20140823T163736_9zkywp8n_.bkp"
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information:
failover to previous backup
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 08/25/2014 22:41:11
RMAN-05556: not all datafiles have backups that can be recovered to SCN consistent
RMAN-03015: error occurred in stored script Memory Script
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 5 found to restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore
IT'S like it's trying to OverWrite the Primary database instead of creating the new Secondary Database.....
PLEASE HELP......