Preferred method of creating a Standby Database Creation - Data Guard

Version:11gR1
Which is the preferred method of creating a standby database? Is it by
a. Copying relevant files to standby server
b. Using RMAN
c. Using Data Guard Broker 

What I prefer is a combination of your choices
Copy files:
First I make the proper directory structure on the standby server, next copy the password file and an spfile, suitable for the standby database.
Use RMAN:
Startup nomount the standby instance
Next user RMAN to copy files
- RMAN target sys/pwd#PRIMDB auxiliary sys/pwd#STDBY
RMAN > duplicate target database for standby from active database;
with this duplicate command, the primary database remains available.
Use Data Guard Broker:
set up and enable a configuration to have dataguard manage the standby. 

Very nice :^)
To clarify. You do not use the Broker to create the standby. You use the Broker to manage a standby that you have already created. There are no commands in the broker to actually create a standby database. If you use Enterprise manager Grid Control you can use it to create a standby database which will then automatically (unless you say no) be managed by the broker. have a look at http://www.oracle.com/technology/pub/articles/havewala-easydr.htm for a nice article on how to use Grid Control to create your standby.
There are also several MAA papers on the subject.
http://www.oracle.com/technology/deploy/availability/pdf/MAA_WP_10g_RACPrimarySingleInstancePhysicalStandby.pdf
http://www.oracle.com/technology/deploy/availability/pdf/MAA_WP_10g_RACPrimaryRACPhysicalStandby.pdf
to name a couple.
And of course there is the manual:
http://download.oracle.com/docs/cd/B28359_01/server.111/b28294/create_ps.htm#i63561
and
http://download.oracle.com/docs/cd/B28359_01/server.111/b28294/rcmbackp.htm#i636377
But of course (warning, shameless book plug) you should read Chapter 2 of our Data Guard 11g Handbook at http://www.amazon.com/Oracle-Data-Guard-Handbook-ebook/dp/B002JA02GG
Larry 

Thank you Larry, Peewee 

Hi,
Can you tell me what to be configure in the servers before installation of oracle. Also after configure the OS how to configure Oracle in primary and standby servers. 

user1323504 - See manuals and config guides available on myOracleSupport Config depends on your OS and Oracle software version so would need more detail in your question. Some of those docs referenced above by Larry may help.

Related

Create  configuration storage - Is the dat file the only place this is tore

DGMGRL>create configuration ‘somename’ as
primary database is ‘primary’
connect identifier is primary.world;
I am replacing a primary db server and a standby next weekend. I have got everything ready so next weekly I will just recreate the primary and secondary from the production database.
My quest is when I create the broker configuration use the DGMGRL tool is any of the above info stored in the database?
It appears to me it is all stored in $ORACLE_HOME/dbs though I am not sure.
rw-r----- 1 oracle dba 49152 Jul 17 16:47 dr1SID_DG1.dat
Just curious as I think it is though and that all I need to do is refresh my primary and secondary and standby controlfile from the hot backup just like I did when I created it. 
Dear willjamu,
If i do understand you correct, you have to restore & recreate the control file since you are taking a full backup again to restore for your standby databases.
Broker configuration is different than controlfile.
Here is a data guard broker configuration documentation (manual,data guard);
http://www.appsdba.com/admin_stby_datagrd.htm
By refresh you mean a new replication, you have to go over the steps to create the standby all over again.
Hope it Helps,
Ogan 
DG Broker has its own configuration file ... think of it in the same way you think of the spfile ... and you will have a reasonably good picture. 
Once you have Data Broker setup you can use a command like this to check for mismatches.
show database 'STANDBY' 'InconsistentLogXptProps';
show database 'PRIMARY' 'InconsistentLogXptProps';

can i create a standby database in oracle 10g standared edition ?

what are the steps required for creating a standby database using oracle 10g standard edition. or Any other feature for mirroring database in oracle 10g standared edition 
Dear mithun,
Please read the following online documentation;
http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14239/standby.htm
+"+
+2.3.2 Oracle Software Requirements+
+The following list describes Oracle software requirements for using Data Guard:+
+* Oracle Data Guard is available only as a feature of Oracle Database Enterprise Edition. It is not available with Oracle Database Standard Edition. This means the same release of Oracle Database Enterprise Edition must be installed on the primary database and all standby databases in a Data Guard configuration.+
+Note:+
+It is possible to simulate a standby database environment with databases running Oracle Database Standard Edition. You can do this by manually transferring archived redo log files using an operating system copy utility or using custom scripts that periodically send archived redo log files from one database to the other. The consequence is that this configuration does not provide the ease-of-use, manageability, performance, and disaster-recovery capabilities available with Data Guard.+
+"+
Hope That Helps.
Ogan 
As Ogan already mentioned, you cannot use DataGuard but you can still create what is called a "manual standby".
Here is how to do it (I'm assuming that standby database will use the same file names and be located on a separate system)"
1. Send a copy of your primary database to standby host (either copy cold db backup or restore from RMAN backup)
2. Create standby control file on primary (i.e. ALTER DATABASE CREATE STANDBY CONTROLFILE AS ...) and restore it on standby (i.e. RESTORE CONTROLFILE FROM ...)
3. Make primary archived logs available to standby instance. The easiest way is: NFS or you could create a script that sends archived logs from primary to standby host
4. Create "Applier" script that would run these simple SQLPlus commands:
recover standby database;
cancel
Schedule it to run in a loop every 10-15 seconds (or however often you need) so that it can discover and apply all the incoming ARC logs.
5. Create a script to check standby synchronization and run it periodically
That's pretty much it
Maxym Kharchenko 
Hi
With Standard Edition you can accomplish the Standby using Oracle GOLDEN GATE. This requires only Standard edition to work.
Cheers.
Kanchana

single-instance manual standby for a three-node RAC database

Hi all,
I am wondering how it is possible to create a manual standby database for a rac primary database.
Oracle versione is standard edition 11.1.
I have experience creating and managing manual standby for single-instance database; I am wondering if and how I can instruct the single-instance standby database to discover and apply the three redo threads that I will copy from the primary site to the standby site.
Should I use rman to catalog all the archived log on the standby site ?
Should I configure many LOG_ARCHIVE_DEST_n parameters to point to many different path, one for each primary instance (i.e. one for each redo thread), and let rman automagically discover all the archived logs ?
Should I configure only LOG_ARCHIVE_DEST_1 , put archivelogs from all threads in the same folder, and let rman automagically discover all the archived logs ?
Thanks for every answer!
Andrea 
It should work.
For RAC all you should need more standby redo log files and to make sure that the init parameters are the same across cluster.
Notes which may help :
MAA / Data Guard 10g Setup Guide –  Creating a Single Instance  Physical Standby for a RAC Primary ( works on 11 )
http://www.oracle.com/technetwork/database/features/availability/maa-wp-10g-racprimarysingleinstance-131970.pdf
MAA Best Practices - Oracle Database
http://www.oracle.com/technetwork/database/features/availability/oracle-database-maa-best-practices-155386.html
Apply Services in an Oracle RAC Database Environment
http://download.oracle.com/docs/cd/E11882_01/server.112/e17023/dbresource.htm#i1029540
Technical Architecture of 10G RAC primary to RAC DataGuard
http://www.oracledba.org/10g/dr/10gR2_dataguard_RAC_to_RAC.html
Best Regards
mseberg 
Hi,
it works, at least for me in an 2 Node > Single Instance Standby environment.
In my case it is not Data Guard because of standard edition, but you get archive logs from both ( in your case from three ) nodes with different thread identifiers.
The recovery process at standby site will apply the logs in the right manner sorting the different logs as needed. Works like a charm even manually organized.
So i can't think Data Guard will have any problems with this.
hth
Joerg 
Hi Joerg,
thanks for yout reply.
Did you had to catalog all the archivelogs on the standby site ( using rman catalog ... ) or did you specify two different log_archive_dest_n parameters on the standby site ?
thanks,
andrea 
Will bookmark. 
Hi,
indeed i catalog all transfered archive logs in front of the recover process.
During the tests i believe (iirc) i was unable to recover from transfered archivelogs without catalog them first. But this statement is out of my mind, i am not 100% sure for this, sorry.
Some more details.
Because it is a standard edition, i have to use on the RAC side ASM. So our normal scripts to transfer archivelogs from primary to standby are obsolete.
So i decided to put the whole standby thing into the database. Now the primary database uses external scheduler jobs to do the work. The standby side is not using ASM, so there is no need to handle the logs in any special way.
The steps are:
1. Get SCN from primary and standby
2. Transfer the logs for the gap from ASM to "normal" filesystem.
3. Transfer (and compress, if not in LAN) to standby archive dest
4. Catalog on standby side
5. Recover on standby side
6. Delete on normal filesystem (on both sides, but on standby with a delay of 2 days just to be sure)
The steps on the standby side are both using the primary scn from step 1 as a parameter to avoid error messages during the catalog or recover call.
Hth
Joerg 
Hi Joerg,
this sounds really reasonable to me.
I think I will test different ways to implement step 2 (Transfer the logs for the gap from ASM to "normal" filesystem): I will try to use asmcmd cp, dbms_file_transfer, rman to check which one is the best option to me.
I asmcmd should be the best choice as it can copy archivelogs even if the primary database is down, but rman should be the easyest way...
Thanks for sharing your experience
Andrea 
Hi Andrea,
my "solution" uses dbms_file_transfer, because all steps are triggered by scheduler. So, if the database is down, my driving site is down and nothing happens anymore.
Maybe a whole in my concepts, but if we have a customer db down, we have to switch immediately. There is no time to analyze or repair because of business needs.
By
Joerg

Archivelog Mode

Hello,
I am new in Oracle disaster recovery solutions and I try to install and configure Oracle Data Guard 11g R2 Enterprise Edition.
I'd like to know if the both databases (primary and secundary) need to be on archivelog mode (or only the primary).
And also, itś really necessary enable the flashback option on the primary and secundary?
Thanks a lot. 
Hello and welcome to the forum;
The short answer is yes and yes.
I like to think of Data Guard as roles, Primary and Standby. Since you can reverse the roles its best to have them setup the same.
Archive log mode - See Oracle® Data Guard Concepts and Administration 11g Release 2 (11.2) E10700-02
Section :
2.3.2 Oracle Software Requirements
"The primary database must run in ARCHIVELOG mode"
Since the roles can change you want both in ARCHIVELOG mode. Its pointless to try a Data Guard setup without it.
If Flashback Database is not enabled and you ever decide to do a failover you might regret not setting it up. ( I did the first time I tested a failover! )
See Oracle Document E10700-02 again
Section :
8.4 Using Flashback Database After a Role Transition
So I would not only setup a FRA but if I could I would use the same directory structure on the standby server if at all possible to keep things simple.
Here's my short setup notes on Oracle 11 :
http://www.visi.com/~mseberg/data_guard_on_oracle_11_step_by_step.html
Best Regards
mseberg 
I am new in Oracle disaster recovery solutions and I try to install and configure Oracle Data Guard 11g R2 Enterprise Edition.
I'd like to know if the both databases (primary and secundary) need to be on archivelog mode (or only the primary).
And also, itś really necessary enable the flashback option on the primary and secundary?Archivelog Mode:-
dataguard should confiured only in ARCHIVE LOG mode, BTW, no archives will be generted on standby so nothing to worry. Keep in archivelog mode.
Flashback :-
It is not mandatory, It is additional options like to create an restore point & so on. 
Flashback needs for creating restore point when you open your standby database read-write mode. 
here u can find the complete step by steps of creation and maintainance
hope it will help u
http://zubairtheblogger.blogspot.com/2011/10/data-guardbroker-configuration-oracle.html 
Flashback needs for creating restore point when you open your standby database read-write mode.Flashback needs for restore point, but it is not mandatory to build dataguard . Its an option how you choose for your environment.
Hope you understood. 
Yeah I aggre with you. it is not mandatory
CKPT wrote:
Flashback needs for creating restore point when you open your standby database read-write mode.Flashback needs for restore point, but it is not mandatory to build dataguard . Its an option how you choose for your environment.
Hope you understood.

Reg: Switch Over

Hello All,
Oracle Version: 11.0.2.1.0
Edition: SE1
Data Gaurd is not supported in SE1 so it is not possible to switchover.
Can i change the IP of the Standby to Primary and make the stand by database as Primary database.
Can anyone help please 
New_To_Oracle_7912 wrote:
Hello All,
Oracle Version: 11.0.2.1.0
Edition: SE1
Data Gaurd is not supported in SE1 so it is not possible to switchover.
Can i change the IP of the Standby to Primary and make the stand by database as Primary database.I give up.
Can you change the 2 IP#s?
What does this question have to do with Oracle RDBMS.
It is simple OS/Network configuration modification. 
In standard eddition you cannot create a standby database in this case you can clone the database open it in mount state and do recovery of it using your production database archive. In case you want to do a switchover you can open you standby database. 
But it cannot be opened in Read Write mode
it will be opened in Read Only Mode 
New_To_Oracle_7912 wrote:
But it cannot be opened in Read Write mode
it will be opened in Read Only ModeWhy not? Since DG is not available to SE1 this is not a DG setup. Therefore the DG concept of "failover" and the restrictions on the "standby" database also do not apply. As far as Oracle is concerned there is no "standby" database. Just two databases. One of which just happens to have been created by restoreing/recovering from the backup of the other. 
why not? did you try? did you get an error?
yes, it can be opened 
Ya i tried but it opened in Read Only 
how exactly?
as you are performing incomplete recovery when maintaining a manual standby in SE, you will have to open the database with the clause:
startup mount;
alter database open resetlogs; 
I think there is a confusion in terminology:
1) Failover - This is activating the standby database to become a primary database. This involves a resetlogs. Once this is done there is no going back to the standby database (unless you use flashback database). This is what happens in a DR situation when you have lost the primary database. There is always the possibility of some dataloss.
2) Switchover - This is reversing the roles between primary and standby databases. Both primary and standby databases must be available. You can switch back again to the original configuration. There is no dataloss.
Note that both of these options are available in all editions of Oracle (EE, SE, SE1, XE), because they all use the same physical standby database architecture underneath. It is just that in Data Guard it has been automated.
So in Oracle Standard Edition you can also do switchover and failover, it is just that you manually have to do it. There are third party products that can do DataGuard for SE and they have automated the failover and switchover processes in Oracle SE/SE1. One such product is Dbvisit Standby.
The process involved for switchover is:
1) Shutdown the databases (primary and standby)
2) Switch the controlfiles between primary and standby
3) Move the redo logs from primary to the standby
4) Startup the databases
The difficulty comes in where the primary and standby databases have different file locations, or one of them is ASM and the other uses regular file systems. Also RAC makes it all more complicated, as well as OMF.
Dbvisit Standby can handle all scenarios when it comes to switchover. 
startup mount;
alter database open resetlogs;
If i execute the command,
ora-01139 Reset Logs options only valid after an incomplete database recovery 
If it is a standby database try:
SQL> alter database activate standby database;

Categories

Resources