Configuring Data guard
Hi,
I am planning to configure data guard 11.1.0.7 on Redhat Linux 5. I would just like to have suggestions regarding failover/switchover strategy. I would like gurus here to shared their knowledge about how to configure the failover/switchover. I have following points in mind regarding this.
1. Add an entry for the standby database in the connect string's "Address" portion so that if primary is not available after failover/switchover, client automatically start connecting to the standby
OR
2. Afgter failover/switchover, change the database alias in the DNS and primary host name alias should start pointing to the standby database host so that now clients start connecting with the standby database not.
Or, any other preferred way?
Thanks in advance
Salman
Uwe Hesse, I saw your document. How we can implement it in a RAC environment wheren we have two nodes RAC (client side load balancing is on) and we have a single node Standby. In this case, we would need to add another row in ADDRESS parameter in TNSNAMES, but, how it will be handeled because client side load balancing is on and if we add standby ADDRESS, load balancing will also try to use this third entry of Standby database.Refer some more documents
Configuring Oracle Database 11g with Oracle Data Guard
http://download.oracle.com/docs/cd/B28359_01/server.111/b28282/configbp006.htm
http://www.oracle.com/technetwork/database/features/availability/twp-dataguard-11gr2-1-131981.pdf
11gR1 Data Guard Portal [ID 798974.1]
Switchover&Failover
Oracle10g: Data Guard Switchover and Failover Best Practices [ID 387266.1]
Similar Messages
-
Configure data guard broker on Oracle 11.2.0.1
Our primary is a 3 node RAC of 11.2.0.1 on Redhat 5.2. The physical standby is a single instance on redhat 5.2. After configured data guard, I am trying to configure data guard broker following docOracle® Data Guard Broker 11g Release 2 (11.2)
E10702-01
It says to add a entry to the listener.ora file
LISTENER = (DESCRIPTION =
(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=host_name)
(PORT=port_num))))
SID_LIST_LISTENER=(SID_LIST=(SID_DESC=(SID_NAME=sid_name)
(GLOBAL_DBNAME=db_unique_name_DGMGRL.db_domain)
(ORACLE_HOME=oracle_home)))My lstener.ora under grid_home is LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))) # line added by Agent
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))) # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by AgentAfter addedLISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = cchORdb1)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = cchprd_DGMGRL)
(SID_NAME = cchprd)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
)I started the listener and got errorLSNRCTL> start
Starting /u01/app/grid/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /u01/app/grid/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/cchORdb1/listener/alert/log.xml
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=cchORdb1)(PORT=1521)))
TNS-12542: TNS:address already in use
TNS-12560: TNS:protocol adapter error
TNS-00512: Address already in use
Linux Error: 98: Address already in use
Listener failed to start. See the error message(s) above..Without the Listener and SID_LIST_LISTENER entries, the grid infrastucture appear to manage a default listener and works OK. After add these, it appears to conflick with the default setting. I also tried to add a different listener name, then I got messge LISTENER is already startedHow should one handle this problem?
Thanks.Shutdown the listener and check for white spaces in the file. Try to restart it. If if fails review against my example below.
Here is my working example:
PRIMARY
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = primary.myserver.com)(PORT = 1521))
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0)
(PROGRAM = extproc)
(SID_DESC =
(global_dbname = PRIMARY_DGMGRL.myserver.com)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0)
(SID_NAME = PRIMARY)
STANDBY
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = standby.mydomain.com)(PORT = 1521))
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0)
(PROGRAM = extproc)
(SID_DESC =
(global_dbname = STANDBY_DGMGRL.mydomain.com)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0)
(sid_name = STANDBY)
ADR_BASE_LISTENER = /u01/app/oracle
INBOUND_CONNECT_TIMEOUT_LISTENER=120
When I first tried to setup this up several months ago I had this issue:
ORA-12514 during SWITCHOVER
Problem: You perform a switchover using DGMGRL. Though the switchover itself completes successful, databases don't get started up again. Instead, DGMGRL output holds an
ORA-12514: TNS:listener does not currently know of service requested in connect
Cause: This is a configuration issue: DGMGRL needs a special entry in the listener.ora.
Solution: Details on this can be found in the Metalink note 308943.1. Make sure both, your primary and standby database have an explicit entry in the listener.ora like this:
SID_LIST_LISTENER = (
SID_LIST = (
SID_DESC = ( GLOBAL_DBNAME = <db_unique_name>DGMGRL.<dbdomain> )
( SERVICE_NAME = <db_unique_name>.<db_domain> )
( SID_NAME = <ORACLE_SID> )
( ORACLE_HOME = <ORACLE_HOME> )
Take special care, that:
* <db_unique_name> reflects the databases unique name (SHOW PARAMETER db_unique_name)
* <db_domain> reflects the databases domain (SHOW PARAMETER db_domain)
* <ORACLE_SID> and <ORACLE_HOME> reflect the corresponding settings of the database
Having adjusted your listener.ora files, restart the listener (lsnrctl stop && lsnrctl start). Give your databases a few minutes to register with the listener again, and then - just to be on the safe side - let the listener tell you its configuration: lsnrctl status && lsnrctl services. Check the output if everything matches.
Edited by: mseberg on Dec 10, 2010 8:01 AM -
Help for configuring Data Guard Broker
Hi All,
Can any body help me in configuring data guard broker for oracle 9i on windows.
What are all requirements needed. I already configured physical standby database.
I did this is on my laptop using vm-ware. One node is having Primary database and
second node is having standby database. Now I am planning to use DG broker on primary node.
Regards
KiranHere's the help you need:
http://tahiti.oracle.com.
Without version information (what does 9i mean?) no further help is possible.
Please also be advised that VMware is unsupported so if you run into issues you are on your own. -
Hi Hussein,
We have Configure the Standby database for our 11.5.10.2 application database, I have configured standby database(data guard) for only oracle 10g but not for apps, please let me know what are all the steps to carry out this activity
REgds
BilalHi Bilal,
Please refer to the following notes, it should be helpful.
Note: 403347.1 - MAA Roadmap for the E-Business Suite
https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=403347.1
Note: 216212.1 - Business Continuity for Oracle Applications Release 11i, Database Releases 9i and 10g
https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=216212.1
Note: 464167.1 - Is Logical Standby Feature Supported For Oracle Applications Release 11i
https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=464167.1
Regards,
Hussein -
Parameters need to configure Data Guard with Data Guard Broker
Hi gurus,
I'm following this guide http://www.oracle.com/us/solutions/sap/wp-ora4sap-dataguard11g-303811.pdf, but it isn't clarify what parameters we need to set to get the service up.
I noticed that we can setting up for two ways, either Oracle Enterprise Manager or Data Guard Broker. Do we need to configure the same parameters to OEM and after to activate the DGMGRL?
Can you help me?
Thanks,
Denis
BrazilHi mseberg,
Thanks for your help.
I want to adjust my listener.ora and tnsnames.ora files to access the rman like this guide https://sites.google.com/site/universodobraga/oracle/standby-11g.
Follow its:
* Primary*
listener.ora
LISTENER =
(ADDRESS_LIST =
(ADDRESS=
(PROTOCOL=IPC)
(KEY= TSA.WORLD)
(ADDRESS=
(PROTOCOL=IPC)
(KEY= TSA)
(ADDRESS =
(COMMUNITY = SAP.WORLD)
(PROTOCOL = TCP)
(HOST = unbru11)
(PORT = 1527)
STARTUP_WAIT_TIME_LISTENER = 0
CONNECT_TIMEOUT_LISTENER = 10
TRACE_LEVEL_LISTENER = OFF
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SDU = 32768)
(GLOBAL_DBNAME = primarydb_DGMGRL)
(SERVICE_NAME = tsa)
(SID_NAME = tsa)
(ORACLE_HOME = /oracle/TSA/112_64)
tnsnames.ora
TSA_PRIMARY.WORLD=
(DESCRIPTION =
(SDU = 32768)
(ADDRESS_LIST =
(ADDRESS =
(COMMUNITY = SAP.WORLD)
(PROTOCOL = TCP)
(HOST = unbru11)
(PORT = 1527)
(CONNECT_DATA =
(SID = tsa)
(GLOBAL_NAME = tsa.WORLD)
(SERVICE_NAME = primarydb_DGMGRL)
TSA_STANDBY.WORLD=
(DESCRIPTION =
(SDU = 32768)
(ADDRESS_LIST =
(ADDRESS =
(COMMUNITY = SAP.WORLD)
(PROTOCOL = TCP)
(HOST = unbru10)
(PORT = 1527)
(CONNECT_DATA =
(SID = tsa)
(GLOBAL_NAME = tsa.WORLD)
(SERVICE_NAME = standbydb_DGMGRL)
- Standby
listener.ora
LISTENER =
(ADDRESS_LIST =
(ADDRESS=
(PROTOCOL=IPC)
(KEY= TSA.WORLD)
(ADDRESS=
(PROTOCOL=IPC)
(KEY= TSA)
(ADDRESS =
(COMMUNITY = SAP.WORLD)
(PROTOCOL = TCP)
(HOST = unbru10)
(PORT = 1527)
STARTUP_WAIT_TIME_LISTENER = 0
CONNECT_TIMEOUT_LISTENER = 10
TRACE_LEVEL_LISTENER = OFF
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SDU = 32768)
(GLOBAL_DBNAME = standbydb_DGMGRL)
(SERVICE_NAME = tsa)
(SID_NAME = tsa)
(ORACLE_HOME = /oracle/TSA/112_64)
tnsnames.ora
TSA_PRIMARY.WORLD=
(DESCRIPTION =
(SDU = 32768)
(ADDRESS_LIST =
(ADDRESS =
(COMMUNITY = SAP.WORLD)
(PROTOCOL = TCP)
(HOST = unbru11)
(PORT = 1527)
(CONNECT_DATA =
(SID = tsa)
(GLOBAL_NAME = tsa.WORLD)
(SERVICE_NAME = primarydb_DGMGRL)
TSA_STANDBY.WORLD=
(DESCRIPTION =
(SDU = 32768)
(ADDRESS_LIST =
(ADDRESS =
(COMMUNITY = SAP.WORLD)
(PROTOCOL = TCP)
(HOST = unbru10)
(PORT = 1527)
(CONNECT_DATA =
(SID = tsa)
(GLOBAL_NAME = tsa.WORLD)
(SERVICE_NAME = standbydb_DGMGRL)
When i tried to connect by RMAN:
RMAN> connect target sys/manager@tns_primary.world
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
ORA-01031: insufficient privileges
Environment
Oracle 11.2.0.3
Aix 6.1
SAP Ecc
Thanks very much,
Denis
Brazil -
Configuring Data Guard on 2 different instance in same machine
Hi All,
I am new to the Data Guard concept. I am using Oracle 10g (Release 10.2.0.1.0) in Windows 7 environment . I have created 2 database instance its running fine.
For testing purpose, Is it possible to implement Data Guard concept between 2 instance in the same machine? whether it will impact any problem?
Thanks & Regards
Sami.You would use the same one. That is, you would not have a separate tnsnames.ora and listener.ora.
What I was trying to say is you still need to add the SID_LIST_LISTENER lines that Data Guard uses
Example
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0)
(PROGRAM = extproc)
(SID_DESC =
(global_dbname = PRIMARY_DGMGRL.uservices.umn.edu)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0)
(sid_name = PRIMARY)
TNS Example
STANDBY =
(DESCRIPTION =
(SDU=32767)
(SEND_BUF_SIZE=2092500)
(RECV_BUF_SIZE=2092500)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = HOSTNAME)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = STANDBY)
Best Regards
mseberg (Its very late here) -
Configuring data guard: how many standby redolog do I need?
Hi all, I want to add a standby databse to my RAC test environment but I don't understanad how many redolog I need.
The main db is a 2 node RAC (10.2.0.4.0); every node has 3 log groups; every log group has 2 logfile (every log group is multiplexed on DG_DATA1/ASR/ and FLASH_RECOVERY_AREA/ASR/ )
The standby db will have all its datafile on the same filesystem, so I already configured the trasnslations parameters:
DB_FILE_NAME_CONVERT='/opt/oracle/app/oracle/oradata1/ASRSB','+DG_DATA1/ASR','/opt/oracle/app/oracle/oradata2/ASRSB','+FLASH_RECOVERY_AREA/ASR'
LOG_FILE_NAME_CONVERT='/opt/oracle/app/oracle/oradata1/ASRSB','+DG_DATA1/ASR','/opt/oracle/app/oracle/oradata2/ASRSB','+FLASH_RECOVERY_AREA/ASR'
Replication via rman works well, but I have to manually add the standby redolog on the standby db and which formula to use to calculate the number of the standby redolog needed. Which is the correct formula between :
1)
# of standby log = ( # of redolog files + 1) * # of thread = (6 +1)*2 = 14 standby redolog files
2)
# of standby log = ( # of redolog groups + 1) * # of thread = (3 +1)*2 = 8 standby redolog files
thanks,
andreaAndrea,
I think 8 should be the answer on your question. Because you have 3 log groups and 2 threads therefore (3+1)*2 = 8.
According to the documentation :
http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/create_ps.htm#SBYDB00426
Minimally, the configuration should have one more standby redo log file group than the number of online redo log file groups on the primary database. However, the recommended number of standby redo log file groups is dependent on the number of threads on the primary database. Use the following equation to determine an appropriate number of standby redo log file groups:
(maximum number of logfiles for each thread + 1) * maximum number of threads
I think you may get confused with maximum number of logfiles. But sometimes logfile is used as a synonym to log group. The actual log group files are usually called log members. (for instance MAXLOGFILES parameter specifies the maximum number of log groups and MAXLOGMEMBERS specifies the maximum number of members for each group).
Each additional member in a redo log group is just a multiplexed copy. You can also consider multiplexing the standby redo log files, the same why you do for redo log members.
In order to learn more about the usage, benefits and limitations of Standby Redo Logs (SRL) you can refer to Metalink Note 2193444.1.
I hope this helps.
--Mihajlo -
Data Guard Broker configuration in oracle10g r2
Hi,
I am facing difficulties while configuring data guard broker. Our setup is RAC primary and single standby database. Show configuration is raising the following error...
ORA-16607: one or more databases have failed
on dcSTANDBY.log file it shows below messages....
NSV0: Failed to connect to remote database ajmprod. Error is ORA-12545
NSV0: Failed to send message to site ajmprod. Error code is ORA-12545.
I have checked listener.ora and tnsnames.ora are fine. It's fine with tnsping and sqlplus conection. I am confused where is the problem.
Aprreciate your suggestions.Here is how I would look into this issue.
1. check the password file is setup for both and the password is common between them and matches the password of the sys user in the database.
2. check that listener(s) are up and running and status checks out.
3. check that you hosts file or DNS sees this hosts, you can check this with a ping command do from each host to the other
4. check that tnsnames.ora has the proper connect setup for both instances in you data guard configuration.
5. check tnsping to both instances from both hosts.
6. check all TNS connectivity to both instances using the SYS as sysdba, Use the TNS sqlplus sys@db as sysdba. Do this connection from both hosts if using more then one host.
If you have verified all this and it is still not working let me know and we can move on to next steps. -
Data Guard configuration-Archivelogs not being transferred
Hi Gurus,
I have configured data guard in Linux with 10g oracle, although I am new to this concept. My tnsping is working well both sides. I have issued alter database recover managed standby using current logfile disconnect command in standby site. But I am not receiving the archive logs in the standby site. I have attached my both pfiles below for your reference:
Primary database name: Chennai
Secondary database name: Mumbai
PRIMARY PFILE:
db_block_size=8192
db_file_multiblock_read_count=16
open_cursors=300
db_domain=""
background_dump_dest=/u01/app/oracle/product/10.2.0/db_1/admin/chennai/bdump
core_dump_dest=/u01/app/oracle/product/10.2.0/db_1/admin/chennai/cdump
user_dump_dest=/u01/app/oracle/product/10.2.0/db_1/admin/chennai/udump
db_create_file_dest=/u01/app/oracle/product/10.2.0/db_1/oradata
db_recovery_file_dest=/u01/app/oracle/product/10.2.0/db_1/flash_recovery_area
db_recovery_file_dest_size=2147483648
job_queue_processes=10
compatible=10.2.0.1.0
processes=150
sga_target=285212672
audit_file_dest=/u01/app/oracle/product/10.2.0/db_1/admin/chennai/adump
remote_login_passwordfile=EXCLUSIVE
dispatchers="(PROTOCOL=TCP) (SERVICE=chennaiXDB)"
pga_aggregate_target=94371840
undo_management=AUTO
undo_tablespace=UNDOTBS1
control_files=("/u01/app/oracle/product/10.2.0/db_1/oradata/CHENNAI/controlfile/o1_mf_82gl1b43_.ctl", "/u01/app/oracle/product/10.2.0/db_1/flash_recovery_area/CHENNAI/controlfile/o1_mf_82gl1bny_.ctl")
DB_NAME=chennai
DB_UNIQUE_NAME=chennai
LOG_ARCHIVE_CONFIG='DG_CONFIG=(chennai,mumbai)'
LOG_ARCHIVE_DEST_1=
'LOCATION=/u01/app/oracle/product/10.2.0/db_1/oradata/CHENNAI/datafile/arch/
VALID_FOR=(ALL_LOGFILES,ALL_ROLES)
DB_UNIQUE_NAME=chennai'
LOG_ARCHIVE_DEST_2=
'SERVICE=MUMBAI LGWR ASYNC
VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)
DB_UNIQUE_NAME=mumbai'
LOG_ARCHIVE_DEST_STATE_1=ENABLE
LOG_ARCHIVE_DEST_STATE_2=ENABLE
REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE
LOG_ARCHIVE_FORMAT=%t_%s_%r.arc
LOG_ARCHIVE_MAX_PROCESSES=30
FAL_SERVER=mumbai
FAL_CLIENT=chennai
DB_FILE_NAME_CONVERT=(/home/oracle/oracle/product/10.2.0/db_1/oradata/MUMBAI/datafile/,/u01/app/oracle/product/10.2.0/db_1/oradata/CHENNAI/datafile/)
LOG_FILE_NAME_CONVERT='/home/oracle/oracle/product/10.2.0/db_1/oradata/MUMBAI/onlinelog/','/u01/app/oracle/product/10.2.0/db_1/oradata/CHENNAI/onlinelog/','/home/oracle/oracle/product/10.2.0/db_1/flash_recovery_area/MUMBAI/onlinelog/','/u01/app/oracle/product/10.2.0/db_1/flash_recovery_area/CHENNAI/onlinelog/'
STANDBY_FILE_MANAGEMENT=AUTO
SECONDARY PFILE:
db_block_size=8192
db_file_multiblock_read_count=16
open_cursors=300
db_domain=""
db_name=chennai
background_dump_dest=/home/oracle/oracle/product/10.2.0/db_1/admin/mumbai/bdump
core_dump_dest=/home/oracle/oracle/product/10.2.0/db_1/admin/mumbai/cdump
user_dump_dest=/home/oracle/oracle/product/10.2.0/db_1/admin/mumbai/udump
db_recovery_file_dest=/home/oracle/oracle/product/10.2.0/db_1/flash_recovery_area/
db_create_file_dest=/home/oracle/oracle/product/10.2.0/db_1/oradata/
db_recovery_file_dest_size=2147483648
job_queue_processes=10
compatible=10.2.0.1.0
processes=150
sga_target=285212672
audit_file_dest=/home/oracle/oracle/product/10.2.0/db_1/admin/mumbai/adump
remote_login_passwordfile=EXCLUSIVE
dispatchers="(PROTOCOL=TCP) (SERVICE=mumbaiXDB)"
pga_aggregate_target=94371840
undo_management=AUTO
undo_tablespace=UNDOTBS1
control_files="/home/oracle/oracle/product/10.2.0/db_1/oradata/MUMBAI/controlfile/standby01.ctl","/home/oracle/oracle/product/10.2.0/db_1/flash_recovery_area/MUMBAI/controlfile/standby02.ctl"
DB_UNIQUE_NAME=mumbai
LOG_ARCHIVE_CONFIG='DG_CONFIG=(chennai,mumbai)'
LOG_ARCHIVE_DEST_1='LOCATION=/home/oracle/oracle/product/10.2.0/db_1/oradata/MUMBAI/datafile/arch/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=mumbai'
LOG_ARCHIVE_DEST_2='SERVICE=chennai LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=chennai'
LOG_ARCHIVE_DEST_STATE_1=ENABLE
LOG_ARCHIVE_DEST_STATE_2=ENABLE
REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE
LOG_ARCHIVE_FORMAT=%t_%s_%r.arc
FAL_SERVER=chennai
FAL_CLIENT=mumbai
DB_FILE_NAME_CONVERT=(/u01/app/oracle/product/10.2.0/db_1/oradata/CHENNAI/datafile/,/home/oracle/oracle/product/10.2.0/db_1/oradata/MUMBAI/datafile/)
LOG_FILE_NAME_CONVERT='/u01/app/oracle/product/10.2.0/db_1/oradata/CHENNAI/onlinelog/','/home/oracle/oracle/product/10.2.0/db_1/oradata/MUMBAI/onlinelog/','/u01/app/oracle/product/10.2.0/db_1/flash_recovery_area/CHENNAI/onlinelog/','/home/oracle/oracle/product/10.2.0/db_1/flash_recovery_area/MUMBAI/onlinelog/'
STANDBY_FILE_MANAGEMENT=AUTO
Any help would be greatly appreciated. Kindly, help me someone please..
-Vimal.Thanks Balazs, Mseberg, CKPT for all your replies...
CKPT....I just did what you said..Comes below primary output & standby output...
PRIMARY_
SQL> set feedback off
SQL> set trimspool on
SQL> set line 500
SQL> set pagesize 50
SQL> column name for a30
SQL> column display_value for a30
SQL> column ID format 99
SQL> column "SRLs" format 99
SQL> column active format 99
SQL> col type format a4
SQL> column ID format 99
SQL> column "SRLs" format 99
SQL> column active format 99
SQL> col type format a4
SQL> col PROTECTION_MODE for a20
SQL> col RECOVERY_MODE for a20
SQL> col db_mode for a15
SQL> SELECT name, display_value FROM v$parameter WHERE name IN ('db_name','db_unique_name','log_archive_config','log_archive_dest_2','log_archive_dest_state_2','fal_client','fal_server','standby_file_management','standby_archive_dest','db_file_name_convert','log_file_name_convert','remote_login_passwordfile','local_listener','dg_broker_start','dg_broker_config_file1','dg_broker_config_file2','log_archive_max_processes') order by name;
NAME DISPLAY_VALUE
db_file_name_convert /home/oracle/oracle/product/10
.2.0/db_1/oradata/MUMBAI/dataf
ile/, /u01/app/oracle/product/
10.2.0/db_1/oradata/CHENNAI/da
tafile/
db_name chennai
db_unique_name chennai
dg_broker_config_file1 /u01/app/oracle/product/10.2.0
/db_1/dbs/dr1chennai.dat
dg_broker_config_file2 /u01/app/oracle/product/10.2.0
/db_1/dbs/dr2chennai.dat
dg_broker_start FALSE
fal_client chennai
fal_server mumbai
local_listener
log_archive_config DG_CONFIG=(chennai,mumbai)
log_archive_dest_2 SERVICE=MUMBAI LGWR ASYNC
VALID_FOR=(ONLINE_LOGFILES,P
RIMARY_ROLE)
DB_UNIQUE_NAME=mumbai
log_archive_dest_state_2 ENABLE
log_archive_max_processes 30
log_file_name_convert /home/oracle/oracle/product/10
.2.0/db_1/oradata/MUMBAI/onlin
elog/, /u01/app/oracle/product
/10.2.0/db_1/oradata/CHENNAI/o
nlinelog/, /home/oracle/oracle
/product/10.2.0/db_1/flash_rec
overy_area/MUMBAI/onlinelog/,
/u01/app/oracle/product/10.2.0
/db_1/flash_recovery_area/CHEN
NAI/onlinelog/
remote_login_passwordfile EXCLUSIVE
standby_archive_dest ?/dbs/arch
standby_file_management AUTO
SQL> col name for a10
SQL> col DATABASE_ROLE for a10
SQL> SELECT name,db_unique_name,protection_mode,DATABASE_ROLE,OPEN_MODE,switchover_status from v$database;
NAME DB_UNIQUE_NAME PROTECTION_MODE DATABASE_R OPEN_MODE SWITCHOVER_STATUS
CHENNAI chennai MAXIMUM PERFORMANCE PRIMARY READ WRITE NOT ALLOWED
SQL> select thread#,max(sequence#) from v$archived_log group by thread#;
THREAD# MAX(SEQUENCE#)
1 210
SQL> SELECT ARCH.THREAD# "Thread", ARCH.SEQUENCE# "Last Sequence Received", APPL.SEQUENCE# "Last Sequence Applied", (ARCH.SEQUENCE# - APPL.SEQUENCE#) "Difference"
2 FROM
3 (SELECT THREAD# ,SEQUENCE# FROM V$ARCHIVED_LOG WHERE (THREAD#,FIRST_TIME ) IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$ARCHIVED_LOG GROUP BY THREAD#)) ARCH,
4 (SELECT THREAD# ,SEQUENCE# FROM V$LOG_HISTORY WHERE (THREAD#,FIRST_TIME ) IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$LOG_HISTORY GROUP BY THREAD#)) APPL
5 WHERE ARCH.THREAD# = APPL.THREAD# ORDER BY 1;
Thread Last Sequence Received Last Sequence Applied Difference
1 210 210 0
SQL> col severity for a15
SQL> col message for a70
SQL> col timestamp for a20
SQL> select severity,error_code,to_char(timestamp,'DD-MON-YYYY HH24:MI:SS') "timestamp" , message from v$dataguard_status where dest_id=2;
SEVERITY ERROR_CODE timestamp MESSAGE
Error 16191 15-AUG-2012 12:46:02 LGWR: Error 16191 creating archivelog file 'MUMBAI'
Error 16191 15-AUG-2012 12:46:02 FAL[server, ARC1]: Error 16191 creating remote archivelog file 'MUMBAI
Error 16191 15-AUG-2012 12:51:58 PING[ARCb]: Heartbeat failed to connect to standby 'MUMBAI'. Error is
16191.
Error 16191 15-AUG-2012 12:56:58 PING[ARCb]: Heartbeat failed to connect to standby 'MUMBAI'. Error is
16191.
Error 16191 15-AUG-2012 13:01:58 PING[ARCb]: Heartbeat failed to connect to standby 'MUMBAI'. Error is
16191.
Error 16191 15-AUG-2012 13:06:58 PING[ARCb]: Heartbeat failed to connect to standby 'MUMBAI'. Error is
16191.
Error 16191 15-AUG-2012 13:11:58 PING[ARCb]: Heartbeat failed to connect to standby 'MUMBAI'. Error is
16191.
Error 16191 15-AUG-2012 13:16:59 PING[ARCb]: Heartbeat failed to connect to standby 'MUMBAI'. Error is
16191.
Error 16191 15-AUG-2012 13:21:59 PING[ARCb]: Heartbeat failed to connect to standby 'MUMBAI'. Error is
16191.
Error 16191 15-AUG-2012 13:26:59 PING[ARCb]: Heartbeat failed to connect to standby 'MUMBAI'. Error is
16191.
Error 16191 15-AUG-2012 13:31:59 PING[ARCb]: Heartbeat failed to connect to standby 'MUMBAI'. Error is
16191.
Error 16191 15-AUG-2012 13:36:59 PING[ARCb]: Heartbeat failed to connect to standby 'MUMBAI'. Error is
16191.
Error 16191 15-AUG-2012 13:41:59 PING[ARCb]: Heartbeat failed to connect to standby 'MUMBAI'. Error is
16191.
Error 16191 15-AUG-2012 13:47:00 PING[ARCb]: Heartbeat failed to connect to standby 'MUMBAI'. Error is
16191.
Error 16191 15-AUG-2012 13:52:00 PING[ARCb]: Heartbeat failed to connect to standby 'MUMBAI'. Error is
16191.
Error 16191 15-AUG-2012 13:57:00 PING[ARCb]: Heartbeat failed to connect to standby 'MUMBAI'. Error is
16191.
Error 16191 15-AUG-2012 14:02:00 PING[ARCb]: Heartbeat failed to connect to standby 'MUMBAI'. Error is
SEVERITY ERROR_CODE timestamp MESSAGE
16191.
Error 16191 15-AUG-2012 14:07:00 PING[ARCb]: Heartbeat failed to connect to standby 'MUMBAI'. Error is
16191.
Error 16191 15-AUG-2012 14:12:01 PING[ARCb]: Heartbeat failed to connect to standby 'MUMBAI'. Error is
16191.
Error 16191 15-AUG-2012 14:17:01 PING[ARCb]: Heartbeat failed to connect to standby 'MUMBAI'. Error is
16191.
Error 16191 15-AUG-2012 14:22:01 PING[ARCb]: Heartbeat failed to connect to standby 'MUMBAI'. Error is
16191.
Error 16191 15-AUG-2012 14:27:01 PING[ARCb]: Heartbeat failed to connect to standby 'MUMBAI'. Error is
16191.
Error 16191 15-AUG-2012 14:32:01 PING[ARCb]: Heartbeat failed to connect to standby 'MUMBAI'. Error is
16191.
Error 16191 15-AUG-2012 14:37:03 PING[ARCb]: Heartbeat failed to connect to standby 'MUMBAI'. Error is
16191.
Error 16191 15-AUG-2012 18:21:40 PING[ARCb]: Heartbeat failed to connect to standby 'MUMBAI'. Error is
16191.
Error 16191 15-AUG-2012 18:26:41 PING[ARCb]: Heartbeat failed to connect to standby 'MUMBAI'. Error is
16191.
SQL> select ds.dest_id id
2 , ad.status
3 , ds.database_mode db_mode
4 , ad.archiver type
5 , ds.recovery_mode
6 , ds.protection_mode
7 , ds.standby_logfile_count "SRLs"
8 , ds.standby_logfile_active active
9 , ds.archived_seq#
10 from v$archive_dest_status ds
11 , v$archive_dest ad
12 where ds.dest_id = ad.dest_id
13 and ad.status != 'INACTIVE'
14 order by
15 ds.dest_id;
ID STATUS DB_MODE TYPE RECOVERY_MODE PROTECTION_MODE SRLs ACTIVE ARCHIVED_SEQ#
1 VALID OPEN ARCH IDLE MAXIMUM PERFORMANCE 0 0 210
2 ERROR UNKNOWN LGWR UNKNOWN MAXIMUM PERFORMANCE 0 0 0
SQL> column FILE_TYPE format a20
SQL> col name format a60
SQL> select name
2 , floor(space_limit / 1024 / 1024) "Size MB"
3 , ceil(space_used / 1024 / 1024) "Used MB"
4 from v$recovery_file_dest
5 order by name;
NAME Size MB Used MB
/u01/app/oracle/product/10.2.0/db_1/flash_recovery_area 2048 896
SQL> spool offspool u01/app/oracle/vimal.log
SP2-0768: Illegal SPOOL command
Usage: SPOOL { <file> | OFF | OUT }
where <file> is file_name[.ext] [CRE[ATE]|REP[LACE]|APP[END]]
SQL> spool /u01/app/oracle/vimal.log
Standby output_
SQL> set feedback off
SQL> set trimspool on
SQL> set line 500
SQL> set pagesize 50
SQL> set linesize 200
SQL> column name for a30
SQL> column display_value for a30
SQL> col value for a10
SQL> col PROTECTION_MODE for a15
SQL> col DATABASE_Role for a15
SQL> SELECT name, display_value FROM v$parameter WHERE name IN ('db_name','db_unique_name','log_archive_config','log_archive_dest_2','log_archive_dest_state_2','fal_client','fal_server','standby_file_management','standby_archive_dest','db_file_name_convert','log_file_name_convert','remote_login_passwordfile','local_listener','dg_broker_start','dg_broker_config_file1','dg_broker_config_file2','log_archive_max_processes') order by name;
NAME DISPLAY_VALUE
db_file_name_convert /u01/app/oracle/product/10.2.0
/db_1/oradata/CHENNAI/datafile
/, /home/oracle/oracle/product
/10.2.0/db_1/oradata/MUMBAI/da
tafile/
db_name chennai
db_unique_name mumbai
dg_broker_config_file1 /home/oracle/oracle/product/10
.2.0/db_1/dbs/dr1mumbai.dat
dg_broker_config_file2 /home/oracle/oracle/product/10
.2.0/db_1/dbs/dr2mumbai.dat
dg_broker_start FALSE
fal_client mumbai
fal_server chennai
local_listener
log_archive_config DG_CONFIG=(chennai,mumbai)
log_archive_dest_2 SERVICE=chennai LGWR ASYNC VAL
ID_FOR=(ONLINE_LOGFILES,PRIMAR
Y_ROLE) DB_UNIQUE_NAME=chennai
log_archive_dest_state_2 ENABLE
log_archive_max_processes 2
log_file_name_convert /u01/app/oracle/product/10.2.0
/db_1/oradata/CHENNAI/onlinelo
g/, /home/oracle/oracle/produc
t/10.2.0/db_1/oradata/MUMBAI/o
nlinelog/, /u01/app/oracle/pro
duct/10.2.0/db_1/flash_recover
y_area/CHENNAI/onlinelog/, /ho
me/oracle/oracle/product/10.2.
0/db_1/flash_recovery_area/MUM
BAI/onlinelog/
remote_login_passwordfile EXCLUSIVE
standby_archive_dest ?/dbs/arch
standby_file_management AUTO
SQL> col name for a10
SQL> col DATABASE_ROLE for a10
SQL> SELECT name,db_unique_name,protection_mode,DATABASE_ROLE,OPEN_MODE from v$database;
NAME DB_UNIQUE_NAME PROTECTION_MODE DATABASE_R OPEN_MODE
CHENNAI mumbai MAXIMUM PERFORM PHYSICAL S MOUNTED
ANCE TANDBY
SQL> select thread#,max(sequence#) from v$archived_log where applied='YES' group by thread#;
SQL> select process, status,thread#,sequence# from v$managed_standby;
PROCESS STATUS THREAD# SEQUENCE#
ARCH CONNECTED 0 0
ARCH CONNECTED 0 0
MRP0 WAIT_FOR_LOG 1 152
SQL> col name for a30
SQL> select * from v$dataguard_stats;
NAME VALUE UNIT TIME_COMPUTED
apply finish time day(2) to second(1) interval
apply lag day(2) to second(0) interval
estimated startup time 10 second
standby has been open N
transport lag day(2) to second(0) interval
SQL> select * from v$archive_gap;
SQL> col name format a60
SQL> select name
2 , floor(space_limit / 1024 / 1024) "Size MB"
3 , ceil(space_used / 1024 / 1024) "Used MB"
4 from v$recovery_file_dest
5 order by name;
NAME Size MB Used MB
/home/oracle/oracle/product/10.2.0/db_1/flash_recovery_area/ 2048 150
SQL> spool off
-Vimal. -
How to configure Enterprise Manager in Active Data Guard?
Hi,
I have installed oracle 11g r2 rac with asm in two nodes. OS is hp-Unix.
I have installed oracle11g Active Data Guard using Single alone Database.
Both RAc and Active Data Guard works fine.
I have not configure Data Guard Broker.
Question: How to configure Enterprise Manager in Active Data Guard?
Thanks
Solaimanhttp://www.gokhanatil.com/2012/04/manage-your-existing-data-guards-with.html
-
Init SID .ora during configuration of Data Guard - advice required
Hi All,
I am looking to implement data guard across 2 RAC clusters. One cluster will be primary and the other is for Disaster Recovery.
I have already set up the two 11g R 2 RAC clusters on RHEL 5 and now need some pointers to good docs for data guard install.
Can some one direct me to good step by step info for configuring data guard between to RAC clusters - detailed explanations of each step would be useful too, in particular around the init.ora file configuration changes between the primary and DR sites
Much appreciated
SteveHi Steve,
look at the MAA Whitepapers:
http://www.oracle.com/technetwork/database/features/availability/oracle-database-maa-best-practices-155386.html
There are very good ressources in setting up RAC DG environments like:
Data Guard 11g Installation and Configuration Best Practices on Oracle RAC
Rapid Oracle RAC Standby Deployment: Oracle Database 11g Release 2
Setup Guide: Creating a RAC Logical Standby Database for a RAC Primary Database
Client Failover in Data Guard Configurations for Highly Available Oracle Databases
a.s.o.
Sebastian -
Configure about the DATA GUARD APPLICATION on ORACLE 9i platform
I have worked on Oracle 9i (9.2.0.1) platform. I have installed Oracle 9i server edition in my machine, and created one database name ORCL.
I want to configure DATA GUARD APPLICATION in my machine... is it possible?
if it is then how can I do this...Yes, it is possible.
Please refer to the Dataguard Concepts and Administration Manual for installation guidance.
Please do not bother to come back to ask further doc questions, showing you are not prepared to do your own work.
Sybrand Bakker
Senior Oracle DBA -
Data guard synchronization after link down b/w primary and physical standby
Hi All,
I have configured data guard on oracle 11gr2 db. Normally switchover between my primary and physical standby happens smoothly and the Apply lag would be zero. Recently We had to test a scenario when the network link between Primary and Physical standby is completely down and Physical standby is isolated completely for more than half an hour.
When we brought up the link every thing worked smoothly but apply lag started increasing from 0 to around 3 hrs. And then it started reducing to 0. Currently Apply lag and transport lag shows 0.
But is this normal behaviour of oracle data guard that when the link between primary and physical standby is completely down, It requires 3-4 hrs for resynchronization ??? Even when during isolation, there were very few transactions happend on primary database ??
Are there any documents available for this scenario??
ThanksHi, after the link is up, if there were some transactions and produced archive logs it's normal to take some time for resync. To check if 3-4 hours is normal or not, you can repeat the scenario and this time check
- how many archivelogs does primary produce in this period.
- after the link is up, does archivelog transfer immediately starts from primary to standby? Is primary able to send these archivelogs parallel?
- Is there anything wrong with the apply process?
check primary & standby alert log files, and run this query on standby to check the transport and apply processes:
SELECT PROCESS, STATUS, THREAD#, SEQUENCE#, BLOCK#, BLOCKS FROM V$MANAGED_STANDBY;
regards -
How do i find dataloss in Data Guard?
We are using redo log, in async mode, following is our setting.
SERVICE=xxx_sb max_failure=100 reopen=600 LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=xxx_sb
When i query V$managed_Standby for delay_mins, its always zero. Meaning there is no delay in copying a log. I have 2 questions..
1. How can i communicate to business that in worst case we will lose x Mintues of data? Its an OLTP, where the transactions are less then 2mins. Also during the night there are some batch jobs where the transactions are 60mins longs.
2. Most of the time during peak hours there is a log switch happening every 10-15mins but during non-peak it may not happen for a long period of time, is it advisable to set ARCHIVE_LAG_TIME to 10 mins? as im not using archiver , we are using log writer for standby.
any explanation or point to documentation would be appreciated,
Thanks,Production databases who are running with fully fined configured Data Guard, do'nt have any dataloss because failover operation ensures zero data loss if dataguard is configured with maximum protection mode or maximum availability mode at failover time.
http://www.dbazone.com/docs/oracle_10gDataGuard_overview.pdf
The above pdf is oracle white paper which too confirmed it.
LGWR SYNC AFFIRM in Oracle Data Guard is used for zero data loss. How does one ensure zero data loss? Well, the redo block generated at the primary has to reach the standby across the network (that's where the SYNC part comes in - i.e. it is a synchronous network call), and then the block has to be written on disk on the standby (that's where the AFFIRM part comes in) - typically on a standby redo log.
Can you have LGWR SYNC NOAFFIRM? Yes sure. Then you will have synchronous network transport, but the only thing you are guaranteed is that the block has reached the remote standby's memory. It has not been written on to disk yet. So not really a zero data loss solution (e.g. what if the standby instance crashes before the disk I/O).
To sum up -> LGWR SYNC AFFIRM means primary transaction commits are waiting for ntk I/O + disk I/O acks. LGWR SYNC NOAFFIRM means primary transaction commits are waiting for ntk I/O only.
Source:http://www.dbasupport.com/forums/showthread.php?t=54467
HTH
Girish Sharma -
Data Guard Broker: errors ORA-16816 and ORA-16817 with Fast Start Failover
Hi,
my environment is:
OS: Windows XP Professional Edition SP2
DB: Oracle EE 10.2.0.3
Primary db: orcl
Standby db: stby
both databases are running on the same server.
I have configured Data Guard as described in the DG Administration Guide.
In the Data Guard Broker I switch to 'stby' succesfully and 'stby' is the primary db and 'orcl' is the standby db.
I switched back to 'orcl' as primary db and I get some errors:
DGMGRL> show database 'orcl' statusreport;
STATUS REPORT
INSTANCE_NAME SEVERITY ERROR_TEXT
* WARNING ORA-16817: configuration for Fast Start of Failover is not synchronized.
DGMGRL> show database 'stby' statusreport;
STATUS REPORT
INSTANCE_NAME SEVERITY ERROR_TEXT
* ERROR ORA-16816: wrong databaserole
* WARNING ORA-16817: configuration for Fast Start of Failover is not synchronized.
DGMGRL> show configuration;
Configuration
Name: DG1
Enabled: YES
Protection Mode: MaxAvailability
Fast-Start Failover: ENABLED
Databases:
orcl - Physical standby database
- Fast-Start Failover target
stby - Primary database
Current status for DG1:
Warning: ORA-16607: one or more databases failed.
I have searched for solutions on Metalink and google, but with no success.
Has anyone got this kind of problem?
Any suggestions on how to resolve it?
ThanksHi DigerDBA
I did your advice , the error disappear, and thanks for your advice , but do I need to keep standby_file_management='AUTO' or 'MANUAL' in primary and standby init files?
Am asking this because when I use the observer the failover failed and I get the following error
SQL Execution error=604, sql=[ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY WAIT WITH SESSION SHUTDOWN]. See error stack below.
ORA-00604: error occurred at recursive SQL level 1
ORA-01275: Operation ADD LOGFILE is not allowed if standby file management is automatic.
Complete Failover operation failed in the step when attempting to convert the database to be the new primary.
Database Resource SetState Error (16771)
01/07/2014 09:14:43
Command FAILOVER TO epprod2 completed with error ORA-16771
if possible can you advice me please?
Maybe you are looking for
-
I am the disgruntled spouse that is forced to deal with these GOD **** apple products because my wife desires them. They are F'ING impossible to use. First thing the new i-pod touch 4.0 touch asks me to do is insert my apple user name and password. I
-
_Unable to connect to the Music Store
After upgrading to iTunes 6.0 I can not access the Music Store. The error message I receive is: "iTunes could not connect to the Music Store. The Music Store is temporarily unavailable. Please try again later." I have taken the following actions in m
-
HI , I want to know what is SAP ISU/CCS. Regards, nagaraju.
-
Creating Secure Store Service Application Error
Hi Experts, Weird thing's happening in our SP. Everytime we create/delete service application, we always end up with this: It says that it shouldn't take long but it takes forever on our side.. Do you have any idea about this? Thanks! Regards, Glenn
-
Fetching changes in Directory server
hi, can any one help me to kno how to fetch changes in lotus domino ??? i have tried this using JNDI on SunOne Dir, but cudnt do it on Domino, please help !!!