Oracle DataGuard - Standy Redo log on physical Standby db
Hello Guys,
A quick question on my 10.2.0.2 db with Windows 2003 x64 OSs.
I have 2 machines - One for primary & the other for physical standby
I have successfully setup DG with Real Time Apply and also tested switchover & failover scenarios and they work well and as expected...
But I have a query which popped up when I was trying to set this up at home.
I create the physical standby db by shutting the primary db and copying all the datafiles, tempfiles,online redo logs and then creating a standby control file which will be used for the physical standby db to start off with.
After mounting the standby db, I tried to create standby redo logs files starting with Group 4 but I got error that standby group 4 already exists.
Upon querying v$logfile view, I noticed that the standby redo logs that I created on primary are also showing up on the standby db which I understand is from the standby control file.
So here is my quesiton: What is correct method of creating these standby redo logs on the standby database?
I know that I could drop those 4 standby redo logs from the standby db and recreate them but all the DG docs online and the documents that I have referred say that I should create the standby redo logs on the standby as I did on the primary but how can this duplication be avoided i.e. from the standby control file?
I know that I could use another method to create a hot backup such as RMAN etc...but I wanted to follow this way of shutting down the primary and copy the relevant database files.
Any help appreciated...and thanks in advance guys!
-Bharath
so with the setup that I used, i.e. create a standby control file which contains info about the standby redo logs at the primary site, should I also copy over the standby redo logs from the primary to standby as I only copied the datafiles, tempfile(s) & online redo logs? But then the filenames of the standby redo logs will be the exact same as that of the primary. Will that cause any issue during a switchover/failover?
I don't remember exactly how I did it when I got the whole thing working but I have a vague remembrance that I drop the std. redo log files entries from the std database and then recreate new ones with different filenames (as compared to primary).
Thanks
Similar Messages
-
Increase current redo log size in standby database in mount stage
We have oracle 10g standby database. The standby database is always running in mount stage while apply logs manually not data guard is used.
We have increase size or online redo log in primary . Now want to inrease in standby database also.
how to increase the size of current online redo log in standby database while it in mount stage .
in mount stage we cant run alter system switch logfileuser11965804 wrote:
We have oracle 10g standby database. The standby database is always running in mount stage while apply logs manually not data guard is used.
We have increase size or online redo log in primary . Now want to inrease in standby database also.
how to increase the size of current online redo log in standby database while it in mount stage .
in mount stage we cant run alter system switch logfilein 10g Standby will be always in Mount status when MRP is running.
When you increase size of online redo log files in primary, You should increase in standby also..
Standby redo log file size should be equal or higher than primary. You no need to switch log files on Standby.
You will have only standby redo log files in standby not ORL(online redo log files)
You can use this below script to add standby redo log files.
http://www.pythian.com/news/581/oracle-standby-redo-logs/ -
Apply missing log on physical standby database
How to apply the missing log on physical standby database?
I already registered the missing log and started the recovery process.
Still...having log on standby that has status ..not applied.
SQL> SELECT SEQUENCE#,APPLIED FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
SEQUENCE# APP
16018 YES
16019 YES
16020 NO ---------------------> Not applied.
16021 YES
ThanksNot much experience doing this, but according to the 9i doc (http://download-east.oracle.com/docs/cd/B10501_01/server.920/a96653/log_apply.htm#1017352), all you need is properly-configured FAL_CLIENT and FAL_SERVER initialization parameters, and things should take care of themselves automatically. Let us know if that doesn't work for you, we might be able to think of something else.
Daniel -
Apply standby redo log to physical stby db.
Hi all,
Facing a problem in the following scenario.
I have dataguard configuration operating in maximum availability mode with a local standby db (A - lgwr sync not using real time apply) and a remote standby db (B - lgwr async). I then simualted a crash of my primary database with batch jobs running. Since the stby db A is in lgwr sync option ,all the commited data in the current online redo log has been transmitted to stby A and is present in its stby redo log (Group 2).How do I apply this stby redo log to the remote stby db.
Tried the following methods.
1.ftp the stby redo log to the remote db and tried to regiter it, got an error that it is not completely archived.
2.issued the recover standby database command and supplied the stby redo log when it asked for the sequence in the stby redo, got an error saying there is corruption in a block(tried this option multiple times ended up with the same result.)
Regards.Hello,
Did you try "alter database recover managed standby database finish" on the standby database ?
Regards,
Shivananda -
Online Redo logs instead of Standby Redo logs
RDBMS Version: 11.2.0.3/Platform : RHEL 6.3
To migrate a 3TB Database to a new DB server , we are going to use RMAN DUPLICATE.
Step1. Take full backup of DB + Standby Control file at primary site and transfer the Bkp files to Standby site
Step2. At standy site, we will run the RMAN duplicate target database for standby
After the above step, we don't want to create the standby redo logs because the newly restored DB in standby server is going to be the new Prod DB which application will be pointing to.
So, Can I skip the Standby Redo log creation part and create Online redo logs instead ?
As mentioned earlier, Our objective is not to create a proper Dataguard Standby DB setup. We just want to clone our DB to another server using RMAN Duplicate.Tom wrote:
RDBMS Version: 11.2.0.3/Platform : RHEL 6.3
To migrate a 3TB Database to a new DB server , we are going to use RMAN DUPLICATE.
Step1. Take full backup of DB + Standby Control file at primary site and transfer the Bkp files to Standby site
Step2. At standy site, we will run the RMAN duplicate target database for standby
After the above step, we don't want to create the standby redo logs because the newly restored DB in standby server is going to be the new Prod DB which application will be pointing to.
So, Can I skip the Standby Redo log creation part and create Online redo logs instead ?
As mentioned earlier, Our objective is not to create a proper Dataguard Standby DB setup. We just want to clone our DB to another server using RMAN Duplicate.
Hi,
Take full backup of DB + Standby Control
We just want to clone our DB to another server using RMAN Duplicate
If you want only clone database of production, why you are take Standby controlfile?
If you don't want create standby database then, why you using DUPLICATE command with FOR STANDBY option.
You can use DUPLICATE command for clone database, without for standby option.
If you say no, we want create standby database and we will perform swithover,
then yes, you can use online redo logs for max performance mode.
and you can create standby redo logs on all database, but this redo logs will use by database when database role
is standby.
Regards
Mahir M. Quluzade -
Redo Log Apply after Standby Restarts
hi all,
To start my learning on Data Guard, I've successfully followed the manual steps to create a physical standby database. What I noticed is when I restart the standby database, the received redo log aren't automatically applied until I issued the following command:
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;Is that normal? If yes, is there a way to make redo application remains automatic after standby database restarts?
Thanks in advance.When you configure the DataGuard in an SQL environment you need to manually start the redo apply process after the Standby Database is mounted. You can script the database startup and include that when "select database_role from v$database" is Physical Standby then "ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;"
OR
Yo can configure the DataGuard under the broker control which will start the redo apply process automatically when the Standby Server starts.
Sudhir. -
BRARCHIVE backup for high volume offline redo log files on Standby Database
Hi All,
We are through with all of Standby database activity, also started applying the offline redo log files on the Standby site.
The throughput is not utilizing the actual available bandwith.
So we are not able to copy the offline redo files on time, as the offline redo files are piling up on the Production side.
My query is how we can parallely copy the offline redo log files on the DR site (ie. 4-5 redo files at a time).
Kindly guide for the same.
Regards,
Shaibazhi,
I have one doubt.
On other server (r3qas) the Umask settings are as followed
User UMASK value
<sid>adm 077
ora<SID> 077
root 077
Running SAP System : SAP R3 4.6C
Running DBMS : Oracle 9.0
Operating System :- HP_UX
On this system The new offline redo log files are created with 600 permissions. There is not a problem here, while taking the backup. I checked last "r3qas-archive" backups. There, i have not found any single error related to permissions, or any others (something like, Cannot open /oracle/RQ1/../.........dbf).
If everything is working fine, with this umask setting on this server, then, what's going wrong with the BW Quality server, which have the same umask settings (also others) for all the concerned users, as mentioned above.
Regards,
Bhavik Shroff -
Need to drop a current redo log on a Standby
Oracle 11.2.0.2
I have 3 redo logs on a newly created Standby database.
SQL> SELECT GROUP#, ARCHIVED, STATUS FROM V$LOG;
GROUP# ARC STATUS
1 YES UNUSED
3 NO CURRENT
2 YES UNUSED
The redo log in Group 3 needs to be dropped and recreated. How can I force a log switch on a Standby in mount mode?
SQL> alter database drop logfile group 3;
alter database drop logfile group 3
ERROR at line 1:
ORA-01623: log 3 is current log for instance ufms216 (thread 1) - cannot drop
ORA-00312: online log 3 thread 1: '/path/redo03.dbf'
SQL> alter system switch logfile;
alter system switch logfile
ERROR at line 1:
ORA-01109: database not open
Please help !!!
Thanks!
DaveSAME ERROR/SITUATION
SQL> startup mount
ORACLE instance started.
Total System Global Area 1.2527E+10 bytes
Fixed Size 2231240 bytes
Variable Size 3657434168 bytes
Database Buffers 8858370048 bytes
Redo Buffers 8691712 bytes
Database mounted.
SQL> SELECT GROUP#, ARCHIVED, STATUS FROM V$LOG;
GROUP# ARC STATUS
1 YES UNUSED
3 NO CURRENT
2 YES UNUSED
SQL> alter database drop logfile group 3;
alter database drop logfile group 3
ERROR at line 1:
ORA-01623: log 3 is current log for instance ufms216 (thread 1) - cannot drop
ORA-00312: online log 3 thread 1: '/a0253/d01/oradata/ufms216/redo03.dbf'
SQL> alter system switch logfile;
alter system switch logfile
ERROR at line 1:
ORA-01109: database not open
SQL> alter database recover managed standby database cancel;
alter database recover managed standby database cancel
ERROR at line 1:
ORA-16136: Managed Standby Recovery not active
SQL>
HELP! -
Compressing redo data for Physical Standby
Hi All,
I have been checking option of compressing redo data for a Physical Standby database. I did not find many details in the docs. Any one has implemented this kind of compression.
Cheers/Adityaper Oracle support, redo compression in DG makes sense only if the bandwidth between the primary & standby server is less than 100mbps and is expected to be heavily taxing on CPU.
you may check metalink article ID: 729551.1 where they have given some test stats. Not a whole lot of data, but it might help you make a good judgement.
Cheers. -
Hi Guys,
Just wondering.
For eg, I have a Production Database and a physical standby DB.
Only the physical standby DB has flash back on.
For eg, one day if there's a need for me to restore the production DB from tape (point in time recovery, so need to resetlogs).
Do i need to rebuild the physical standby DB? (from the backup of restored db)
Or can i make use of flash back? If i make use of flash back, i will have to re-create the control file right?
thanksHello;
Within Data Guard can use Flashback for the following :
On the Standby to recover data because of a delay in the apply process.
On the Standby ( Physical ) to open the database in snapshot mode.
On the Primary and Standby to flash the database back in time (if Standby then Primary must flashback too)
On the Primary to recover the database after a failover.If I understand you question correctly you are talking "Incomplete recovery" on the Primary with no Flashback there. So the answer is No, Flashback on the Standby cannot help.
You can correct this by setting up flashback on the Primary.
Best Regards
mseberg -
Dataguard (10.2.0.5, physical standby)
Hi Guys,
Let's say there's a network issue between my production and standby database for about 4 days.
In production db, all archive logs that is older than 12 hours will be deleted on daily basis.
For the 4 days when the network is down, I have manually backup the all the necessary arch logs in a tape.
If i'm able to port all the archive log gaps to the standby site, can i do a "recover database" on the standby database and enable back the replication? Will this work?
Or i really need to manual register all the archive logs and enable back the replication?
thanksdbaing wrote:
thanks all for the help.
--transport service automatically shall send this archive logs to standby and you not need any register archived logs to standby database.
I don't depend on the above as my archive logs have already been deleted from the primary filesystem so transport service can't find it.
So just wish to confirm again, if I have all the archive log backup then move it to the standby database archive log location and use 'recover standby database' after that use auto. It will recover all the archive of backup. And again you can start automatic recovery of it. Will this work?
Do i need to manual register the archive logs [gaps]? Or simply run "'recover standby database" after i transfer the arch log over?
thanksYou would need to restore the missing archivelog in standby and perform recover standby database up to the last archive.
Hope it helps
Cheers -
Online redo logs on a physical standby?
A question on REDO logs on physical standby databases. (10.2.0.4 db on Windows 32bit)
My PRIMARY has 3 ONLINE REDO groups, 2 members each, in ..ORADATA\LOCP10G
My PHYSICAL STANDBY has 4 STANDBY REDO groups, 2 members each, in ..ORADATA\SBY10G
I have shipping occurring from the primary in LGWR, ASYNC mode - max availablility
However I notice the STANDBY also has ONLINE REDO logs, same as the PRIMARY, in the ..ORADATA\SBY10G folder
According to the 10g Dataguard docs, section 2.5.1:
"Physical standby databases do not use an online redo log, because physical standby databases are not opened for read/write I/O."
I have tried to drop these on the STANDBY when not in apply mode, but I get the following:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
Database altered.
SQL> ALTER DATABASE DROP LOGFILE GROUP 3;
ALTER DATABASE DROP LOGFILE GROUP 3
ERROR at line 1:
ORA-01275: Operation DROP LOGFILE is not allowed if standby file management is
automatic.
I also deleted them while the STANDBY instance was idle, but it recreated them when moved to MOUNT mode.
So my question is why is my PHYSICAL recreating and using these, if the docs say the shouldn't?
I saw the same error mentioned here: prob. with DataGuard
Is this a case of the STANDBY needing at least a notion of where the REDO logs will need to be should a failover occur, and if the files are already there, the standby database CONTROLFILE will hold onto them, as they are not doing any harm anyway?
Or, is this a prooduct of having management=AUTOMATIC - i.e. the database will create these 'automatically'
Ta
btAccording to the 10g Dataguard docs, section 2.5.1:
"Physical standby databases do not use an online redo log, because physical standby databases are not opened for read/write I/O."yes, those are used when database is open.
You should not perform any changes in Standby. Even if those exist online redo log files, whats the difficulty you have seen?
These will be used whenever you performed switchover/failover. So nothing to worry on this.
Is this a case of the STANDBY needing at least a notion of where the REDO logs will need to be should a failover occur, and if the files are already there, the standby database CONTROLFILE will hold onto them, as they are not doing any harm anyway?Then oracle functionality itself harm if you think in that way. When they not used in open then what the harm with that?
Standby_File_management --> for example if you add any datafile, those information will be in archives/redos once they applied on standby those will be added automatically when it is set to AUTO if its manual, then it creates a unnamed file in $ORACLE_HOME/dbs location later you have to rename that file and recovery need to perform .
check this http://docs.oracle.com/cd/B14117_01/server.101/b10755/initparams206.htm
HTH. -
Resizing redo log files on a 3 node RAC with single node standby database
Hi
On a 3 node 11g RAC system,I have to resize the redo logs on primary database from 50M to 100M. I was planning to do the following steps:
SQL> select group#,thread#,members,status from v$log;
GROUP# THREAD# MEMBERS STATUS
1 1 3 INACTIVE <-- whenefver INACTIVE, logfile group can be dropped
2 1 3 CURRENT & resized, switch logfile can change logfile group
3 1 3 INACTIVE
4 2 3 INACTIVE
5 2 3 INACTIVE
6 2 3 CURRENT
7 3 3 INACTIVE
8 3 3 INACTIVE
9 3 3 CURRENT
9 rows selected.
SQL> alter database drop logfile group 1;
Database altered.
SQL> ALTER DATABASE ADD LOGFILE THREAD 1
GROUP 1 (
'/PROD/redo1/redo01a.log',
'/PROD/redo2/redo01b.log',
'/PROD/redo3/redo01c.log'
) SIZE 100M reuse; 2 3 4 5 6
Database altered.
However I am not sure what needs to be done for the standby. The standby_file_management is set to auto and it is single instance standby.
SQL> select group#,member from v$logfile where type='STANDBY';
GROUP#
MEMBER
10
/PROD/flashback/PROD/onlinelog/o1_mf_10_7b44gy67_.log
11
/PROD/flashback/PROD/onlinelog/o1_mf_11_7b44h7gy_.log
12
/PROD/flashback/PROD/onlinelog/o1_mf_12_7b44hjcr_.log
Please let me know.
Thanks
SumathyHello;
For Redo and Standby redo this won't help :
standby_file_management is set to auto
On the Standby cancel recovery, then drop and recreate the redo and or Standby redo.
Then start recovery again.
Example ( I have a habit of removing the old file at the OS to avoid REUSE and conflicts )
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
SQL> ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT='MANUAL';
alter database add standby logfile group 4
('/u01/app/oracle/oradata/orcl/standby_redo04.log') size 100m;
ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT='AUTO'
Notes worth reviewing :
Online Redo Logs on Physical Standby [ID 740675.1]
Error At Standby Database Ora-16086: Standby Database Does Not Contain Available Standby Log Files [ID 1155773.1]
Example of How To Resize the Online Redo Logfiles [ID 1035935.6]
Best Regards
mseberg -
The file structure online redo log, archived redo log and standby redo log
I have read some Oracle documentation for file structure and settings in Data Guard environment. But I still have some doubts. What is the best file structure or settings in Oracle 10.2.0.4 on UNIX for a data guard environment with 4 primary databases and 4 physical standby databases. Based on Oracle documents, there are 3 redo logs. They are: online redo logs, archived redo logs and standby redo logs. The basic settings are:
1. Online redo logs --- This redo log must be on Primary database and logical standby database. But it is not necessary to be on physical standby database because physical standby is not open. It doesn't generate redo log. However, if don't set up online redo log on physical standby, when primary failover and switch standby as primary. How can standby perform without online redo logs? In my standby databases, online redo logs have been set up.
2. Archived redo logs --- It is obviously that primary database, logical and physical standby database all need to have this log file being set up. Primary use it to archive log files and ship to standby. Standby use it to receive data from archived log and apply to database.
3. Standby redo logs --- In the document, it says A standby redo log is similar to an online redo log, except that a standby redo log is used to store redo data received from another database. A standby redo log is required if you want to implement: The maximum protection and maximum availability levels of data protection and Real-time apply as well as Cascaded destinations. So it seems that this standby redo log only should be set up on standby database, not on primary database. Am my understanding correct? Because I review current redo log settings on my environment, I have found that Standby redo log directory and files have been set up on both primary and standby databases. I would like to get more information and education from experts. What is the best setting or structure on primary and standby database?FZheng:
Thanks for your input. It is clear that we need 3 type of redo logs on both databases. You answer my question.
But I have another one. In oracle ducument, it says If you have configured a standby redo log on one or more standby databases in the configuration, ensure the size of the current standby redo log file on each standby database exactly matches the size of the current online redo log file on the primary database. It says: At log switch time, if there are no available standby redo log files that match the size of the new current online redo log file on the primary database. The primary database will shut down
My current one data gurard envirnment setting is: On primary DB, online redo log group size is 512M and standby redo log group size is 500M. On the standby DB, online redo log group size is 500M and standby redo log group size is 750M.
This was setup by someone I don't know. Is this setting OK? or I should change Standby Redo Log on standby DB to 512M to exactly meatch with redo log size on primary?
Edited by: 853153 on Jun 22, 2011 9:42 AM -
Can anyone explain what the status of clearing means when viewing standby redo log status?
SQL> select status from v$log;
STATUS
CLEARING
CLEARING
CURRENT
This is a bit different to what we'd see on an open database.Hello;
Log is being re-created as an empty log.
In a Standby database the regular redo are not used ( when not in PRIMARY MODE) only the standby redo logs are used. Sometimes as buffers for the redo coming from the primary.
You should be able to change the status by doing a ALTER SYSTEM SWITCH LOGFILE on your primary.
This note may help:
Online Redo Logs on Physical Standby [ID 740675.1]
Also
Take a look at v$standby_log too.
http://docs.oracle.com/cd/B28359_01/server.111/b28320/dynviews_3068.htm
Best Regards
mseberg
Maybe you are looking for
-
I've been experimenting with Bridge's metadata functionality, and I'm confused about the relationship between keywords that are added to a jpeg in Bridge, and keywords that are added to a jpeg manually (outside of Bridge, by right-clicking file, Prop
-
Why don't I have piano in my software instrument section?
I recently downloaded Logic Pro 9 from the Mac App Store, and I don't think I have everything. I don't have a piano instrument in the library. Does anybody know why that is? Thank you. Tanya
-
Content shifts in Firefox and Crome but works well in IE?
I have read the earlier question on similar issue. None of those answers suited my problem. I am using a template to redesign my company webpage. It works pretty well in IE but in Firefox or Crome everything shifts to left. Please help as I am unable
-
Users with Roles as "Guest" can check in files
Hi, Is there any way that users with "Guest" roles can checkin files into the server. Please tell me..
-
Hello! In this code, the drawImage method is returning false. If the same code is run as a desktop application using the main method the error does not happen. Who knows why? public class AppJavaTV implements Xlet{ private XletContext context;