Standby database failover
Hi Guys,
I don't have much 'real time' experience with Oracle db failovers and setting up standby databases etc. But I have a scenario here and was wondering how would one go about it. I know there could be many ways for this. I have done reading stuff online but there are so many different approaches, different scenarios etc..
I have a primary site with a primary db and a standby db in a different site.
If the primary db has been
I should have mentioned that the Oracle version in question is: 9.2.0.x and the OSs involved are Windows based.
Amit,
This was only a scenario and it did not actually happen. I was considering a situation where the systems are in a state where the primary db cannot be brought back up and I'd have to run from the standby db.
So what you are saying is, the 'current' redo log file relating to the primary db (but located on a separate disk) will be of NO USE to 'apply' to the standby db to keep it in sync with primary db before it went down. Is this correct?
Can I not use Oracle 'real time apply' to use the above 'current redo log' file on the standby db would you know such as : -
alter database recover managed standby database using current log file;
TIA
Similar Messages
-
Standby database failover flashback restart as standby gap 1-100
Hi,
I have setup a physical standby database for a 3 node RAC primary database and configured the database to run in MAXIMUM AVAILABILITY mode. Both the primary and standby databases use ASM for managing the IO. I have enabled FLASHBACK ON on both the databases.
I did failover to standby database with primary db SHUTDOWN for doing some testing. After testing is done, I flashbacked the (standby, currently primary)database to the point when it became primary and start it as standby again and the old primary as primary.
Following are the steps:
Failover steps
.Shutdown the primary database
To finisish the recovery at standby
SQL>alter database recover managed standby database finish;
To start as primary
SQL>alter database commit to switchover to primary;
do some DML on the new primary
SQL>flashback database to scn <standby_became_primary_scn>;
SQL>alter database create standby controlfile as '/backup/standby.ctl';
Changed the spfile to point control_files to '/backup/standby.ctl';
Restarted the standby db in mount mode and
created the required stanbdy logs on it.
Then issued
SQL>alter database recover managed standby database using current logfile disconnect;
I have the following message in v$dataguard_status at standby db;
Fetching gap sequence in thread 1 branch(resetlogs_id) 653234404, gap seq 1-100
DBID 2651011616 branch 653234404
GAP - thread 1 sequence 1-100
FAL[client]: Failed to request gap sequence
FAL[client]: All defined FAL servers have been attempted.
The same error is found in alert log file also.
The status of the varioud managed standby db are as follows.
SQL> select process, status from v$managed_standby;
PROCESS STATUS
ARCH CLOSING
ARCH CLOSING
ARCH CLOSING
MRP0 WAIT_FOR_GAP
RFS IDLE
RFS IDLE
RFS IDLE
RFS IDLE
RFS IDLE
RFS IDLE
RFS IDLE
PROCESS STATUS
RFS IDLE
RFS IDLE
RFS IDLE
RFS IDLE
15 rows selected.
SQL>
Could you please help me how to resolve the above error.
Thanks,
SreekanthSreekanth,
I think your steps are right on for your requirement, except instead of
alter database create standby controlfile as '/backup/standby.ctl';
you can do this:
ALTER DATABASE CONVERT TO PHYSICAL STANDBY;
(although perhaps it achieves the same thing internally but you don't need to repoint to new controlfile).
So far as the GAP - thread 1 sequence 1-100
Let me guess, your current sequences are probably well ahead of this reported gap?
If so, this is a bogus gap in a sense that your standby has long ago applied them, but for some reason standby controlfile gets a little confused and starts asking for them again.
I have had this issue and opened multiple TAR's with Oracle since 10.2.0.1, got a few patches and advises to upgrade, but still occasionally get it now in 10.2.0.3
I strongly believe this is related to combination of RAC (i.e. multiple threads of redo) and dataguard.
It is also pretty hard to reproduce (I have not figured out how to reproduce this reliably, if you have, let me know), so I can understand why Oracle has so far been unable to fix this.
Anyway, the workaround is to re-create standby controlfile with a copy generated on primary, and move it in place of the existing (and confused) controlfiles on standby. -
9i Standby Database - Failover Question - REF 227196.1
Hi ,
Im researching the use of a Standby DB for out Production DB....
The Metalink DOC 227196.1 mentions that in failover , the Production going down , Standby becomes Primary and cannot be come Standby again , whereas with Switchover , they can be swapped as many times as you need for upgrades etc...
"The Difference between a Switchover and a Failover is, that after a Failover, the Standby Database becoming a Primary now, cannot switchback to become a Standby Database again. In Opposition a Switchover exchanges the Database Roles (The Primary becomes a Standby and the Standby becomes a Primary). Switchovers can be performed arbitrarily, a Failover only once."
If failover happens can someone tell me or point me in the right direction:
a) Can you config Failover to happen automatically?
b) If failover occurs , do you need to reconfig all the Primary/Standby DB again in the event that failover happens again?
c) Any clear step by step guide to config of standby... The Oracle docs whilst very good are robust and some "summary" steps would be great
thanks in advance
StephenHI,
Please check this link:
Physical Standby Database SWITCHOVER &amp; FAILOVER Operations | Talip Hakan Ozturk&#039;s ORACLE BLOG
Thank you -
Restore/recover after failover to a Logical Standby database
I have a question about how to recover or restore back to my original environment after I failover to my Logical Standby database.
My setup is as follows: Oracle version 11.2.0.3, Non-RAC.
1. A Primary database at one location.
2. A Physical Standby database at a second location.
3. A Logical Standby database at a third location.
All three databases have Flashback Database on
All three databases are configured thru the Data Guard Broker.
All three databases has a Fast Recovery Area.
Suppose I loose my primary database (1) and my Physical Standby database (3) so I Failover to my only remaining database, the Logical Standby database (2).
What type of Databases are let after the this failover?
What are my recover/restore/Instantiate options?
The Data Guard Concepts book on 13.2.2 says how to bring the old Primary in to the Data Guard Configuration as a new Logical Standby database.
How do I get back to the original configuration above, a primary, a Physical, and a Logical Standby without having to re-create some databases?
Will Flashback database thru the Broker or Cloud Control/Grid Control rewind my databases?Suppose I loose my primary database (1) and my Physical Standby database (3) so I Failover to my only remaining database, the Logical Standby database (2).
What type of Databases are let after the this failover?
What are my recover/restore/Instantiate options? Then forget about your current primary database, its out of network.
AFAIK
Now you will have only Physical standby & logical standby. Now you will perform failover only current standby to primary database.
So now you will have only one primary database with new incarnation, so you have to recreate a new standby database again.
The Data Guard Concepts book on 13.2.2 says how to bring the old Primary in to the Data Guard Configuration as a new Logical Standby database.
How do I get back to the original configuration above, a primary, a Physical, and a Logical Standby without having to re-create some databases?
Will Flashback database thru the Broker or Cloud Control/Grid Control rewind my databases?Check this. But not much aware of Clound control and all. Sorry for that. ;-) I'm sure Uwe/Mseberg can answer this ;-)
http://www.idevelopment.info/data/Oracle/DBA_tips/Data_Guard/DG_49.shtml#Flashing%20Back%20a%20Failed%20Primary%20Database%20into%20a%20Logical%20Standby%20Database -
Failover To Physical Standby Database
We have 3 node RAC 11.2.0.3 Primary database data guarded to a 3 node RAC 11.2.0.3 Standby database. There is an activity scheduled to perform some of order extracts in the database which is going to result in a lot of changes. Currently the discussion is on whether what should be the quickest way to go back to a point in time before the extract process starts in case of any issues. The options that we are looking at are:
1) Create a guaranteed restore point on both the Primary and Standby and use this to flashback the database (Quick but we have had issues where in the guaranteed restore point still does not guarantee the availability of the flashback logs) - Tested
2) Use RMAN backup from a day before to restore and recover to point in time before the extract process began (Time consuming) - Tested
3) Use export backup to perform a redirected restore i.e import the data from before the extract process (Time consuming) - Tested
4) Create a guaranteed restore point on both Primary and Standby, stop the Redo Apply/Ship at the time we create the guaranteed restore point and at a point we face some issue and need to go back, simply failover to the physical standby database and then reinstate the new standby database - This has not been tested yet but seems a viable option
With regard to the point 4, note that we are not concerned about data loss as the whole point of stopping the redo apply is to prevent the standby to be caught up with Primary during the run of the extract process. The question is whether the dataguard broker will allow failover of the primary to standby, in a situation described in bullet point 4). Please advice.HI,
Please check this link:
Physical Standby Database SWITCHOVER &amp; FAILOVER Operations | Talip Hakan Ozturk&#039;s ORACLE BLOG
Thank you -
Failover from standby database to primary database
Hi,
Can anyone suggest me, How to do " Standby DataGuard database to primary database (dataguard)".
Kindly Give me steps.
Thanks,
ShwetaHi
Follow these steps
Oracle switchover operation:
1. Check and verify the role parameter on the v$parameters both primary and standby
On Primary
Log_archive_dest_1=”this is the local archive destination”
+Log_archive_dest_2=”This is the Service [TNS ENTRY]”+
Log_archive_dest_state_1=Enable
Log_archive_dest_state_2=Enable
Fal_server=”this should have the tns entry for the standby
Fal_Client=”this should have the tns entry for the primary
Standby_archive_dest=”This should have the Location where the archive located”
Standby_File_Management=AUTO
On Standby
Log_archive_dest_1=”this is the local archive destination”
+Log_archive_dest_2=”This is the Service [TNS ENTRY]”+
Log_archive_dest_state_1=Enable
Log_archive_dest_state_2=DEfer
Fal_server=”this should have the tns entry for the primary
Fal_Client=”this should have the tns entry for the standby
Standby_archive_dest=”This should have the Location where the archive located”
Standby_File_Management=AUTO
2. Down all the applications connects to the database
3. Shutdown both primary and standby databases
4. For RAC Keep Only one primary and One standby up and all other nodes should be down
5. Check the Primary database on Open mode and the Standby database on mount stage
6. On Primary
SQL>select switchover_status from v$database;Sessions Active or To standby will be appearing on the result
SQL> alter database commit to switchover to standby with session shutdown;
SQL> shutdown Immediate;
SQL>startup nomount;
SQL>alter database mount standby database;
SQL>Alter system set log_Archive_dest_state_2=defer;7. On Standby
SQL>select switchover_status from v$database;it is acceptable to have Sessions Active or To Primary
SQL>alter database commit to switchover to primary with session shutdown;
SQL>shutdown immediate;
SQL>Startup;
SQL.>Alter system set log_archive_dest_state_2=enable;8. On Primary
start the managed recovery
SQL>Alter database recover managed standby database disconnect from session;9. Check the log shipment is working from New Primary to New Standby Using
SQL>Alter system switch logfile; ---- On New Primary.check the alert log on both Primary and Standby for the log shipment and Media recovery.
10. If the switch over fail issue the following statement on standby (ORACLE 9i)
SQL> alter database recover managed standby database finish skip standby logfile ┘
SQL> alter database commit to switchover to primary┘
SQL> shutdown immediate;
SQL> Startup;11. If this don’t work please issue the below statement
SQL> alter database activate standby database skip standby logfile;12. If the switch over fail issue the following statement on standby (ORACLE 10g and above)
SQL> alter database recover managed standby database finish force;
SQL> alter database commit to switchover to primary;
SQL> alter database open;
SQL> shutdown Immediate;
SQL> startup;13. Added the temp file to your temp tablespace
If you follow the steps (10,11 & 12 ) you have to recreate the standby again. those steps are actually fail over steps. Hope this will be helpful
Cheers
Kanchana -
Logical Standby Database in NOARCHIVE Mode
Hi,
I have configured a Logical Standby Database for Reporting purposes. A Physical Standby Database is running for MAA. i.e. in case of Role Transition (switch/Failover) the Physical Stdby Db will get the role of the Primary.
The logical standby database is creating a lot of Archive Redologs files, nearly every minute. Redolog files are 50MB and there is no work done in db during the time. I'm NOT using Standby Redolog files.
Is there a need for logical standby database to be in NOARCHIVELOG mode? The Primary is definatley in ARCHIVELOG mode.
Thanks for any responses.
regards
Sahbahi,
well there are two things to the above:-
1. there was an archive file nearly every minute:
this is due to a db recovery. for some reason, the db was in inconsistent state, after a sudden shutdownof the OS. I was on a test environment, on windows vista, unfortunately. unimportant ... a reboot solved it.
2. Logical standby db in NOARCHIVE MODE when setup for the purpose of Reporting.
As long as the MAA configured for the primary db, such as physical standby db, and a second, the logical standby db setup purely for the purpose of reporting, which then can run with NOARCHIVELOG mode, after converting the physical standby db to logical.
logical standby db uses Streams architecture, so this method brings cost, time and performance advantages to the customer.
regards
Sahba -
How to configure standby database in a single machine
I am in Windows XP professional and oracle 9i . I want to configure a standby database for a database called proddb in the same machine. For doing this, I created a standby controlfile. But this work for the same name standby database?. How this happen ? two database with same name possible? How to create the second database (Standby) Please help?
ShijuThe Oracle Solaris Cluster concepts guide has some information on which zone model to choose:
http://docs.oracle.com/cd/E18728_01/html/821-2682/gcbkf.html#scrolltoc
When managing a Solaris zone with the HA Zones agent, the cluster basically regards the non-global zone as a blackbox.
As such you can either start the Oracle database as part of the runlevel/SMF startup of the non-global zone, or you can use the sczsh or sczsmf component and use your own scripts to start, probe and stop the Oracle database.
Usage of the standard HA Oracle data service is not supported in combination with the HA Zones agent.
If you require a more fine grained control of services running in non-global zones, why not setup a zone cluster and then having HA Oracle failover the Oracle database between non-global zones?
Regards
Thorsten -
Can I use data guard to create a RAC standby database for a non RAC primary
Hi,
we need to RAC our production database but the normal methods will mean a long outage. It is possible to create a standby as a single node RAC database and when ready do a graceful failover to the standby database and open it for business. The next step would be to create another RAC node from this on the original server.
servers are already cluster aware, using ASM etc
Oracle 10.2Yes, you will be able to setup RAC stnadby for a non-RAC Primary. For primary it just needs a available destination for redo shipping it doesn't matter whether it's RAC enabled or not. And ofcourse you are using 10.2 anyway only one node will be running MRP and that is too in standby mount mode.
However since you have are using You may follow below sequence.
1. Setup a new standby as RAC enabled.
2. Perform a switchover.
3. Shutdown the Old primary (which is standby now).
4. Install CRS and RDBMS on the old primary and it's new node.
5. Modify the cluster_database=TRUE and cluster_database_instances=<required number of instances>.
With above modification mount the standby database in standby mode and start MRP.
6. Introduce the database and instances to the OCR using SRVCTL add command.
7. Once you your database is synchronized with Primary do a switchover.
9. Now you can repeat step 3 to 6 on the other site too. <- if you need your secondary site to be RAC enabled too
10. Finally both the sites should be RAC enabled.
Hope this is helpful!!!
Thanks,
Asif Haliyal -
Creating standby database from ASM production database in standard edition
Hi,
I am using oracle 10g release 2 standard edition. I recently created a database instance and wanted to create a standby database instance. After sorting out how to achieve this without managed standby and data guard I finally got it working and the shipped archive logs are applied and working well on the standby database.
Now I am thinking of re-creating my production database and using ASM for storage managment. By doing this can a standby database still be created from a primary database using ASM? I want to be sure I can before I commit to using ASM for the production instance and manually creating a standby database from that instance.
Note: I am using standard edition not enterprise edition.Hi
For Oracle SE standby, you can visit www.anbultechnologies.co.uk , they have a brilliant product name DRMC which is Automatic disaster recovery solution with automatic failover in case primary goes down due to any reason.
We are using this product for more than 2 years and it works like a dream using Oracle Standard Edition. We have depolyed more databases and Standby solution within the prices of 2 EE edition licenses.
You can give ma try as well.
website address is www.anbultechnologies.co.uk -
Problem Converting standby database from snapshot to physical
Any help willl be greatly appreciated...
I am trying to convert a standby database that is in "snapshot" mode back to "physical" standby and I am encountering problems in the process from the "DGMGRL" command line.
Both instances are on the same physical machine. Everything was working fine untill I tried to change the db from snapshot to physical. The DGMGRL starts the conversion process and is able to shutdown but when trying to restart the instance is fails and reports that the service is not defined.
Here is the issue I am facing:
C:\app\MMJ\product\11.1.0\db_1\BIN>
C:\app\MMJ\product\11.1.0\db_1\BIN>set ORACLE_SID=I11G1 <======= the primary database
C:\app\MMJ\product\11.1.0\db_1\BIN>dgmgrl
DGMGRL for 32-bit Windows: Version 11.1.0.6.0 - Production
Copyright (c) 2000, 2005, Oracle. All rights reserved.
Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sys/password@i11g1sb <===== the standby database currently in snapshot mode
Connected.
DGMGRL> connect sys/password@i11g1 <==== the primary database
Connected.
DGMGRL> convert database 'i11g1sb' to physical standby;
Converting database "i11g1sb" to a Physical Standby database, please wait...
Operation requires shutdown of instance "i11g1sb" on database "i11g1sb"
Shutting down instance "i11g1sb"...
Database closed.
Database dismounted.
ORACLE instance shut down.
Operation requires startup of instance "i11g1sb" on database "i11g1sb"
Starting instance "i11g1sb"...
Unable to connect to database
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
Failed.
You are no longer connected to ORACLE
Please connect again.
Unable to start instance "i11g1sb"
You must start instance "i11g1sb" manually
Failed to convert database "i11g1sb"
DGMGRL> show configuration
Configuration
Name: DGConfig1
Enabled: YES
Protection Mode: MaxPerformance
Databases:
i11g1 - Primary database
i11g1sb - Snapshot standby database (disabled)
Fast-Start Failover: DISABLED
Current status for "DGConfig1":
SUCCESS
DGMGRL> exit
C:\app\MMJ\product\11.1.0\db_1\BIN>set ORACLE_SID=I11G1SB
C:\app\MMJ\product\11.1.0\db_1\BIN>sqlplus /nolog
SQL*Plus: Release 11.1.0.6.0 - Production on Wed Mar 25 11:40:16 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
SQL> connect / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 426852352 bytes
Fixed Size 1333648 bytes
Variable Size 369100400 bytes
Database Buffers 50331648 bytes
Redo Buffers 6086656 bytes
Database mounted.
Database opened.
==============>>>> as you can see I can start the standby database without any problems and even query the table in which I made some changes. I had added the record with "Region_ID"=30. I have
SQL> select * from hr.regions;
REGION_ID REGION_NAME
30 JAPAC
1 Europe
2 Americas
3 Asia
4 Middle East and Africa
SQL>
The same table on the primary database has the following records in the same table:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\MMJ>set ORACLE_HOME=c:\app\mmj\product\11.1.0\db_1
C:\Documents and Settings\MMJ>set ORACLE_SID=i11g1
C:\Documents and Settings\MMJ>
C:\Documents and Settings\MMJ>cd %ORACLE_HOME%
C:\app\MMJ\product\11.1.0\db_1>cd bin
C:\app\MMJ\product\11.1.0\db_1\BIN>
C:\app\MMJ\product\11.1.0\db_1\BIN>
C:\app\MMJ\product\11.1.0\db_1\BIN>sqlplus /nolog
SQL*Plus: Release 11.1.0.6.0 - Production on Wed Mar 25 11:43:10 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
SQL> connect / as sysdba
Connected.
SQL>
SQL> select * from hr.regions;
REGION_ID REGION_NAME
1 Europe
2 Americas
3 Asia
4 Middle East and Africa
20 JAPAC
40 JAPAC
6 rows selected.
SQL>
=======> The TNSPING works fine against both the databases.
C:\app\MMJ\product\11.1.0\db_1\BIN>set O
ORACLE_HOME=c:\app\mmj\product\11.1.0\db_1
ORACLE_SID=I11G1SB
OS=Windows_NT
C:\app\MMJ\product\11.1.0\db_1\BIN>
C:\app\MMJ\product\11.1.0\db_1\BIN>tnsping i11g1sb
TNS Ping Utility for 32-bit Windows: Version 11.1.0.6.0 - Production on 25-MAR-2009 16:56:42
Copyright (c) 1997, 2007, Oracle. All rights reserved.
Used parameter files:
c:\app\mmj\product\11.1.0\db_1\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = MHost)(PORT = 1523))) (CONNECT_DATA = (SERVICE_NAM
E = I11G1SB)))
OK (230 msec)
C:\app\MMJ\product\11.1.0\db_1\BIN>tnsping i11g1
TNS Ping Utility for 32-bit Windows: Version 11.1.0.6.0 - Production on 25-MAR-2009 16:56:47
Copyright (c) 1997, 2007, Oracle. All rights reserved.
Used parameter files:
c:\app\mmj\product\11.1.0\db_1\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = MHost)(PORT = 1523))) (CONNECT_DATA = (SERVICE_NAM
E = I11G1)))
OK (30 msec)
C:\app\MMJ\product\11.1.0\db_1\BIN>lsnrctl
LSNRCTL for 32-bit Windows: Version 11.1.0.6.0 - Production on 25-MAR-2009 16:57:01
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Welcome to LSNRCTL, type "help" for information.
LSNRCTL> set current_listener i11g1
Current Listener is i11g1
LSNRCTL> services
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MHost)(PORT=1523)))
Services Summary...
Service "I11G1" has 1 instance(s).
Instance "I11G1", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:1 refused:0
LOCAL SERVER
Service "I11G1SB" has 1 instance(s).
Instance "I11G1SB", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:55 refused:1
LOCAL SERVER
Service "I11G1SB_DGMGRL" has 1 instance(s).
Instance "I11G1SB", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
Service "i11g1.mhost" has 1 instance(s).
Instance "i11g1", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:6 refused:0 state:ready
LOCAL SERVER
Service "i11g1XDB.mhost" has 1 instance(s).
Instance "i11g1", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: MHost, pid: 3944>
(ADDRESS=(PROTOCOL=tcp)(HOST=MHost)(PORT=1430))
Service "i11g1_DGB.mhost" has 1 instance(s).
Instance "i11g1", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:6 refused:0 state:ready
LOCAL SERVER
Service "i11g1_XPT.mhost" has 1 instance(s).
Instance "i11g1", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:6 refused:0 state:ready
LOCAL SERVER
Service "i11g1sb.mhost" has 1 instance(s).
Instance "i11g1sb", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
Service "i11g1sbXDB.mhost" has 1 instance(s).
Instance "i11g1sb", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: MHost, pid: 7336>
(ADDRESS=(PROTOCOL=tcp)(HOST=MHost)(PORT=1931))
Service "i11g1sb_DGB.MHost" has 1 instance(s).
Instance "i11g1sb", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
Service "i11g1sb_XPT.mhost" has 1 instance(s).
Instance "i11g1sb", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
The command completed successfully
LSNRCTL>Thanks for the response.
So, here is the status now....with a little background...
After my original post, I started to read the manuals and I found the sql command to convert the database back from snapshot to physical standby (sb).
That worked fine and I had my snapshot sb back to physical sb.
So when you posted the suggestion, I already had my db in physical sb mode. I said no problem, I will convert it back to snapshot and then back again using dgmgrl instead of sql+
Well here is how my listener is configured now.
SID_LIST_I11G1 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = I11G1.MHOST)
(ORACLE_HOME = c:\app\mmj\product\11.1.0\db_1)
(SID_NAME = I11G1)
(SID_DESC =
(GLOBAL_DBNAME = I11G1SB.MHOST)
(ORACLE_HOME = c:\app\mmj\product\11.1.0\db_1)
(SID_NAME = I11G1SB)
(SID_DESC =
(GLOBAL_DBNAME = I11G1SB_DGMGRL)
(ORACLE_HOME = c:\app\mmj\product\11.1.0\db_1)
(SID_NAME = I11G1SB)
Then using dgmgrl I tried to change the db from p-sb to s-sb and the results are not good....
"i11g1 >"dgmgrl
DGMGRL for 32-bit Windows: Version 11.1.0.6.0 - Production
Copyright (c) 2000, 2005, Oracle. All rights reserved.
Welcome to DGMGRL, type "help" for information.
DGMGRL>
DGMGRL> connect sys/[email protected]
Connected.
DGMGRL>
DGMGRL>
DGMGRL> convert database 'i11g1sb' to snapshot standby;
Converting database "i11g1sb" to a Snapshot Standby database, please wait...
Database "i11g1sb" converted successfully
DGMGRL> show configuration
Configuration
Name: DGConfig1
Enabled: YES
Protection Mode: MaxPerformance
Databases:
i11g1 - Primary database
i11g1sb - Snapshot standby database
Fast-Start Failover: DISABLED
Current status for "DGConfig1":
Warning: ORA-16607: one or more databases have failed
DGMGRL> show configuration
Configuration
Name: DGConfig1
Enabled: YES
Protection Mode: MaxPerformance
Databases:
i11g1 - Primary database
i11g1sb - Snapshot standby database
Fast-Start Failover: DISABLED
Current status for "DGConfig1":
Warning: ORA-16607: one or more databases have failed
DGMGRL> show database 'i11g1sb';
Database
Name: i11g1sb
Role: SNAPSHOT STANDBY
Enabled: YES
Intended State: APPLY-OFF
Instance(s):
i11g1sb
Current status for "i11g1sb":
SUCCESS
DGMGRL> show database 'i11g1';
Database
Name: i11g1
Role: PRIMARY
Enabled: YES
Intended State: TRANSPORT-ON
Instance(s):
i11g1
Current status for "i11g1":
Error: ORA-16778: redo transport error for one or more databases
DGMGRL> exit
Not sure if the following (notice the typo in the service name) in the parameter (log_archive_dest_2) definition on the standby d/b has anything to do with this. I did not get this error when I initially converted to s-sb.
also I checked all my session notes, I did not type the command to set this parameter on the standby d/b and so it was not a typo on my part. However, it seems to have come from the rman script supplied with the obe. This script is supposed to clone the primary d/b to a standby db and in the process replace the string /i11g1/ with /i11g1sb/.
SQL> show parameter log_archive_dest_2
NAME TYPE VALUE
log_archive_dest_2 string service=i11g1sbsb async valid_
for=(online_logfile,primary_ro
le) db_unique_name=i11g1sb
SQL>
SQL>
SQL> select instance_name from v$instance;
INSTANCE_NAME
i11g1sb
SQL>
Given all this, the archive logs seem to be shipping correctly to the sby d/b.
"i11g1sb >"cd C:\app\MMJ\flash_recovery_area\i11g1sb\ARCHIVELOG\2009_03_30
"i11g1sb >"dir
Volume in drive C is Local Disk
Volume Serial Number is 3189-6472
Directory of C:\app\MMJ\flash_recovery_area\i11g1sb\ARCHIVELOG\2009_03_30
30/03/2009 09:05 PM <DIR> .
30/03/2009 09:05 PM <DIR> ..
30/03/2009 05:41 PM 35,627,008 O1_MF_1_137_4X2H4JJM_.ARC
30/03/2009 05:41 PM 1,910,784 O1_MF_1_138_4X2H4LVC_.ARC
30/03/2009 09:04 PM 10,447,360 O1_MF_1_139_4X2V03RW_.ARC
30/03/2009 09:05 PM 8,654,848 O1_MF_1_140_4X2V3BWB_.ARC
4 File(s) 56,640,000 bytes
2 Dir(s) 39,716,225,024 bytes free
"i11g1sb >"
"i11g1 >"dir
Volume in drive C is Local Disk
Volume Serial Number is 3189-6472
Directory of C:\app\MMJ\flash_recovery_area\I11G1\ARCHIVELOG\2009_03_30
30/03/2009 09:05 PM <DIR> .
30/03/2009 09:05 PM <DIR> ..
30/03/2009 04:09 PM 35,627,008 O1_MF_1_137_4X29QHTV_.ARC
30/03/2009 04:24 PM 1,910,784 O1_MF_1_138_4X2BMOC7_.ARC
30/03/2009 06:32 PM 10,447,360 O1_MF_1_139_4X2L4J3X_.ARC
30/03/2009 09:05 PM 8,654,848 O1_MF_1_140_4X2V37KL_.ARC
4 File(s) 56,640,000 bytes
2 Dir(s) 39,716,229,120 bytes free
I am tempted to start all over again, but I'd rather use this opportunity to debug this issue (as a learning exercise). I can always start from scratch. That brings up another Q: What do I need to do to blow away all traces of the stand by database (including all the archive logs etc...) keeping my primary intact. I'd also like to blow away all snapshot and archive logs for the primary as well. -
Cannot Convert standby database from snapshot to physical
Hello all,
I am using Oracle Entreprise version 11gR1 and had made the followings configuration:
- ANAISMD2 : primary database+_+
- ANAISMD3 : physical standby datbase. Created via RMAN
Both are located on the same host running a RH 4.
ANAISMD3 is maintained successfully with the primary.
I can make a fail-over between the both: it works fine.
I can convert ANAISMD3 from physical to snapshot via DGMGRL: it works fine
But I cannot convert back ANAISMD3 to physical, got an error ORA-12514
I had checked also the listener service for both ANAISMD2/ANAISMD3 before launching the conversion:
- the services shown on ANAISMD3 seems correct e.g. ANAISMD2 is seen as a remote server.
- but on ANAISMD2, ANAISMD3 seems incorrect e.g. ANAISMD3 is seen as a local server.
I had attached some screen shots of dg/lsnrctl results;
What are the mistakes
Thank in advance for support
==> Before I made the conversion , DGMGRL shows correct primary/standby status:
DGMGRL for Linux: Version 11.1.0.6.0 - Production
Copyright (c) 2000, 2005, Oracle. All rights reserved.
Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sys/oracle@ANAISMD2
Connected.
DGMGRL> show configuration
Configuration
Name: ANAIS
Enabled: YES
Protection Mode: MaxPerformance
Databases:
ANAISMD2 - Primary database
ANAISMD3 - Snapshot standby database
Fast-Start Failover: DISABLED
Current status for "ANAIS":
SUCCESS
==> When I want to convert back ANAISMD3 to physical, I got the following errors from the listener:_
Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sys/oracle@ANAISMD2
Connected.
DGMGRL> convert database 'ANAISMD3' to physical standby;
Converting database "ANAISMD3" to a Physical Standby database, please wait...
Operation requires shutdown of instance "ANAISMD3" on database "ANAISMD3"
Shutting down instance "ANAISMD3"...
Database closed.
Database dismounted.
ORACLE instance shut down.
Operation requires startup of instance "ANAISMD3" on database "ANAISMD3"
Starting instance "ANAISMD3"...
Unable to connect to database
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
Failed.
You are no longer connected to ORACLE
Please connect again.
Unable to start instance "ANAISMD3"
You must start instance "ANAISMD3" manually
Failed to convert database "ANAISMD3"
DGMGRL>
==> Here ist he listener.ora_ (I put the same for both ANAISMD2/ANAISMD3 with port 1541/1551). Note: DGB is the accepted extension for dgmgrl service (instead of DGMGRL as mentionned in documentation).
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL=TCP) (HOST=rh4-2a) (PORT=1541))
TRACE_LEVEL_LISTENER = ADMIN
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME=/home/oracle/product/11.1.0)
(PROGRAM = extproc)
(SID_DESC =
(SID_NAME = ANAISMD2)
(GLOBAL_DBNAME = ANAISMD2.world)
(ORACLE_HOME=/home/oracle/product/11.1.0)
(SID_DESC =
(SID_NAME = ANAISMD2)
(GLOBAL_DBNAME = ANAISMD2_DGB.world)
(ORACLE_HOME=/home/oracle/product/11.1.0)
(SID_DESC =
(SID_NAME = ANAISMD3)
(GLOBAL_DBNAME = ANAISMD3_DGB.world)
(ORACLE_HOME=/home/oracle/product/11.1.0)
(SID_DESC =
(SID_NAME = ANAISMD3)
(GLOBAL_DBNAME = ANAISMD3.world)
(ORACLE_HOME=/home/oracle/product/11.1.0)
==> Here is the tnsnames.ora (I put the same for both ANAISMD2/ANAISMD3 with port 1541/1551).
ANAISMD2.WORLD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = rh4-2a)(PORT = 1541))
(CONNECT_DATA =
(SERVICE_NAME = ANAISMD2_DGB.world)
ANAISMD3.WORLD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = rh4-2a)(PORT = 1551))
(CONNECT_DATA =
(SERVICE_NAME = ANAISMD3_DGB.world)
==> Here is the sqlnet.ora (same on both):
TRACE_LEVEL_CLIENT = OFF
DIAG_ADR_ENABLED=FALSE
DIAG_DDE_ENABLED=FALSE
DIAG_SIGHANDLER_ENABLED=FALSE
names.directory_path = (TNSNAMES)
names.default_domain = world
name.default_zone = world
==>
==> List of services provided by the listener of ANAISMD2:
LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 10-AUG-2009 16:39:36
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rh4-2a)(PORT=1541)))
Services Summary...
Service "ANAISMD2.world" has 1 instance(s).
Instance "ANAISMD2", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
+"DEDICATED" established:0 refused:0+
LOCAL SERVER
Service "ANAISMD2_DGB.world" has 1 instance(s).
Instance "ANAISMD2", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
+"DEDICATED" established:3 refused:0+
LOCAL SERVER
Service "ANAISMD3.world" has 1 instance(s).
Instance "ANAISMD3", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
+"DEDICATED" established:0 refused:0+
LOCAL SERVER
Service "ANAISMD3_DGB.world" has 1 instance(s).
Instance "ANAISMD3", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
+"DEDICATED" established:0 refused:0+
LOCAL SERVER
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
+"DEDICATED" established:0 refused:0+
LOCAL SERVER
The command completed successfully
==> List of services provided by the listener of ANAISMD3:
Services Summary...
Service "ANAISMD2.world" has 2 instance(s).
Instance "ANAISMD2", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
Instance "ANAISMD2", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=rh4-2)(PORT=1521))
Service "ANAISMD2_DGB.world" has 2 instance(s).
Instance "ANAISMD2", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
Instance "ANAISMD2", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=rh4-2)(PORT=1521))
Service "ANAISMD2_XPT.world" has 1 instance(s).
Instance "ANAISMD2", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=rh4-2)(PORT=1521))
Service "ANAISMD3.world" has 1 instance(s).
Instance "ANAISMD3", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
Service "ANAISMD3_DGB.world" has 1 instance(s).
Instance "ANAISMD3", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
The command completed successfullyYou need to have static service registered with listener in this way. This is must because as you know when it converts db that time it shutsdown dbs also so all dynamic services are lost and dgmgrl is not ale to connect to db hence conversion fails.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = ORACLE_SID)
(GLOBAL_DBNAME=db_unique_name_DGMGRL.db_domain)
(ORACLE_HOME = /apps/oracle/product/11.1.0)
Plus with this make a entry in tnsnames.ora using service name from above or check from lsnrctl status look for service "db_unique_name_DGMGRL.db_domain"
e.g. this is my best practice how i give the names to tns entry
db_unique_name_DGMGRL =
(DESCRIPTION =
(SDU = 32767)
(ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = port))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = db_unique_name_DGMGRL.db_domain)
Define same way in both primary and standby db.
Now use these tns entries to create configuration.
e.g.
create configuration prim_db as primary database is db_unique_name connect identifier is "db_unique_name_DGMGRL";
-- db_unique_name_DGMGRL from primary tns entry
add database stdby_db as connect identifier is "db_unique_name_DGMGRL" MAINTAINED AS PHYSICAL;
-- db_unique_name_DGMGRL from standby db tns entry
hope this will help -
Standby Database (Archive Log Mode)
I'm going to be setting up a standby database.
I understand that the primary database must be in archive log mode.
Is there any reason for the standby database to be in archivelog mode?Since your primary Db is in archive log mode, so will be your standby, when it is made primary.But. you can use STANDBY REDO LOGS from 9i version, where these Standby Redo Logs then store the information received from the Primary Database.
As per metalink:-
>
Standby Redo Logs are only supported for the Physical Standby Database in Oracle 9i and as well for Logical Standby Databases in 10g. Standby Redo Logs are only used if you have the LGWR activated for archival to the Remote Standby Database.If you have Standby Redo Logs, the RFS process will write into the Standby RedoLog as mentioned above and when a log switch occurs, the Archiver Process of the Standby Database will archive this Standby Redo Log to an Archived Redo Log, while the MRP process applies the information to the Standby Database. In a Failover situation, you will also have access to the information already written in the Standby Redo Logs, so the information will not be lost.
>
Check metalink Doc ID: Note:219344.1
Regards,
Anand -
Want to Buy SQL 2008/2012 standard edition to achieve Database failover
Hi Team,
We want to know exact part code details to procure 2 nos Sql 2008/2012 standard edition server to installed on "Window 2012 R2 Standard Edition, Factory installed, no media, 2 socket,2 VMs, No client" Server.
I have Access control system application (Main-Standby) on which we need Automatic database failover by using SQL Standard server. Application vendor has suggested us to procure 2 nos of Microsoft Sql 2008/2012 standard edition server.
If possible then please let me know exact part code details of Sql 2008 and 2012 standard edition server which doesn't have any issue to installed on above said server edition.
Thanks,
VishalHi Vishal,
Unfortunately, we do not deal with part codes, I request you to check the below link as this is not the correct forum.
http://www.microsoft.com/en-in/server-cloud/products/sql-server/Support.aspx
Perhaps you could post you question on the SQL forum :
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?category=sqlserver
Regards,
Mekh. -
Changing the archive destination in standby database?
My DB is running on Oracle 9.2.0.6.0. I have data guard for my primary database.
Now i wanted to change the archive destination only standby database. What is the process? Any response or any link is appreicated. ThanksThe standby database wouldn't generate archivelogs until and unless it is opened (eg in a failover). So, although there is a definition for the log archive destination in the standby's init.ora / spfile, it is used only to read archivelogs shipped from the primary.
If you are talking of the destination that the primary's archivelogs are shipped to on the standby, technically once the archivelogs are applied on the standby, they are not required and can be deleted. You would be able to configure this.
Maybe you are looking for
-
Error during deploying *.ear to sap using ant
I want to deploy ear to sap with ant script,but it can not work.The error information as follows,can anybody give me some advice if you had the similar error,thanks. C:\usr\sap\LJ1\J00\j2ee\deployment\ant>ant -f example_build.xml deploy -v Apache An
-
I created just now a new app in the facebook site: https://developers.facebook.com I have a new access token but its for short time will expire after 2 hours or so. And i also got the app id and app secret code. This is how im trying to use it: priva
-
Connection Server does not start
Hello guys, The Connection Server does not start anymore. When I always try to start it returns me a failed status and shows me that the server is considered failed because it has stopped 5 time(s) in 60 minute(s). It's a BOE XI 3.1 SP2 with IK 3.1 S
-
TAX determnination procedure for thailand
Hi I need TAX determnination procedure for thailand..if anybody can help in this regard. Regrds Yogesh
-
Hi, I need propagate a property (Edicion) with the following characteristics: Maintable (check) Indexable (check) Default Value: E-1 Document Validity Patterns (csv): /documents/bla/** But when I run the report for the older Documents (uploaded to th