Dataguard Failover Creation
I am about to create a failover with Data Guard using my current Oracle 11g database on Windows 2003. I have done some intensive reading, but I will appreate if anybody can share with me the steps involved in setting up a Data Guard with the same operating system version, but on different computers (Primary database on one Windows 2003 computer and Seconary database on another Windows 2003).
I am looking for answers to questions like "Do I need to install the secondary instance on the server where the seconary database will be?", "Can I use Enterprise Manager to clone?" "What about using RMAN?"
Thank you,
Edited by: azaza on Dec 6, 2009 9:13 AM
Warner,
I was able to replicate on my home PC the dataguard installation on one node and all is working, but EM can't see standby database (I will work to fix that). I don't have all the error with me because I am not home, but will post it when I leave work this afternoon. Meanwhile, the actual dataguard will be installed on a two nodes environment at my job, so if anybody has hands on experience, please post it for me.
Thank you,
Albert
Similar Messages
-
I have a dataguard configuration and after a failover to standby database, log_archive_dest_3 gets set to a default value.
SQL> show parameter log_archive_dest
NAME TYPE VALUE
log_archive_dest string
log_archive_dest_1 string location="+FLASH/dudbdr/", val
id_for=(ONLINE_LOGFILE,ALL_ROL
ES)
log_archive_dest_10 string
log_archive_dest_2 string
log_archive_dest_3 string location="dgsby_dudbdr", valid
for=(STANDBYLOGFILE,STANDBY_
ROLE)
log_archive_dest_4 string
log_archive_dest_5 string
NAME TYPE VALUE
log_archive_dest_6 string
log_archive_dest_7 string
log_archive_dest_8 string
log_archive_dest_9 string
log_archive_dest_state_1 string ENABLE
log_archive_dest_state_10 string enable
log_archive_dest_state_2 string ENABLE
log_archive_dest_state_3 string ENABLE
log_archive_dest_state_4 string enable
log_archive_dest_state_5 string enable
log_archive_dest_state_6 string enable
NAME TYPE VALUE
log_archive_dest_state_7 string enable
log_archive_dest_state_8 string enable
log_archive_dest_state_9 string enable
SQL> ARCHIVE LOG LIST;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination dgsby_dudbdr
Oldest online log sequence 0
Next log sequence to archive 4661
Current log sequence 4661
Does any body know why it get reset instead of keeping the original vaule '+FLASH/dudbdr/'
thanks,If you have already configured FSFO (refer Andy's post), then follow what Andy has said.
If you are using normal method, then for failover:
1. Your current primary database say P would go down or say crashed.
2. Then, you need to change the role of the standby database say S to primary database (called as failover)
3. So, now you would be having the primary database as S to use after performing step 2 (keep in mind that this was your old standby database (S) which has now become primary database (S))
4. Now, you do not have a standby database. The standby database (S) which you had has become the primary database (S). For this you'll have to create a new standby database say S1.
Hope you understood what I meant. :)
To perform failover manually:
1. When your primary (P) database crashes, on the standby database (S) issue the below command:
sql>alter database recover managed standby database cancel; #You would be cancelling MRP on standby database S
sql>alter database recover managed standby database finish; #You would be telling the standby database that the recovery is finished for ever
sql>alter database commit to switchover to primary; #Your standby S would now serve as primary and you would not be having a standby database anymore.Now to create a standby database, you can create a new one from the new primary database if flashback was enabled or you'll have to create from scratch.
I would request you to refer the below thread and the oracle documentation http://docs.oracle.com/cd/B28359_01/server.111/b28295/sofo.htm
You can refer this
recreate standby after failover test
http://arunmarapally.blogspot.in/2011/03/oracle-database-switch-over-and.html -
Dear All,
I am kindanew in oracle dataguard implementation. I want to know how to test failover scenario. I have shutdown the server which contain the primary database but i still dont know how to test the scenario. I keep on executing "select mode from v$database" on the standby database but it still shows mounted state.
Kindly help
Regards
Karam.First test switchover ... does that work? The commands are well documented all over the net including on my website "MorgansLibrary.org"
If switchover works then the next question is have you configured for failover? If so how? In what version? etc. etc. etc.
We need details to be able to provide advice. -
How to avoid data lost in Dataguard failover ?
Hi gurus,
We are implementing Dataguard with manual failover (Not with Fast Start feature)
How to avoid/minimize lost of data if the primary server goes down before the last log is sent ?
Thank you for your help,
xtantoMost important the dataguard protection mode, you have 3 choices: Maximum Performance,Maximum Availability,Maximum Protection . If you are interested in no data loss choose Maximum Protection, that's the definition:
Maximum Protection
This protection mode ensures that zero data loss occurs if a primary database fails. To
provide this level of protection, the redo data needed to recover a transaction must be
written to both the online redo log and to at least one synchronized standby database
before the transaction commits. To ensure that data loss cannot occur, the primary
database will shut down, rather than continue processing transactions, if it cannot
write its redo stream to at least one synchronized standby database.
Because this data protection mode prioritizes data protection over primary database
availability, Oracle recommends that a minimum of two standby databases be used to
protect a primary database that runs in maximum protection mode to prevent a single
standby database failure from causing the primary database to shut down.
For details see the documentation for your unknown database version.
Werner -
DATAGUARD FAILOVER AND SQITCHOVER TESTING
I AM GOING TO TEST FAILOVER AND SWITCHOVER FOR BOTH PRIMARY AND STANDBY.
I AM STARTING FROM SCRATCH .
DOES SOMEBODY HAVE ANY DOCUMENTATION, NOTE ID'S OR ANY LINKS FOR THE SAME
THANKS LOT IN ADVANCE
JAGMOHANFirst test switchover ... does that work? The commands are well documented all over the net including on my website "MorgansLibrary.org"
If switchover works then the next question is have you configured for failover? If so how? In what version? etc. etc. etc.
We need details to be able to provide advice. -
How to re-build the Production database after failover
We have performed a failover in our environment by the below method . It was worst we are not able to bring up the production the only choice left over is failover.
We have enabled the flash back and created a checkpoint then failover.
SQL> select max(sequence#) from v$log_history;
MAX(SEQUENCE#)
9221
SQL> alter system set db_recovery_file_dest_size=14G;
System altered.
SQL> alter system set db_recovery_file_dest='/u01/oradata/flashback';
System altered.
SQL> alter database recover managed standby database cancel;
Database altered.
SQL> alter database flashback on;
Database altered.
SQL> create restore point before_open_standby guarantee flashback database;
Restore point created.
SQL> alter database activate standby database;
Database altered.
SQL> select database_role from v$database;
DATABASE_ROLE
PRIMARY
SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
SQL> select max(sequence#) from v$log_history;
MAX(SEQUENCE#)
9221 (This is the log sequence same after the failover also)
after the we have nearly some 30 log sequence are generated but it started from the no 1.
Now we need to rebuild the Production DB and to sync with the standby.. please help us with the steps and suggest some documents.Hi,
Please take a look at this http://shivanandarao.wordpress.com/2012/08/28/dataguard-failover/
SHANOJ
Handle: SHANOJ
Status Level: Newbie (5)
Registered: Feb 15, 2006
Total Posts: 154
Total Questions: *25 (21 unresolved)*
Name SHANOJ
Location Chennai - India
Occupation DBA
Biography OCP 10G, LPI, ITIL V3
If you feel your questions have been answered, then please consider closing your threads as answered by providing appropriate points rather than leaving it open. Follow the forums etiquette. -
Enable Physical Standby Database
Hi,
I am working on Linix with Oracle Database 10g, I am preforming a test with the data guard
DGMGRL for Linux: Version 10.2.0.3.0 - Production
Copyright (c) 2000, 2005, Oracle. All rights reserved.
Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sys/oracle@DRCP
Connected.
DGMGRL> show configuration
Configuration
Name: DB123
Enabled: YES
Protection Mode: MaxAvailability
Fast-Start Failover: DISABLED
Databases:
PROD - Primary database
DRCP - Physical standby database
Current status for "DB123":
SUCCESS
DGMGRL> failover to 'DRCP'
Performing failover NOW, please wait...
Failover succeeded, new primary is "DRCP"
DGMGRL> SHOW CONFIGURATION;
Configuration
Name: DB123
Enabled: YES
Protection Mode: MaxPerformance
Fast-Start Failover: DISABLED
Databases:
PROD - Physical standby database (disabled)*
DRCP - Primary database
Current status for "DB123":
SUCCESS
My question is how to move back to PROD and enable it, what are the options?
Please advice. Thank youHi,
Since you have performed a FAILOVER, this is a one way process. If you were trying to test the role transitions, then you could have gone with SWITCHOVER which is a 2 way process.
Now, you are having only 1 database which is behaving as primary database and you do not have the standby database. If flashback was enabled on your old primary database, then you can reinstate it to behave as standby database.
Since you are using DGMGRL, you can refer this http://gavinsoorma.com/2009/06/using-flashback-to-reinstate-a-standby-after-a-failover/
If using SQL, then you can refer http://shivanandarao.wordpress.com/2012/08/28/dataguard-failover/ -
9i - AS3.0 cluster on SAN
Hi all,
I am testing Linux and Oracle for our company trying to prove that it's stable and worth implementing in Production. Also trying to setup a neat architecture by booting diskless,off the SAN through fiber channels.. anyways..
I am having a dilemma here with my architecure:
Our DBAs have standards for installing oracle, /opt/oracle/version_here. I have 2 x RH3AS that have access to the same disks on the SAN also, mount points /ocfs1 and /ocfs2.
I'm trying to setup a failover configuration. Server_A and Server_B will both have /opt/oracle/9.x as ORACLE_HOME, and Server_A will be responsible for DB in /ocfs1, Server_B will be responsible for DB in /ocfs2, and if Server_A fails/crashes/dies/put_your_scene_here:) Server_B mounts /ocfs1 and recovers the DB and continues with the operations. But.. I wish too it was as easy as I described it!..
I tried sharing the same ORACLE_HOME by both machines, and with the filesystem ext3 it's not a good idea to have 2 servers write to the same partition, (we need file locking, etc..), so I formatted my /opt/oracle with ocfs but its TOO slow, we've been installing 9i since this morning and it's still at 18%..So I don't think it would be a good idea running from an ocfs ORACLE_HOME with ocfs-1.0.11. Until we see ocfs2 I'm stuck with this problem. The company doesn't want to go with RAC. The DBA assigned with me on this project tested Dataguard and says that failover should be done manually, etc.. anyways, do you guys have any suggestions? worst case scenario I need the command line for dataguard failover so I can include that in the RedHat cluster manager shell script for automatic failover..
any feedback would be appreciated! architecture, solutions, suggestions..
Thanks,
Edmond BaroudThe documentation states that regular files are not supported, but should work. I've been using ocfs with regular files without any performance issues. I suspect your issue is actually the installer trying to write to the same ORACLE_HOME from both nodes. I have always used ORACLE_HOME on the local disks, this allows patching each node without taking the database down. Try configuring it this way, or installing the software as a standalone and then converting it to a RAC install.
-
Dataguard creation with Grid Control
hi all
i'm trying to create a physical standby database with grid control. (asm to asm)
after setting various properties in the wizard, grid goes on creating a broker config and when it gets to the step "preparing standby database creation" it fails with "ERROR: invalid username and/or password."
no more info on where it fails.
preciate if anyone has any tips on what to check.Hi jstem,
thank you for your help
The initial status of the DATAGUARD is SUCCESS, and all is working fine with the BROKER.
The"Availability"=>"Dataguard Administration" page is correct, all the indications are right, except :
- Estimate Failover Time : Not available
Here is the output of 'Verify Data Guard Setup'
Initializing
Connected to instance srv-bdd02:PHOENIX
Starting alert log monitor...
Updating Data Guard link on database homepage...
Skipping verification of fast-start failover static services check.
Data Protection Settings:
Protection mode : Maximum Availability
Redo Transport Mode settings:
PHNXFIN: SYNC
PHNXENT: SYNC
Checking standby redo log files.....OK
Checking Data Guard status
PHNXFIN : Normal
PHNXENT : Normal
Checking inconsistent properties
Checking agent status
WARNING: No credentials available for target. srv-bdd01
Attempting agent ping ... OK
WARNING: No credentials available for target. srv-bdd02
Attempting agent ping ... OK
Checking applied log on PHNXENT...OK
Processing completed.
Yes, i've already investigated about credentials ...
ALL the credentials are OK for hosts, instance, agent, .... don't know where to add more credentials .... -
Still at the beginning of the learning curve here....
I am looking to create a Solaris 10 failover zone in my 3.2 Cluster.
I see documents claiming both ways that the zone can or cannot have its zonepath on a globally shared file system.
So, do I
Create equivalent zones on the local drives, then add a pointer in the zone to a file system on the global area, then go forward with my cluster resource creation from there
-or-
No, just create the zone on the shared storage area once from node 1, the delete it and create it from node 2, then bring in HAStorageplus, etc.
Thanks.I've been trying to configure a failover zone on my cluster and I'm having a terrible time. I do remember seeing somewhere that zones needed to be on a local filesystem, but I can't find that now.
I'm following these instructions: http://docs.sun.com/app/docs/doc/819-3059/6n5aafjor?a=view
Everything goes as expected and I have this:
$ clrg status
Cluster Resource Groups ===
Group Name Node Name Suspended Status
nfs-rg stnv240a No Online
stnv240b No Offline
web-rg stnv240a No Online
stnv240b No Online
zone-rg stnv240b No Online
stnv240a No Offline
$ clrs status
Cluster Resources ===
Resource Name Node Name State Status Message
cluster stnv240a Online Online - LogicalHostname online.
stnv240b Offline Offline
nfs-stor stnv240a Online Online
stnv240b Offline Offline
nfs-res stnv240a Online Online - Service is online.
stnv240b Offline Offline
web-stor stnv240a Online Online
stnv240b Online Online
zone-rs stnv240b Online Online
stnv240a Offline Offline
$ zonecfg -z cwm -f cwm-failover.cfg
$ zonecfg -z cwm info
zonename: cwm
zonepath: /global/nfs/zones/cwm
brand: native
autoboot: false
bootargs:
pool:
limitpriv:
scheduling-class:
ip-type: shared
net:
address: 204.155.141.145
physical: bge0
defrouter not specified
But then I can't boot. I got a similar error trying to configure a sparse zone. Install fails there, as it can't mount /lib
$ zoneadm -z cwm boot
zoneadm: zone 'cwm': "/usr/lib/fs/lofs/mount -o zonedevfs /global/nfs/zones/cwm/dev /global/nfs/zones/cwm/root/dev" failed with exit code 33
zoneadm: zone 'cwm': call to zoneadmd failed
Any help or ideas here?
Solaris 10 10/08 s10s_u6wos_07b SPARC
Solaris Cluster 3.2 u1 but patched so I have sczonecluster. -
Oracle 10g dataguard Connect-time failover Parameter 15 minutes
Hello,
we running a system with DataGuard in Maximum Availability protection mode and one physical Standby Database. There are two connections between primary and standby. I configured listener and tnsnames to perform a Connect-time failover in case one connection is down. In first place it seemed to work fine but since it has happened that the primary always hangs for exactly 15 minutes until the failover is performed. (ALL redologs need archiving)
I think this must be the default value of a Parameter but reading docs for hours I can't find it.
Can anybody help me?
Best regards
FritzIt's like this. The connection failover I'm talking about is only between the primary database and standby database. I have two connections between them. That makes two addresses for the service (servicetostandby) specified in the log_archive_dest used by dataguard. In my case the log_archive_dest Paramater looks like this:
log_archive_dest_3 = 'SERVICE servicetostandby OPTIONAL LGWR SY
NC AFFIRM VALID_FOR=(ONLINE_LO
GFILES,PRIMARY_ROLE) DB_UNIQUE
NAME=standby REOPEN=10 NETTIME
OUT=9'
The tnsnames.ora entry looks like this:
servicetostandby =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = address1)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = address2)(PORT = 1521))
(FAILOVER=true)
(LOAD_BALANCE=false)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = standby)
So if either address1 or address2 is down dataguard should use the other address to connect to the standby database.
Maybe because of the Maximum Availability protection mode the primary database does not perform if the standby database is not available. I'm not sure about that. But fact is that if I power off the standby database, the primary database hangs only for 9 seconds. That's specified in the net_time_out attribut of the log_archive_dest Parameter. So I'm quite sure that something in the oracle net service causes the problem.
With the "primary hangs" I mean: After the used connection (say address1) went down the redologfiles of the primary database get filled and then it stops for 15 minutes. The messages in the alert.log:
Thread 1 cannot allocate new log, sequence 1304
All online logs needed archiving
After 15 minutes the connection via address2 is established and everything works fine.
I hope I made myself clear this time and didn't confuse you totally.
Edited by: user633694 on Apr 14, 2009 8:13 AM -
How to test failover of dataguard environment?
I would like to test failover (not switchover ) in dataguard environment.
How to achieve that?
Thanks.Hello;
Happy to share my test notes :
http://www.visi.com/~mseberg/Data_Guard_Failover_Test_using_SQL.pdf
These oracle notes may also help :
Can We Use Manual SQL*PLUS Steps For (switchover,Failover,etc....), If DataGuard Broker Has Already Activated And GridControl Is Also Used? [ID 744396.1]
Oracle10g: Data Guard Switchover and Failover Best Practices [ID 387266.1]
Step by Step Guide on How To Reinstate Failed Primary Database into Physical Standby [ID 738642.1]
Best Regards
mseberg -
Hopefully my last dataguard topic - Failover & reinstate
So I have a 10.2 setup with a primary and physical standby.
I've configured dataguard broker and it all looks good.
Now I'm trying to test failover. I shutdown the primary, executed a failover command in dgmgrl to failover to the standby and it's up and running....
I can't get the new standby (old primary) to reinstate. All I get is ORA-16653: failed to reinstate database. The docs say if it fails, you have to go through the steps to create a standby database as you did at the start of this entire process.
Okay, well from where I'm sitting, all of the settings are already done (since I set them all on the primary before it was disabled), so the only thing I should need is to get a standby control file from the primary and copy it in...but it still won't reinstate. I copied the database from primary over to secondary...still won't. I can mount it but cannot select from any of the v$ views. I've restarted the listener, no help.
The way this is configured, is I have the exact same instance name on two different servers. The only difference between them is the unique_db_name (band & bandbackup). I created tnsnames entries on each box that correspond to the unique names.
I guess I don't see why this is so hard. I have two databases, the current primary is originally a copy of the old primary which had all of the needed alters run on it. The only difference was in the spfile settings (opposite unique_db_names for delivery) and I've verified those are set. What am I missing?Look, here's what I do to reinstantiate a failed standby:
1. Remove all the DataGuard configuration including DataGuard parameters in Primary and Standby init files.
2. Change the DB_UNIQUE_NAME of the Primary to what it should be (BAND, for you)
3. Put every tablespaces in turn in BACKUP mode and rcp their DATAFILEs to remote standby host.
4. Create a standby controlfile, rcp it to remote standby host.
5. Multiplex the standby controlfile as needed
6. Create a pfile from the primary spfile and change needed parameters (LOG_ARCHIVE_DEST_n, DB_UNIQUE_NAME) to reflect it's a STANDBY database now.
Transfer this pfile to remote standby host and build a spfile from it
7. Startup the standby in mount mode, check the necessary archive log files to bring it to a concistent point in time.
Because the rcps and other processes can take time it's a fuzzy copy of the main database. Then rcp the archived redo logs to the standby and "recover standby database until cancel".
Once this is done, put the standby in recover managed mode, check if MRP is started up (from v$bgprocess) and check apply status (from v$managed_standby).
8. choose a LOG_ARCHIVE_DEST_n from the Primary and set a SERVICE to the new standby.
Then switch current logfile. Check the sending status in alert log. Check on standby host the archive is received.
9. check apply progress in v$managed_standby
10. no step 10 all is OK.And this has always worked for me!
About your other question: "what does the DG Broker do?"
The GB Broker, as for me helps in mainly 2 points:
. Check the configuration. It monitors if everything is ok, and ensores log sending and in max protection mode the shutdown of the primary if standby is unrechable, and so on.
. Enables the switchover option, which isn't available without a DG Broker (IIRC).
Good Luck,
Yoann. -
11g dataguard client tnsname.ora entry format for switchover and failover
I need format for the tnsnames.ora to use for the enduser when failover or switchover occurs in 11g dataguard.
http://download.oracle.com/docs/cd/B19306_01/network.102/b14213/tnsnames.htm#sthref722
-
Dataguard switch/failover tests notes
version 9i-11g
somebody can share different scenarios for this testing?version 9i-11g
somebody can share different scenarios for this testing?It would be precious to go through all:
1. [Oracle10g: Data Guard Switchover and Failover Best Practices|https://metalink2.oracle.com/metalink/plsql/f?p=130:14:8262553999369510259::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,387266.1,1,1,1,helvetica]
2. Assuming you don't have dataguard broker. [Performing Switchover in a Data Guard Configuration without the Data Guard Broker|https://metalink2.oracle.com/metalink/plsql/f?p=130:14:8262553999369510259::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,232240.1,1,1,1,helvetica]
Regards,
S.K.
Maybe you are looking for
-
Mistakenly reversed goods receipt after invoice posted
Hi experts, I already post this question in EAM forum, but moved to here as I think I will get more useful replies. I have a PO that was goods receipted and invoiced receipted. Later on, the GR was reversed, and now that entry needs to be reverse...
-
I received an email with an attachment, read the attachment once, and when I went to re-read it, it had been enclosed in <>'s and was no longer open-able.
-
Airport disk not visible in windows (XP)
I have 3 computes 2x imac + one PC under Windows XP I use time capsule (7.4.2) for the network + file sharing. Almost everything works ok. Only issue is that I do not have airport disk access from the PC/Windows. On the PC I have Airport Utility 5.4.
-
Files from macbook pro to iPad
what is best way to transfer using Mountain Lion? thank u joanlvh
-
I am not sure if Firefox is preventing me from using a program to protect my passwords, but I am now unable to use it via this browser (I believe I have v21 installed...whatever the current version is). To describe the program, it is basically like o