Use of standby redo log files in primary database
Hi All,
What is the exact use of setting up standby redo log files in the primary database on a data guard setup?
any good documents?
A standby redo log is required for the maximum protection and maximum availability modes and the LGWR ASYNC transport mode is recommended for all databases. Data Guard can recover and apply more redo data from a standby redo log than from archived redo log files alone.
You should plan the standby redo log configuration and create all required log groups and group members when you create the standby database. For increased availability, consider multiplexing the standby redo log files, similar to the way that online redo log files are multiplexed.
refer the link,and Perform the following steps to configure the standby redo log.:-
http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/create_ps.htm#i1225703
If the real-time apply feature is enabled, log apply services can apply redo data as it is received, without waiting for the current standby redo log file to be archived. This results in faster switchover and failover times because the standby redo log files have been applied already to the standby database by the time the failover or switchover begins.
refer the link
http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/log_apply.htm#i1023371
Similar Messages
-
How do look if i have Standby Redo Log files
How do look if i have Standby Redo Log files
example of creating them..To check existence of Standby Redo Log Files:
SQL> v$standby_log
Name Null? Type
----------------------------------------- -------- ---------------------------- GROUP# NUMBER
DBID VARCHAR2(40)
THREAD# NUMBER
SEQUENCE# NUMBER
BYTES NUMBER
USED NUMBER
ARCHIVED VARCHAR2(3)
STATUS VARCHAR2(10)
FIRST_CHANGE# NUMBER
FIRST_TIME DATE
LAST_CHANGE# NUMBER
LAST_TIME DATE
SQL> select * from v$standby_log;
no rows selected
SQL>To Create a Standby Redo Log file:
SQL> alter database add standby logfile group 11 ('/u01/app/test.log') size 5m;
Database altered.
SQL> set line 10000
SQL> select * from v$standby_log;
GROUP# DBID THREAD# SEQUENCE# BYTES USED ARC STATUS FIRST_CHANGE# FIRST_TIM LAST_CHANGE# LAST_TIME
11 UNASSIGNED 0 0 5242880 512 YES UNASSIGNED 0 0
SQL>and this is how you drop:
SQL> alter database drop standby logfile group 11;
Database altered.
SQL> ! rm /u01/app/test.log
SQL>Asif Momen
http://momendba.blogspot.com
Edited by: Asif Momen on Mar 16, 2010 1:32 PM
Included DROP example -
Dataguard lost both Primary redo log and standby redo log files
Hi,
I am new to data guard, i came acorss a scenario where we loose both primary redo log file and standby redo log files.
Can someone please help me understand how to recover from this situation.
Thanks!>loose both primary redo log file and standby redo log files
We have to be very clear.
There are (set A) online redo log files and (set B) standby redo log files at (location 1) Primary and (location 2) Standby.
The standby redo log files, depending on the configuration, aren't strictly mandatory. The standby can be applying redo without online redo log files present as well, depending on how it was setup.
So, the question is : Did you lose online redo log files at the primary ? Didn't the primary shutdown itself then ? If so, you have to do an incomplete recovery at the primary OR switch over to the standby (which may or may not have received the last transaction, depending on how it was configured and operating) OR restore from the standby (again, with possible loss of transactions) to the primary.
Hemant K Chitale -
Unassigned Status Of Standby Redo Log Files
I created 2 standby redo log groups, and use LGWR in primary site to
transfer redo data, all are good. But when I query the V$STANDBY_LOG
view, I found that the status column of my both standby redo logs is UNASSIGNED".
also sequence#
THREAD# and all others are 0 and 0.
Any explains.Thanks for the reply Sophie. I did perform log switch at my primary site but the status of standby redo log files remained unassinged. I am pasting here the message in my Alert Log file may be that can help you to diagonose the problem.
ALTER DATABASE SET STANDBY DATABASE PROTECTED
Tue Jul 26 15:35:18 2005
Completed: ALTER DATABASE SET STANDBY DATABASE PROTECTED
Tue Jul 26 15:35:22 2005
ALTER DATABASE OPEN
Tue Jul 26 15:35:23 2005
LGWR: Primary database is in CLUSTER CONSISTENT mode
LGWR: Primary database is in MAXIMUM PROTECTION mode
LGWR: Destination LOG_ARCHIVE_DEST_1 is not serviced by LGWR
LNS0 started with pid=18
Tue Jul 26 15:35:28 2005
LGWR: Error 16086 verifying archivelog destination LOG_ARCHIVE_DEST_2
LGWR: Continuing...
Tue Jul 26 15:35:28 2005
Errors in file e:\oracle\admin\test\bdump\test_lgwr_1864.trc:
ORA-16086: standby database does not contain available standby log files
LGWR: Error 16086 disconnecting from destination LOG_ARCHIVE_DEST_2 standby host 'TESTstdb'
LGWR: Minimum of 1 applicable standby database required
Tue Jul 26 15:35:28 2005
Errors in file e:\oracle\admin\test\bdump\test_lgwr_1864.trc:
ORA-16072: a minimum of one standby database destination is required
LGWR: terminating instance due to error 16072
Instance terminated by LGWR, pid = 1864 -
Hi,
From oracle document i know in the standby side the RFS process writes to Standby redo log file -> archive log and the MRP procees applys the archive logs to the standby database.
my question is ,if we dont create standby redo log file what happens?Hello;
When redo is received by an RFS on the standby , the RFS process writes the redo data into archived redo logs or optionally to the SRL.
Standby Redo Logs is where the RFS process at your Standby database writes incoming redo, they help performance because the RFS does not have to create the Archive log file.
Standby redo logs are a component of the Data Guard setup. They should be the same size as the redo logs on the Primary.
Standby Redo Logs do not not to be multiplexed.
I would create SRL them on both the Primary and the Standby. Think of it as one database in either Standby or Primary Mode. If you have to switchover you still need them.
If you have SRL's setup and need to do either a failover or switchover it should occur faster and safer.
Best Regards
mseberg -
Do I need to create new group for standby redo log files?
I have 10 group of redo log files with 2 members for each group for my primary database , Do I need to create new group for standby redo log files for the standby database
Group# Members
==============
1 2
2 2
3 2
4 2
5 2
6 2
7 2
8 2
9 2
10 2
If So, The following statment is correct? or nto
ALTER DATABASE ADD STANDBY LOGFILE GROUP 1 ('D:\Databases\epprod\StandbyRedoLog\REDO01.LOG',D:\Databases\epprod\StandbyRedoLog\REDO01_1.LOG');
please correct me if am doin mistake
becuase when I issue the statment I getting error message sayin the group is already created.Thanks John
I just find the answer
Yes, it's recomeded to add new group , for instnace If I have 10 group from 1 to 10 then the standby shoudl be from 11 to 20
Thanks I found the answer. -
Dataguard Solution for standby redo log file groups
Respected Experts,
My database version is 10.2.0.1.0 and Red Hat 5 os.I want to create a standby database using RMAN.
Can any one help me with the full steps.And i'm also confuse about number of standby redo log file members
need to be created.
Thanks and Regards
Monoj DasMy database version is 10.2.0.1.0 and Red Hat 5 os.I want to create a standby database using RMAN.To configure standby either you can use duplicate target database for standby
or
1) restore standby controlfile
2) mount standby database
3) restore database
and configure standby paraemter then start MRP, will do.
http://docs.oracle.com/cd/B19306_01/server.102/b14239/create_ps.htm
Can any one help me with the full steps.And i'm also confuse about number of standby redo log file members
need to be created.It depends which parameter you want to use, if you mention log_archive_dest_2='service ARCH ' then no need to create any standby redo log file groups,
If you use log_archive_dest_2='service LGWR ' here transport will be in terms of redo and you need standby redo log files on standby database. Which is realtime.
When you use LGWR, data lost will be less if in case of any online redo log file lost. which is recommended.
HTH. -
What is the purpose of standby redo log files
Hi,
What is the purpose of the standby redo log files in DR?
what if the standby redo log files are created? or else not created?
Please explain
Thanks3.1.3 Configure a Standby Redo LogA standby redo log is required for the maximum protection and maximum availability modes and the LGWR ASYNC transport mode is recommended for all databases. Data Guard can recover and apply more redo data from a standby redo log than from archived redo log files alone.
You should plan the standby redo log configuration and create all required log groups and group members when you create the standby database. For increased availability, consider multiplexing the standby redo log files, similar to the way that online redo log files are multiplexed.>
Reference http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/create_ps.htm#i1225703
HTH
Anand -
Require 9i Primary and Standby redo logs files same size?
Hi,
We have 9.2.0.6 Oracle RAC (2 node) and configured data guard (physical standby).
I want to increase redo log files size, but i can't this do same time primary and standby side.
Is there a rule, primary and standby database instances have same size redo log files?
If I increase only primary redo log files, is there any side effect? However I try this issue on test system. I increased all primary redo log files(if status='INACTIVE' drop redo log group and add redo log group, switch logfile,...)
, but i couldn't changed standby side. So the system is work well. Is this correct solution or not? How can i increase both sides redo log files?
Thank you for helps..Thank you for your helps.. I found this issue answer:
http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14239/manage_ps.htm#i1010448
Consequently, when you add or drop an online redo log file at the primary site, it is important that you synchronize the changes in the standby database by following these steps:
If Redo Apply is running, you must cancel Redo Apply before you can change the log files.
If the STANDBY_FILE_MANAGEMENT initialization parameter is set to AUTO, change the value to MANUAL.
Add or drop an online redo log file:
To add an online redo log file, use a SQL statement such as this:
SQL> ALTER DATABASE ADD LOGFILE '/disk1/oracle/oradata/payroll/prmy3.log' SIZE 100M;
To drop an online redo log file, use a SQL statement such as this:
SQL> ALTER DATABASE DROP LOGFILE '/disk1/oracle/oradata/payroll/prmy3.log';
Repeat the statement you used in Step 3 on each standby database.
Restore the STANDBY_FILE_MANAGEMENT initialization parameter and the Redo Apply options to their original states.
bye.. -
Standby Redo Log Files and Directory Structure in Standby Site
Hi Guru's
I just want to confirm, i know that if the Directory structure is different i need to mention these 2 parameter in pfile
on primary site:
DB_CONVERT_DATAFILE='standby','primary'
LOG_CONVERT_DATAFILE='standby','primary'
On secondary Site:
DB_CONVERT_DATAFILE='primary','standby'
LOG_CONVERT_DATAFILE='primary','standby'
But i want to confirm this wheather i need to issue the complete path of the directory in both the above paramtere:
like:
DB_CONVERT_DATAFILE='/u01/oracle/app/oracle/oradata/standby','/u01/oracle/app/oracle/oradata/primary'
LOG_CONVERT_DATAFILE='/u01/oracle/app/oracle/oradata/standby','/u01/oracle/app/oracle/oradata/primary'
Second Confusion:-
After transferring Redo Standby log files created on primary and taken to standby on the above mentioned directory structure and after restoring the backup of primary db alongwith the standby control file will not impact the physical standby redo log placed on the above mentioned location.
Thanks in advance for your helpHello,
Regarding your 1st question, you need to provide the complete path and not just the directory name.
On the standby:
db_file_name_convert='<Full path of the datafiles on primary server>','<full path of the datafiles to be stored on the standby server>';
log_file_name_convert='<Full path of the redo logfiles on primary server>','<full path of the redo logfiles on the standby server>';
Second Confusion:-
After transferring Redo Standby log files created on primary and taken to standby on the above mentioned directory structure and after restoring the backup of primary db alongwith the standby control file will not impact the physical standby redo log placed on the above mentioned location.
How are you creating the standby database ? Using RMAN duplicate or through the restore/recovery options ?
You can create the standby redo logs later.
Regards,
Shivananda -
Standby Redo Log Files ?
Hi Everyone,
Today after reading two different sources for Standby Protection Modes i found myself puzzled and stuck. One of the article from Burleson.com says 'Oracle supports the standby redo logs on a logical standby database and can now be configured in maximum data protection modes such as MAXIMUM PROTECTION ...'
On the other hand on some of the blogs and other resources to read, i found it something opposite to what Burleson Consulting posted on their website.
[http://4.bp.blogspot.com/-t0G_-xc8EAs/Tpvx9w2t8oI/AAAAAAAAAN4/Jw3U9s89Wtk/s1600/final.JPG|http://4.bp.blogspot.com/-t0G_-xc8EAs/Tpvx9w2t8oI/AAAAAAAAAN4/Jw3U9s89Wtk/s1600/final.JPG]
or
Blog from Jeff Hunter
[http://www.idevelopment.info/data/Oracle/DBA_tips/Data_Guard/DG_3.shtml|http://www.idevelopment.info/data/Oracle/DBA_tips/Data_Guard/DG_3.shtml]
Minimum Requirements for Data Protection Modes
Maximum Protection Maximum Availability Maximum Performance
Redo Archival Process LGWR LGWR LGWR or ARCH
Network Transmission Mode SYNC SYNC ASYNC when using LGWR process. Not applicable when using ARCH process.
Disk Write Option AFFIRM AFFIRM NOAFFIRM
Standby Redo Logs Required? Yes Required for physical standby databases only (Standby redo logs are not supported for logical standby databases.) Required for physical standby databases using the LGWR process.
Database Type Physical only Physical and Logical Physical and Logical
Please help me to find true between the two.
Or please provide any doc to read.
Thanks
Prashant DixitMaximum Protection Maximum Availability Maximum PerformanceDepends on Business requirement, By default Performance[most of the clients]
Redo Archival Process ? ? ?LGWR recommended in Max performance
Network Transmission Mode ? ? ?Depends. If max performance asynchronous
Disk Write Option ? ? ?Not clear
Standby Redo Logs Required? ? ? ?If real time apply - YES
Database Type ? ? ?not clear,
Assuming physical or logical? --Depends on requirement , Preferably Physical. -
Oracle standby/redo log file shipping keeps needing logs re-registering
Hi
We have Log File Shipping enabled and the prod system ships redo logs over to the LFS server. It's kept 24 hours behind. It usually ships the logs (and I believe automatically registers them) without issue.
EXCEPT - it keeps complaining about missing redo log files.
The file is usually there; but just needs registering with:
alter database register or replace logfile '/oracle/S1P/saparch/S1Parch1_636443_654987192.dbf';
(we found if we left out the 'or replace' it takes a very long time or even hangs)
It then plods on and applies the next... can go for another 2 or 3... or 20... but then often gets stuck again, and you need to register the next.
Can spend whole days on this...!!
We did try running a script to register the next 1365 redo logs! It failed on 4, so I ran it again... it worked on those 4, but turned up 3 others it had worked with before! HUH?!? So manually did those 3 ... fine... it carried on rolling forward... but got stuck after 10 minutes again when it hit another it reckoned needed registering (we'd already done it twice!!).
Any ideas?
RossHi
We have Log File Shipping enabled and the prod system ships redo logs over to the LFS server. It's kept 24 hours behind. It usually ships the logs (and I believe automatically registers them) without issue.
EXCEPT - it keeps complaining about missing redo log files.
The file is usually there; but just needs registering with:
alter database register or replace logfile '/oracle/S1P/saparch/S1Parch1_636443_654987192.dbf';
(we found if we left out the 'or replace' it takes a very long time or even hangs)
It then plods on and applies the next... can go for another 2 or 3... or 20... but then often gets stuck again, and you need to register the next.
Can spend whole days on this...!!
We did try running a script to register the next 1365 redo logs! It failed on 4, so I ran it again... it worked on those 4, but turned up 3 others it had worked with before! HUH?!? So manually did those 3 ... fine... it carried on rolling forward... but got stuck after 10 minutes again when it hit another it reckoned needed registering (we'd already done it twice!!).
Any ideas?
Ross -
When is anything written to standby redo logs on standby database?
I am on Oracle 10.2.0.4 on HP UNIX. I have read Oracle 10.2 concepts guide on technet.oracle.com, have read may article on metalink and internet, yet I am unable to verify when anything is written to standby redo logs on stand by database.
I have a simple database reconfiguration: a primary database and one standby database.
I created primary database and set up log_archive_dest_2 to use LGWR SYNC AFFIRM
I have created standby redo logs on primary.
alter database add standby logfile GROUP
I create standby control file on primary.
I copied all the primary information to create standby database. I have put standby database in managed recovery.
I did archive log switches, I created a table and inserted information in table.
I never saw standby redo logs updated on standby database by looking at timestamp of standby redo log files.
I then setup database in maximum availability mode by running following on primary:
Alter database set standby database to maximize availability
When I do insert into my tables, I do see standby redo log files on primary database being updated, but I have never seen standby redo logs on standby database updated. Why?
I am still at loss when actually standby redo logs are updated on standby database.
When I read Oracle 9i database documentation on data guard, it says that you do not need standby redo logs on primary instead you need them on standby. Only reason, you need them on primary is from primary changes role to standby database, so standby redo logs on standby database should be updated instead of standby redo logs on primary.What is the PROTECTION_MODE ,PROTECTION_LEVEL values of your database.
As per metalink:--
Create standby redo log files, if necessary:
Standby redo logs are necessary for the higher protection levels such as
Guaranteed, Instant, and Rapid. In these protection modes LGWR from the
Primary host writes transactions directly to the standby redo logs.
This enables no data loss solutions and reduces the amount of data loss
in the event of failure. Standby redo logs are not necessary if you are using
the delayed protection mode.
If you configure standby redo on the standby then you should also configure
standby redo logs on the primary database. Even though the standby redo logs
are not used when the database is running in the primary role, configuring
the standby redo logs on the primary database is recommended in preparation
for an eventual switchover operation.
Standby redo logs must be archived before the data can be applied to the
standby database. The standby archival operation occurs automatically, even if
the standby database is not in ARCHIVELOG mode. However, the archiver process
must be started on the standby database. Note that the use of the archiver
process (ARCn) is a requirement for selection of a standby redo log.
METALINK ID:- Doc ID: Note:219344.1
Edited by: Anand... on Sep 15, 2008 2:15 AM -
Why do we need standby redo log on Primary database.
Hi Gurus,
I was going through the document in OBE,
http://www.oracle.com/technology/obe/11gr1_db/ha/dataguard/physstby/physstdby.htm
I have two queries:
1) I noticed the statement -
"Configure the primary database to receive redo data, by adding the standby logfiles to the primary. "
Why do we have to create standby redo log on a primary database?
2) There is another statement --
"It is highly recommended that you have one more standby redo log group than you have online redo log groups as the primary database. The files must be the same size or larger than the primary database’s online redo logs. "
Why do we need one additional standby redo log group than in Primary database.
Could anyone please explain to me in simple words.
Thanks
Cherrish VaidiyanHi,
1. Standby redo logs are used only when the database_role is standby, it is recommended to be added in primary also so that they can be used on role reversal, however during normal working standby redo logs will not be used at all on primary.
2. In case of 3 online redo log groups, it is recommended to use 4 standby redo log group this is in case if log switching is happening frequently on primary and all 3 standby redo logs are still not completely archived on the standby and 4th can be used here as there will be some delay on standby due to network or slowness of arch on standby.
Use of the standby redo log groups depends on the redo generation rate, you can see only 2 standby redo logs are getting used while you have 4 standby redo log groups, when the redo generation rate is less.
So it is recommended to have one more standby redo log group when redo generation rate is high and all of the existing standby redo log group are getting used.
Regards
Anudeep -
Online redo logs vs standby redo logs
Hi All,
Oracle version : 10.2.0.4
OS : SunOS 5.10 Generic_118855-36 i86pc i386 i86pc
This might be a silly question for the experts :(
We are having 2 standby databases and 1 logical database. Everything is running fine , I have one confusion : My primary server having 3 online redo log files and 3 standby redo log files (on primary local), but as per the architecture standby redo logs should be on standby server.My question is whether standby redo logs on standby are online redo logs of standby server or standby redo logs of primary server. e.g If i perform a log switch on primary then what is the role of sync and affirm, will lgwr write parallel on online redo logs ,standby redo logs (of primary) or online redo logs (of primary) and online redo logs (which is known as standby redo logs on standby ). Please help me to understand the scenerio.
Thanks in advance!RFS receives redo information from the primary database.
RFS can write the redo into standby redo logs or directly to archived redo logs. Each LNSn and ARCn process from the primary database has its own RFS process.
A standby redo log is used only when the database is in the standby role to store redo data received from the primary database. Standby redo logs form a separate pool of log file groups.
Configuring standby redo log files is highly recommended on all standby databases in a Data Guard configuration, including the primary database to aid in role reversal.
A standby redo log is required to implement:
• The maximum protection and maximum availability levels of data protection
• Real-time apply
• Cascaded redo log destinations
Standby redo logs are recommended for maximum performance data protection mode. Unless you are using the real-time apply feature, standby redo logs must be archived before the data can be applied to the standby database. The standby archival operation occurs automatically.
Maybe you are looking for
-
How can I change Apple ID for App Store?
I changed my Apple ID, Itunes on my Itouch recognizes it, but the app store does not. How can I change AppleID for App Store? When I try to update my apps it asks for the password for my old Apple ID which does not exist anymore.
-
Does cloaking work in Dreamweaver CS4?
Why, when I select to synchronize in Dreamweaver CS4, and I select to delete files on remote server not on local server, do files in a cloaked folder show up? Thanks. Stephen
-
Mainstage 2.1 makes my Macbook Pro fans run full bore.
Upgraded to V. 2.1 and Snow Leopard. Now my Macbook Pro fan kicks in at full blast whenever I play any patches or run backing tracks. Cpu hit looks low and memory usage is average. This never happened before. Any ideas as to what's happening?
-
What business event executes when a Party is updated
Hi, What business event executes when a Party is updated ? I tried with oracle.apps.ar.hz.Organization.update oracle.apps.ar.hz.CustomerProfile.update None of these seems triggering when Party information is updated example: Customer Profile, Custome
-
When we are using java.io.DataInputstream and method readInt()or read doubl
Hi When we are using java.io.DataInputStream some garbage value is coming import java.io.*; class DataDemo public static void main(String ar[]) throws IOException DataInputStream dis=new DataInputStream(System.in); double d=dis.readDouble(); System.o