Switchover primry to standby

Hi,
is it neccessry creation of standby redo log files on primary for switching ?

Hi..
This is from METALINK:-
>
5. How long does it take to perform a switchover or switchback operation?
Answer
There are several considerations that affect the duration of the database switchover operation. These include, but are not limited to, the following:
- Active sessions must be terminated prior to starting switchover operation
- Each database switching roles must be shutdown and restarted
- Instance restart can be slightly longer due to standby database network connectivity requirements
- Pending redo apply on standby database may delay switchover to primary role
>
Link: [http://www.oracle.com/technology/deploy/availability/pdf/MAA_WP_10gR2_SwitchoverFailoverBestPractices.pdf]
Regards,
Anand

Similar Messages

  • Doubt regarding switchover from logical standby to primary

    I am using Oracle 10g databases on Linux environment
    I was trying creating a data guard configuration and once I was successfully done I created a logical standby database from the physical standby . Then I was trying to do a switchover .
    By mistake I gave the prepare switchover command in the logical standby before executing it in the primary . And then when I gave it in the primary both the status turned to be "PREPARING SWITCHOVER"
    In logical standby
    SQL> ALTER DATABASE PREPARE TO SWITCHOVER TO PRIMARY;
    Database altered.
    SQL>  SELECT SWITCHOVER_STATUS FROM V$DATABASE;
    SWITCHOVER_STATUS
    PREPARING SWITCHOVER
    In primary
    SQL> ALTER DATABASE PREPARE TO SWITCHOVER TO LOGICAL STANDBY;
    Database altered.
    SQL> select switchover_status from v$database;
    SWITCHOVER_STATUS
    PREPARING SWITCHOVERNow I am not able to commit any of them to primary or logical standby
    In primary
    SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO LOGICAL STANDBY;
    ALTER DATABASE COMMIT TO SWITCHOVER TO LOGICAL STANDBY
    ERROR at line 1:
    ORA-16217: prepare to switchover has not completed
    ORA-06512: at line 1
    In logical standby
    SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;
    ALTER DATABASE commit  TO SWITCHOVER TO PRIMARY
    ERROR at line 1:
    ORA-16109: failed to apply log data from previous primaryLet me know what should be done now ? Is there anyway to solve this issue ?

    Can you try using the following first on Primary and then on Standby?
    ALTER DATABASE PREPARE TO SWITCHOVER CANCEL;

  • Switchover to physical standby failed

    Hi gurus,
    Could anyone pls help for this issue, i'm working on oracle 9i dataguard in solaris box. we succesully switchover our physical standby to primary but when tried to bring back again to physical standby it is throwing an error
    SQL> alter database commit to switchover to physical standby;
    alter database commit to switchover to physical standby
    ERROR at line 1:
    ORA-16014: log 1 sequence# 91775 not archived, no available destinations
    ORA-00312: online log 1 thread 1: '/oracle/u07/oradata/odb/redo_1a.log'
    ORA-00312: online log 1 thread 1: '/oracle/u08/oradata/odb/redo_1b.log'
    ORA-00312: online log 1 thread 1: '/oracle/u09/oradata/odb/redo_1c.log'
    Please advice
    regards,
    shaan

    Hi,
    There is already a thread which you opened Up you can reply back in that..
    switchover to physical standby failed
    - Pavan Kumar N

  • What happens at backend when we fire alter database commit to switchover to physical standby

         Hi,
    What exactly happens at backend when we fire alter database commit to switchover to physical standby.
    how the transition happens?
    Thanks

    Hi,
    The following will happen at the backend
    1.) Notifies the primary database that a switchover is about to occur
    2.) Disconnect all users from the primary database
    3.) Generate a special redo record that signals the End of Redo (EOR)
    4.) Converts the primary database into a standby database
    5.) Once the standby database applies the final EOR record, guaranteeing that no data loss has been lost, converts the standby database into the primary database.
    The new standby database (old primary) starts to receive the redo records and continues process until we switch back again. It is important to remember that both databases receive the EOR record so both databases know the next redo that will be received.
    Regards,
    Pradeep. V

  • Problem in switchover to physical standby database

    Hi All,
    I am doing switchover from primary to physical standby database. Physical standby is in 'managed recovery' mode using real time apply and is in mount mode. I executed alter database commit to switchover to physical standby with session shutdown command. Now i am waiting for standby mrp to exit after processing eor record, but it seems mrp was hanged.
    Below is the content from standby database:
    Recovery of Online Redo Log: Thread 1 Group 5 Seq 620 Reading mem 0
    Mem# 0: /oracle/app/oracle/dbrac/th1-redo5a.log
    Resetting standby activation ID 749049115 (0x2ca5951b)
    Media Recovery End-Of-Redo indicator encountered
    Media Recovery Continuing
    Media Recovery Waiting for thread 1 sequence 621
    Archived Log entry 14 added for thread 1 sequence 620 ID 0x2ca5951b dest 1:
    Need some help to resolve.
    Thanks
    Sandy.

    Hello;
    After after you issue ( successfully ) a :
    alter database commit to switchover to physical standby with session shutdownYou need to :
    Shutdown the former primary and mount as a standby databaseCheck out my step by step :
    http://www.visi.com/~mseberg/data_guard/Data_Guard_switchover.html
    Read everything ( all the steps ) before you proceed.
    Best Regards
    mseberg

  • Active Dataguard switchover puts new standby in real time query

    Hi Gurus,
    If using Active Dataguard ,after swicthover/failover using dg broker and observer does sthe new standby will be put in real time query mode(ADG) or manually have to open the db in read only mode.
    Please let me know.
    Thanks

    Yes it does:
    [uhesse]$ dgmgrl sys/oracle@prima
    DGMGRL for Linux: Version 11.2.0.1.0 - Production
    Copyright (c) 2000, 2009, Oracle. All rights reserved.
    Welcome to DGMGRL, type "help" for information.
    Connected.
    DGMGRL> show configuration
    Configuration - myconf
      Protection Mode: MaxAvailability
      Databases:
        prima - Primary database
        logst - Logical standby database
        physt - Physical standby database
    Fast-Start Failover: DISABLED
    Configuration Status:
    SUCCESS
    DGMGRL> show database physt
    Database - physt
      Role:            PHYSICAL STANDBY
      Intended State:  APPLY-ON
      Transport Lag:   0 seconds
      Apply Lag:       0 seconds
      Real Time Query: ON
      Instance(s):
        physt
    Database Status:
    SUCCESS
    DGMGRL> switchover to physt;
    Performing switchover NOW, please wait...
    New primary database "physt" is opening...
    Operation requires shutdown of instance "prima" on database "prima"
    Shutting down instance "prima"...
    ORA-01109: database not open
    Database dismounted.
    ORACLE instance shut down.
    Operation requires startup of instance "prima" on database "prima"
    Starting instance "prima"...
    ORACLE instance started.
    Database mounted.
    Database opened.
    Switchover succeeded, new primary is "physt"
    DGMGRL> show configuration
    Configuration - myconf
      Protection Mode: MaxAvailability
      Databases:
        physt - Primary database
        prima - Physical standby database
        logst - Logical standby database
    Fast-Start Failover: DISABLED
    Configuration Status:
    SUCCESS
    DGMGRL> show database prima
    Database - prima
      Role:            PHYSICAL STANDBY
      Intended State:  APPLY-ON
      Transport Lag:   0 seconds
      Apply Lag:       0 seconds
      Real Time Query: ON
      Instance(s):
        prima
    Database Status:
    SUCCESSKind regards
    Uwe Hesse
    http://uhesse.wordpress.com

  • Consideration of DBFS when doing a switchover/failover to standby

    Can anyone let me know if i can configure the DBFS separated from the Production database with a dataguard standby to reduce the impact on my production database?

    Hello;
    Yes. To me a failover is a last resort. Ask yourself a few questions:
    Does my business require 100 percent uptime?
    How long will the Primary not be available?
    How long and how will I recover from the failover?
    Can I do a switchover instead?
    Every year we power down the main server room for a weekend. What I do is a switchover and then a switch back after the old primary comes up as the standby and catches up.
    Here are my failover test notes:
    http://www.visi.com/~mseberg/data_guard/Data_Guard_Failover_Test_using_SQL.pdf
    This may help too:
    Rolling a Standby Forward using an RMAN Incremental Backup To Fix The Nologging Changes (Doc ID 958181.1)
    Best Regards
    mseberg

  • After switchover to standby as primary, now how to switch back

    Hello DG experts:
    I'm running Oracle 11.2 on Linux 5.8.
    I am in the process of (trying) to mimic our existing production DG environment for testing purposes.
    So far...
    I've managed to set up a primary and standby database and ensured all logs apply properly.
    My database name is DGTEST (on both primary and standby).
    My db_unique_name is DGTEST_DG1 on primary, and DGTEST_DG2 on standby.
    I performed a switchover from primary to standby, and opened the standby database as primary.
    But, first thing is that when I check the switchover_status from v$database, it says: NOT ALLOWED.
    Okay, so now what? Do I need to have another pfile to set specifically for when I am in primary or standby modes?
    Here are relevant commands I have checked already:
    on new Primary (db_unique_name = DGTEST_DG2)
    SQL> select switchover_status from v$database;
    SWITCHOVER_STATUS
    NOT ALLOWED
    SQL> select sequence#, applied from v$archived_log order by 1;
          SEQUENCE# APPLIED
                291 YES
                292 YES
                293 YES
                398 YES
                399 NO
                400 NO
                401 NO
                402 NO
    112 rows selected.
    SQL> select destination, status, error from v$archive_dest;
    DESTINATION                    STATUS    ERROR
    /arch/DGTEST/archivelogs       VALID
    /arch/DGTEST_STBY              VALID
                                   INACTIVE
                                   INACTIVE
                                   INACTIVE
    31 rows selected.
    on new Standby (db_unique_name = DGTEST_DG1)
    SQL> select switchover_status from v$database;
    SWITCHOVER_STATUS
    TO PRIMARY
    1 row selected.
    SQL> select sequence#, applied from v$archived_log order by 1;
          SEQUENCE# APPLIED
                276 YES
                277 YES
                278 YES
                397 NO
                397 YES
                398 YES
                398 NO
    231 rows selected.
    SQL>  select destination, status, error from v$archive_dest;
    DESTINATION                    STATUS    ERROR
    /arch/DGTEST                   VALID
    DGTEST_DG2                     VALID
    /arch/DGTEST_STBY              DEFERRED
                                   INACTIVE
                                   INACTIVE
                                     . . .Please keep in mind that I have made this test environment as close as possible (I think) to our production environment.
    One of the objectives is to confirm we can switchover and back in our production environment.
    So if there is something seriously wrong with this environment and it is the same in our production environment, that would be one of my primary objectives to find out about.
    Only significant difference is that we are also using DGBroker in production and I did create configuration yet until I got the switchover working manually first.

    Hi,
    Follow This Steps:
    How to Switchover from Primary to Standby Database?
    MY Configuration:
    RAC is configured on dcpdb1(node1) and dcpdb2(node2).
    DB Name: dcpdb
    db_unique_name: dcpdb
    Instance Name: dcpdb1 on node1
    Instance Name: dcpdb2 on node2
    Active Data Guard is configured on drpdb1
    DB Name: dcpdb
    db_unique_name: drpdb
    Instance Name: drpdb
    Process:
    On the primary server, check the latest archived redo log and force a log switch.
    *########### Login dcpdb1 as Oracle user #########*
    SQL> SELECT sequence#, first_time, next_time
    FROM v$archived_log
    ORDER BY next_time;
    SQL> ALTER SYSTEM SWITCH LOGFILE;
    Check the new archived redo log has arrived at the standby server and been applied.
    *########### Login drpdb1 as Oracle user #########*
    SQL> SELECT sequence#, first_time, next_time, applied
    FROM v$archived_log
    ORDER BY next_time ;
    *########### Login dcpdb2 as Oracle user #########*
    SQL> SELECT sequence#, first_time, next_time
    FROM v$archived_log
    ORDER BY next_time ;
    SQL> ALTER SYSTEM SWITCH LOGFILE;
    Check the new archived redo log has arrived at the standby server and been applied.
    *########### Login drpdb1 as Oracle user #########*
    SQL> SELECT sequence#, first_time, next_time, applied
    FROM v$archived_log
    ORDER BY next_time ;
    *########### Login dcpdb1 as Oracle user #########*
    SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
    SWITCHOVER_STATUS
    TO STANDBY
    *########### Login dcpdb2 as Oracle user #########*
    SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
    SWITCHOVER_STATUS
    TO STANDBY
    *########### Login drpdb1 as Oracle user #########*
    SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
    SWITCHOVER_STATUS
    NOT ALLOWED
    *########### Login dcpdb2 as Oracle user #########*
    SQL> shutdown immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL>
    *########### Login dcpdb1 as Oracle user #########*
    SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY WITH SESSION SHUTDOWN;
    Database altered.
    SQL>
    SQL> shutdown immediate
    ORA-01507: database not mounted
    ORACLE instance shut down.
    SQL>
    SQL> startup mount
    ORACLE instance started.
    Total System Global Area 1.5400E+10 bytes
    Fixed Size 2184872 bytes
    Variable Size 7751076184 bytes
    Database Buffers 7616856064 bytes
    Redo Buffers 29409280 bytes
    Database mounted.
    SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
    SWITCHOVER_STATUS
    TO PRIMARY
    SQL>
    *########### Login drpdb1 as Oracle user #########*
    SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
    SWITCHOVER_STATUS
    SESSIONS ACTIVE
    SQL> alter database commit to switchover to primary with session shutdown;
    Database altered.
    SQL> shutdown immediate
    ORA-01109: database not open
    Database dismounted.
    ORACLE instance shut down.
    SQL>
    SQL> startup
    ORACLE instance started.
    Total System Global Area 1.5400E+10 bytes
    Fixed Size 2184872 bytes
    Variable Size 7717521752 bytes
    Database Buffers 7650410496 bytes
    Redo Buffers 29409280 bytes
    Database mounted.
    Database opened.
    *########### Login dcpdb1 as Oracle user #########*
    SQL> alter database open read only;
    Database altered.
    SQL> alter database recover managed standby database using current logfile disconnect;
    Database altered.
    *########### Login dcpdb2 as Oracle user #########*
    SQL> startup mount
    ORACLE instance started.
    Total System Global Area 1.5400E+10 bytes
    Fixed Size 2184872 bytes
    Variable Size 7751076184 bytes
    Database Buffers 7616856064 bytes
    Redo Buffers 29409280 bytes
    Database mounted.
    SQL> alter database open read only;
    Database altered.
    SQL> alter database recover managed standby database using current logfile disconnect ;
    Database altered.
    SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
    SWITCHOVER_STATUS
    NOT ALLOWED
    SQL>
    *########### Login drpdb1 as Oracle user #########*
    SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
    SWITCHOVER_STATUS
    TO STANDBY
    *########### Login dcpdb1 as Oracle user #########*
    SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
    SWITCHOVER_STATUS
    NOT ALLOWED
    SQL>
    *########### Login dcpdb2 as Oracle user #########*
    SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
    SWITCHOVER_STATUS
    NOT ALLOWED
    SQL>
    *############### End of Switchover from Primary to Standby Database ##########*
    How to Switchback from New Primary(drpdb) to old Standby(drdb) Database and New Standby(dcpdb to Old Primary(dcpdb)?
    Process:
    On the New primary server, check the latest archived redo log and force a log switch.
    *########### Login drpdb1 as Oracle user #########*
    SQL> SELECT sequence#, first_time, next_time
    FROM v$archived_log
    ORDER BY next_time ;
    SQL>ALTER SYSTEM SWITCH LOGFILE;
    Check the new archived redo log has arrived at the standby server and been applied.
    *########### Login dcpdb1 as Oracle user #########*
    SQL> SELECT sequence#, first_time, next_time, applied
    FROM v$archived_log
    ORDER BY next_time ;
    *########### Login dcpdb2 as Oracle user #########*
    SQL> SELECT sequence#, first_time, next_time, applied
    FROM v$archived_log
    ORDER BY next_time ;
    *########### Login drpdb1 as Oracle user #########*
    SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
    SWITCHOVER_STATUS
    TO STANDBY
    *########### Login dcpdb1 as Oracle user #########*
    SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
    SWITCHOVER_STATUS
    NOT ALLOWED
    *########### Login dcpdb2 as Oracle user #########*
    SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
    SWITCHOVER_STATUS
    NOT ALLOWED
    *########### Login drpdb1 as Oracle user #########*
    SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY WITH SESSION SHUTDOWN;
    Database altered.
    SQL> shutdown immediate
    ORA-01507: database not mounted
    ORACLE instance shut down.
    SQL> startup mount
    ORACLE instance started.
    Total System Global Area 1.5400E+10 bytes
    Fixed Size 2184872 bytes
    Variable Size 7717521752 bytes
    Database Buffers 7650410496 bytes
    Redo Buffers 29409280 bytes
    Database mounted.
    SQL>
    SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
    SWITCHOVER_STATUS
    TO PRIMARY
    SQL>
    *########### Login dcpdb2 as Oracle user #########*
    SQL> shutdown immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL>
    *########### Login dcpdb1 as Oracle user #########*
    SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
    SWITCHOVER_STATUS
    SESSIONS ACTIVE
    OR
    SWITCHOVER_STATUS
    SWITCHOVER PENDING
    SQL> alter database commit to switchover to primary with session shutdown;
    Database altered.
    SQL>
    SQL> shutdown immediate
    ORA-01109: database not open
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup
    ORACLE instance started.
    Total System Global Area 1.5400E+10 bytes
    Fixed Size 2184872 bytes
    Variable Size 7751076184 bytes
    Database Buffers 7616856064 bytes
    Redo Buffers 29409280 bytes
    Database mounted.
    Database opened.
    SQL>
    SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
    SWITCHOVER_STATUS
    TO STANDBY
    SQL>
    *########### Login dcpdb2 as Oracle user #########*
    SQL> startup
    ORACLE instance started.
    Total System Global Area 1.5400E+10 bytes
    Fixed Size 2184872 bytes
    Variable Size 7751076184 bytes
    Database Buffers 7616856064 bytes
    Redo Buffers 29409280 bytes
    Database mounted.
    Database opened.
    SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
    SWITCHOVER_STATUS
    TO STANDBY
    SQL>
    *########### Login drpdb1 as Oracle user #########*
    SQL> alter database open read only;
    Database altered.
    SQL> alter database recover managed standby database using current logfile disconnect;
    Database altered.
    SQL>
    *####### End of Switchback from New Primary(drpdb) to old Standby(drdb) Database and New Standby(dcpdb to Old Primary(dcpdb) #########*
    Thanks
    Solaiman
    Edited by: 876149 on Apr 1, 2013 11:56 AM

  • Switchover to 1 of 3 Physical Standby (oracle 10g R2)

    Hi all,
    Previously I already had done switchover primary to standby (only 1 Physical standby was in the configuration)
    now i have some additional physical standbys (3 Physical standbys)
    stby1
    stby2
    stby3
    i want to switch to stby1 ,what needs to be done at stby2,stby3 to make them capable of identifying stby1 as their new primary.
    Kindly suggest!
    Best Regards,
    Muhammad Shakeel Azeem

    921542 wrote:
    Hi all,
    Previously I already had done switchover primary to standby (only 1 Physical standby was in the configuration)
    now i have some additional physical standbys (3 Physical standbys)
    stby1
    stby2
    stby3
    i want to switch to stby1 ,what needs to be done at stby2,stby3 to make them capable of identifying stby1 as their new primary.
    Kindly suggest!
    Best Regards,
    Muhammad Shakeel AzeemAzeem,
    Welcome to OTN,
    Once you performed switchover, You need to perform changes with some parameters from standby FAL_SERVER
    Earlier this parameter points to old primary, Now after switchover you have to put service name of new primary database service.
    Also Make changes with remote destinations log_archive_dest_n with correct service names.
    Refer this manual to work with multiple standby databases.
    http://www.oracle.com/technetwork/database/features/availability/maa10gr2multiplestandbybp-1-131937.pdf

  • Switchover role transition in a standby configuration

    Hi All,
    Oracle 10.2.0.1
    Linux RHEL 5
    Vmware server 2.1
    Host Os Windows Xp
    I have created a database and configured the standby for it.This is a virtual machine setup.
    The current primary database has 3 redologfiles and no standby redologfiles added.And the standby database has the redologfiles same as the primary and 3 standby redologfiles configured just for enabling the real time apply.
    Now i am trying to switchover the roles of both the databases.
    So i gave the below command in the primary database
    sql>alter database commit to switchover to physical standby with session shutdown;
    i am getting the below error..
    ORA-16416: Switchover target is not synchronized with the primary
    When i check the V$archive_gap in standby nothing returns..
    I tried to switch logfile in the primary and manually transfered the recent archivelog to the standby location and applied manually, still getting the same error..
    Please Advice...
    TIA,
    Edited by: ORCLDB on Aug 25, 2009 4:41 PM

    >
    The current primary database has 3 redologfiles and no standby redologfiles added.And the standby database has the redologfiles same as the primary and 3 standby redologfiles configured just for enabling the real time apply.
    Now i am trying to switchover the roles of both the databases.
    So i gave the below command in the primary database
    sql>alter database commit to switchover to physical standby with session shutdown;
    i am getting the below error..
    ORA-16416: Switchover target is not synchronized with the primary
    >
    You should create the standby logfiles on the primary as well. Also, you must point with the LOG_ARCHIVE_DEST_2 (probably) parameter from the standby to the primary with LGWR SYNC AFFIRM, in order to keep your protection level after the switchover. I would also recommend that you go with the Data Guard Broker in order to do switchover & failover, it's much easier to say
    DGMGRL> switchover to sb;And DMON will take care for all the appropriate SQL commands and LOG_ARCHIVE_DEST_n settings!
    Kind regards
    Uwe
    http://uhesse.wordpress.com

  • Switchover to Standby is it necessary to shutdown other nodes?

    Hi,
    I have installed oracle 11g r2 rac with asm in two nodes. OS is hp-Unix.
    I have installed oracle11g Active Data Guard using Single alone Database.
    Both RAc and Active Data Guard works fine.
    I have not configure Data Guard Broker.
    For testing purpose I need to make primary as standby and standby as primary.
    In node 1: I will run commend in node 1
    SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY WITH SESSION SHUTDOWN ;
    Shall I need to shutdown node 2 in RAC?
    if node 2 is in shutdown then after switch over primary as standby just open the node 2 ?
    Thanks
    Solaiman

    I have installed oracle 11g r2 rac with asm in two nodes. OS is hp-Unix.
    I have installed oracle11g Active Data Guard using Single alone Database.
    Both RAc and Active Data Guard works fine.
    I have not configure Data Guard Broker.
    For testing purpose I need to make primary as standby and standby as primary.
    In node 1: I will run commend in node 1
    SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY WITH SESSION SHUTDOWN ;
    Shall I need to shutdown node 2 in RAC?
    if node 2 is in shutdown then after switch over primary as standby just open the node 2 ?When you are not managing with broker, primary if you have 2 node RAC. Then prior to switchover shutdown any one of the node.
    Once you performed switch over, Your primary database will be non-RAC database[because not an clustered], So the redo threads active in only one node.
    In such case you will be having one node primary and one node standby.

  • Switchover between primary RAC and standby single instance

    Hello All,
    I am using Oracle 11gR2.
    I am trying to do a switch over between primary database (RAC 2 nodes) and physical standby (single instance)
    If my Primary is single instance i was following the below steps:
    On the standby
    ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;
    On the primary database:
    alter database commit to switchover to standby with session shutdown;
    shutdown immediate;
    startup nomount;
    alter database mount standby database;
    On the standby again:
    alter database commit to switchover to primary WITH SESSION SHUTDOWN;
    On the new standby:
    ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;now, and since my primary is RAC when i am trying switch over I am getting the below error:
    SQL> alter database commit to switchover to standby with session shutdown;
    alter database commit to switchover to standby with session shutdown
    ERROR at line 1:
    ORA-01105: mount is incompatible with mounts by other instancesPlus that when I want to apply the remaining steps (below step), should I do it on each instance alone? or is there anyway to do it using the srvctl command:
    alter database mount standby database;Regards,

    Hi,
    Since You are using 2 node RAc as primary, so for switchover operation you need to shutdown
    one database instance( Suppose instance 2).
    Suppose your node1:
    hostname is dcpdb1
    and node 2:
    hostname is dcpdb2
    and standby hostname is drpdb1
    So follow this steps for switchover .
    How to Switchover from Primary to Standby Database?
    Process:
    On the primary server, check the latest archived redo log and force a log switch.
    *########### Login dcpdb1 as Oracle user #########*
    SQL> SELECT sequence#, first_time, next_time
    FROM v$archived_log
    ORDER BY next_time;
    SQL> ALTER SYSTEM SWITCH LOGFILE;
    Check the new archived redo log has arrived at the standby server and been applied.
    *########### Login drpdb1 as Oracle user #########*
    SQL> SELECT sequence#, first_time, next_time, applied
    FROM v$archived_log
    ORDER BY next_time ;
    *########### Login dcpdb2 as Oracle user #########*
    SQL> SELECT sequence#, first_time, next_time
    FROM v$archived_log
    ORDER BY next_time ;
    SQL> ALTER SYSTEM SWITCH LOGFILE;
    Check the new archived redo log has arrived at the standby server and been applied.
    *########### Login drpdb1 as Oracle user #########*
    SQL> SELECT sequence#, first_time, next_time, applied
    FROM v$archived_log
    ORDER BY next_time ;
    *########### Login dcpdb1 as Oracle user #########*
    SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
    SWITCHOVER_STATUS
    TO STANDBY
    *########### Login dcpdb2 as Oracle user #########*
    SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
    SWITCHOVER_STATUS
    TO STANDBY
    *########### Login drpdb1 as Oracle user #########*
    SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
    SWITCHOVER_STATUS
    NOT ALLOWED
    *########### Login dcpdb2 as Oracle user #########*
    SQL> shutdown immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL>
    *########### Login dcpdb1 as Oracle user #########*
    SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY WITH SESSION SHUTDOWN;
    Database altered.
    SQL>
    SQL> shutdown immediate
    ORA-01507: database not mounted
    ORACLE instance shut down.
    SQL>
    SQL> startup mount
    ORACLE instance started.
    Total System Global Area 1.5400E+10 bytes
    Fixed Size 2184872 bytes
    Variable Size 7751076184 bytes
    Database Buffers 7616856064 bytes
    Redo Buffers 29409280 bytes
    Database mounted.
    SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
    SWITCHOVER_STATUS
    TO PRIMARY
    SQL>
    *########### Login drpdb1 as Oracle user #########*
    SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
    SWITCHOVER_STATUS
    SESSIONS ACTIVE
    SQL> alter database commit to switchover to primary with session shutdown;
    Database altered.
    SQL> shutdown immediate
    ORA-01109: database not open
    Database dismounted.
    ORACLE instance shut down.
    SQL>
    SQL> startup
    ORACLE instance started.
    Total System Global Area 1.5400E+10 bytes
    Fixed Size 2184872 bytes
    Variable Size 7717521752 bytes
    Database Buffers 7650410496 bytes
    Redo Buffers 29409280 bytes
    Database mounted.
    Database opened.
    *########### Login dcpdb1 as Oracle user #########*
    SQL> alter database open read only;
    Database altered.
    SQL> alter database recover managed standby database using current logfile disconnect;
    Database altered.
    *########### Login dcpdb2 as Oracle user #########*
    SQL> startup mount
    ORACLE instance started.
    Total System Global Area 1.5400E+10 bytes
    Fixed Size 2184872 bytes
    Variable Size 7751076184 bytes
    Database Buffers 7616856064 bytes
    Redo Buffers 29409280 bytes
    Database mounted.
    SQL> alter database open read only;
    Database altered.
    SQL> alter database recover managed standby database using current logfile disconnect;
    Database altered.
    SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
    SWITCHOVER_STATUS
    NOT ALLOWED
    SQL>
    *########### Login drpdb1 as Oracle user #########*
    SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
    SWITCHOVER_STATUS
    TO STANDBY
    *########### Login dcpdb1 as Oracle user #########*
    SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
    SWITCHOVER_STATUS
    NOT ALLOWED
    SQL>
    *########### Login dcpdb2 as Oracle user #########*
    SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
    SWITCHOVER_STATUS
    NOT ALLOWED
    SQL>
    *####################### Finish SwitchOver ########################*
    Check
    *########### Login drpdb1 as Oracle user #########*
    SQL> alter system switch logfile;
    SQL>
    SELECT sequence#, first_time, next_time
    FROM v$archived_log
    ORDER BY sequence#;
    SQL> archive log list
    *########### Login dcpdb1 as Oracle user #########*
    SQL>
    SELECT sequence#, first_time, next_time, applied
    FROM v$archived_log
    ORDER BY sequence#;
    SQL> archive log list
    *########### Login dcpdb2 as Oracle user #########*
    SQL>
    SELECT sequence#, first_time, next_time, applied
    FROM v$archived_log
    ORDER BY sequence#;
    SQL> archive log list
    Thanks
    Solaiman
    Edited by: 876149 on Apr 12, 2013 11:51 AM

  • Steps to switchover a standby to production

    Hi All,
    How can I perform a switchover from a standby database to production and vice versa.
    Thanks in advanced
    Bhupinder

    Metalink has few good notes on this subject. In case, if you dont have any access to metalink, here is a good PDF.
    www.oracle.com/technology/deploy/availability/pdf/MAA_WP_9iSwitchoveFailoverBestPractices.pdf
    Jaffar

  • Switchover problem after upgrade from 11.2.0.1 to 11.2.0.2

    Hello
    I succesfull upgraded my database from 11.2.0.1 to 11.2.0.2 on my test enviroment.
    My enviroment works with dataguard configuration.
    Data Guard management is dgmgrl.
    OS is Linux Redhat x86_64
    I have problem with switchover operation:
    During switchover operation (with dgmgrl) new primary database is switched succesfull but problem is with new standby database, I have message:
    ORA-10458: standby database requires recovery
    ORA-01194: datafile 1, needs more recovery to be consistent
    ORA-01110: datafile 1: '/u01/app/oracle/oradata/DB1/system01.dbf'
    To end switchover operation I should start new standby instance. But if i try startup It i have:
    ORA-00845: MEMORY_TARGET not supported on this system
    In alert log new standby database I have:
    Completed: ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY WITH SESSION SHUTDOWN
    Wed Jan 19 08:15:00 2011
    Performing implicit shutdown abort due to switchover to physical standby
    Shutting down instance (abort)
    License high water mark = 20
    USER (ospid: 13290): terminating the instance
    Instance terminated by USER, pid = 13290
    Wed Jan 19 08:15:02 2011
    Instance shutdown complete
    ORA-1092 : opitsk aborting process
    Wed Jan 19 08:15:06 2011
    Starting ORACLE instance (normal)
    WARNING! Recovering data file 1 from a fuzzy file. If not the current file
    it might be an online backup taken without entering the begin backup command.
    WARNING! Recovering data file 2 from a fuzzy file. If not the current file
    it might be an online backup taken without entering the begin backup command.
    WARNING! Recovering data file 3 from a fuzzy file. If not the current file
    it might be an online backup taken without entering the begin backup command.
    WARNING! Recovering data file 4 from a fuzzy file. If not the current file
    it might be an online backup taken without entering the begin backup command..
    ARC9: Archival started
    ARC0: STARTING ARCH PROCESSES COMPLETE
    Media Recovery Log /u01/app/oracle/redologs2/archiveredolog/DB1/1_194_739556401.dbf
    Identified End-Of-Redo for thread 1 sequence 194
    Wed Jan 19 08:15:20 2011
    Using STANDBY_ARCHIVE_DEST parameter default value as /u01/app/oracle/oradata/DB1/archivelog/
    RFS[1]: Assigned to RFS process 13553
    RFS[1]: Identified database type as 'physical standby': Client is ARCH pid 3536
    Starting Data Guard Broker (DMON)
    Wed Jan 19 08:15:21 2011
    INSV started with pid=32, OS id=13555
    RFS[1]: Selected log 4 for thread 1 sequence 197 dbid 1279411810 branch 739556401
    Archived Log entry 44349 added for thread 1 sequence 197 ID 0x4f8d3d29 dest 1:
    Archived Log entry 44350 added for thread 1 sequence 197 ID 0x4f8d3d29 dest 2:
    Archived Log entry 44351 added for thread 1 sequence 197 ID 0x4f8d3d29 dest 3:
    Wed Jan 19 08:15:24 2011
    Resetting standby activation ID 0 (0x0)
    Media Recovery End-Of-Redo indicator encountered
    Media Recovery Applied until change 972405267
    Completed standby crash recovery.
    Errors in file /u01/app/oracle/diag/rdbms/tdb1nod1/DB1/trace/DB1_ora_13451.trc:
    ORA-10458: standby database requires recovery
    ORA-01194: plik 1, aby byl spojny, wymaga dalszego przywracania
    ORA-01110: plik danych 1: '/u01/app/oracle/oradata/DB1/system01.dbf'
    ORA-10458 signalled during: alter database open...
    Wed Jan 19 08:15:25 2011
    RFS[2]: Assigned to RFS process 13603
    RFS[2]: Identified database type as 'physical standby': Client is ARCH pid 3532
    Wed Jan 19 08:15:26 2011
    RFS[3]: Assigned to RFS process 13619
    RFS[3]: Identified database type as 'physical standby': Client is ARCH pid 3536
    RFS[3]: Opened log for thread 1 sequence 196 dbid 1279411810 branch 739556401
    Wed Jan 19 08:15:26 2011
    RFS[4]: Assigned to RFS process 13617
    RFS[4]: Identified database type as 'physical standby': Client is ARCH pid 3534
    Archived Log entry 44352 added for thread 1 sequence 196 rlc 739556401 ID 0x4f8d3d29 dest 4:
    RFS[4]: Opened log for thread 1 sequence 195 dbid 1279411810 branch 739556401
    Archived Log entry 44353 added for thread 1 sequence 195 rlc 739556401 ID 0x4f8d3d29 dest 4:
    Wed Jan 19 08:15:29 2011
    RFS[5]: Assigned to RFS process 13643
    RFS[5]: Identified database type as 'physical standby': Client is LGWR ASYNC pid 7251
    Primary database is in MAXIMUM PERFORMANCE mode
    RFS[5]: Selected log 4 for thread 1 sequence 199 dbid 1279411810 branch 739556401
    Wed Jan 19 08:15:30 2011
    RFS[6]: Assigned to RFS process 13645
    RFS[6]: Identified database type as 'physical standby': Client is ARCH pid 3536
    RFS[6]: Selected log 5 for thread 1 sequence 198 dbid 1279411810 branch 739556401
    Wed Jan 19 08:15:31 2011
    Archived Log entry 44354 added for thread 1 sequence 198 ID 0x4f8d3d29 dest 1:
    Archived Log entry 44355 added for thread 1 sequence 198 ID 0x4f8d3d29 dest 2:
    Archived Log entry 44356 added for thread 1 sequence 198 ID 0x4f8d3d29 dest 3:
    Wed Jan 19 08:15:45 2011
    RFS[7]: Assigned to RFS process 13699
    RFS[7]: Identified database type as 'physical standby': Client is ARCH pid 3532
    Wed Jan 19 08:16:47 2011
    RFS[7]: Assigned to RFS process 13699
    RFS[7]: Identified database type as 'physical standby': Client is ARCH pid 3532
    Wed Jan 19 08:16:47 2011
    Starting ORACLE instance (normal)
    WARNING: You are trying to use the MEMORY_TARGET feature. This feature requires the /dev/shm file system to be mounted for at least 2147483648 bytes. /dev/shm is either not mounted or is mounted with available space less than this size. Please fix this so that MEMORY_TARGET can work as expected. Current available is 1586806784 and used is 3781902336 bytes. Ensure that the mount point is /dev/shm for this directory.
    memory_target needs larger /dev/shm
    Wed Jan 19 08:30:17 2011
    db_recovery_file_dest_size of 102400 MB is 0.00% used. This is a
    user-specified limit on the amount of space that will be used by this
    database for recovery-related files, and does not reflect the amount of
    space available in the underlying filesystem or ASM diskgroup.
    It is look like the instance proseses was not shutdown during operation shutdown abort.
    If I connect to instance with sqlplus i have message:
    Connected with idle instance
    Proceses are still active.
    Output linux statement ps -aux | grep oracle:
    root 13032 0.0 0.0 88060 3248 ? Ss 08:13 0:00 sshd: oracle [priv]
    oracle 13039 0.0 0.0 88060 1860 ? S 08:13 0:00 sshd: oracle@pts/1
    oracle 13040 0.0 0.0 68248 1676 pts/1 Ss 08:13 0:00 -bash
    oracle 13402 0.0 0.3 2328080 22220 ? Ss 08:15 0:00 ora_pmon_DB1
    oracle 13404 0.0 0.2 2325832 15536 ? Ss 08:15 0:00 ora_vktm_DB1
    oracle 13408 0.0 0.2 2325832 15584 ? Ss 08:15 0:00 ora_gen0_DB1
    oracle 13412 0.0 0.2 2325832 15468 ? Ss 08:15 0:00 ora_diag_DB1
    oracle 13414 0.0 0.2 2325832 15584 ? Ss 08:15 0:00 ora_dbrm_DB1
    oracle 13416 0.0 0.2 2325832 15680 ? Ss 08:15 0:00 ora_psp0_DB1
    oracle 13419 0.1 0.4 2327368 25688 ? Ss 08:15 0:08 ora_dia0_DB1
    oracle 13422 0.0 0.8 2325832 49152 ? Ss 08:15 0:02 ora_mman_DB1
    oracle 13425 0.0 0.4 2332100 27344 ? Ss 08:15 0:00 ora_dbw0_DB1
    oracle 13427 0.0 0.2 2325832 16648 ? Ss 08:15 0:00 ora_lgwr_DB1
    oracle 13432 0.0 0.3 2325832 21524 ? Ss 08:15 0:00 ora_ckpt_DB1
    oracle 13434 0.0 0.2 2325832 17600 ? Ss 08:15 0:00 ora_smon_DB1
    oracle 13436 0.0 0.2 2325832 15604 ? Ss 08:15 0:00 ora_reco_DB1
    oracle 13438 0.0 0.4 2326468 27976 ? Ss 08:15 0:00 ora_mmon_DB1
    oracle 13440 0.0 0.3 2325832 22120 ? Ss 08:15 0:00 ora_mmnl_DB1
    oracle 13442 0.0 0.2 2331932 15764 ? Ss 08:15 0:00 ora_d000_DB1
    oracle 13444 0.0 0.2 2326896 14784 ? Ss 08:15 0:00 ora_s000_DB1
    oracle 13447 0.0 0.2 2325852 16628 ? Ss 08:15 0:00 ora_dmon_DB1
    oracle 13527 0.0 0.8 2357896 48984 ? Ss 08:15 0:00 ora_arc0_DB1
    oracle 13530 0.0 0.5 2341496 31832 ? Ss 08:15 0:00 ora_arc1_DB1
    oracle 13532 0.0 0.8 2359596 50968 ? Ss 08:15 0:00 ora_arc2_DB1
    oracle 13534 0.0 0.7 2357896 48844 ? Ss 08:15 0:00 ora_arc3_DB1
    oracle 13536 0.0 0.8 2357896 48860 ? Ss 08:15 0:00 ora_arc4_DB1
    oracle 13538 0.0 0.5 2341384 31524 ? Ss 08:15 0:00 ora_arc5_DB1
    oracle 13540 0.0 0.5 2341384 31536 ? Ss 08:15 0:00 ora_arc6_DB1
    oracle 13542 0.0 0.5 2341384 31536 ? Ss 08:15 0:00 ora_arc7_DB1
    oracle 13545 0.0 0.5 2341384 31536 ? Ss 08:15 0:00 ora_arc8_DB1
    oracle 13547 0.0 0.5 2341384 31536 ? Ss 08:15 0:00 ora_arc9_DB1
    oracle 13555 0.0 0.2 2325852 16168 ? Ss 08:15 0:00 ora_insv_DB1
    root 18288 0.0 0.0 88060 3240 ? Ss 08:30 0:00 sshd: oracle [priv]
    oracle 18290 0.0 0.0 88200 2012 ? S 08:30 0:00 sshd: oracle@notty
    oracle 18291 0.0 0.0 54004 2232 ? Ss 08:30 0:00 /usr/libexec/openssh/sftp-server
    oracle 18336 0.0 0.2 87132 13336 ? Ssl 08:41 0:00 /u01/app/oracle/product/11.2.0/db_2/bin/tnslsnr LISTENER -inherit
    oracle 18607 0.1 0.6 2350168 39972 ? Ss 09:37 0:00 oracleDB1 (LOCAL=NO)
    oracle 18609 0.1 1.4 2395944 85880 ? Ss 09:37 0:00 oracleDB1 (LOCAL=NO)
    oracle 18611 0.0 0.5 2346216 36100 ? Ss 09:37 0:00 oracleDB1 (LOCAL=NO)
    oracle 18615 0.1 0.2 2331228 18136 ? Ss 09:38 0:00 oracleDB1 (LOCAL=NO)
    oracle 18617 0.1 0.3 2332184 21508 ? Ss 09:38 0:00 oracleDB1 (LOCAL=NO)
    oracle 18619 0.0 0.0 65556 940 pts/1 R+ 09:38 0:00 ps -aux
    oracle 18620 0.0 0.0 61160 736 pts/1 S+ 09:38 0:00 grep oracle
    Shared memory is still allocated for instance:
    df -h /dev/shm
    System plików rozm. użyte dost. %uż. zamont. na
    tmpfs 5,0G 2,0G 3,1G 39% /dev/shm
    Please for help.
    Regards
    Karol

    It is lool like the new standby database is started from old home:
    alert log:
    Starting up:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options.
    Using parameter settings in server-side spfile /u01/app/oracle/product/11.2.0/db_1/dbs/spfileDB1.ora
    System parameters with non-default values:
    My old home (11.2.0.1) u01/app/oracle/product/11.2.0/db_1
    My new home (11.2.0.2) u01/app/oracle/product/11.2.0/db_2
    previous start this database:
    alert log:
    Starting up:
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options.
    Using parameter settings in server-side spfile /u01/app/oracle/product/11.2.0/db_2/dbs/spfileDB1.ora
    System parameters with non-default values:
    Why database is starting from old home?
    I Changed directories in .bash_profile oracle OS user.

  • Switching between Primary and Standby database

    Hi,
    I managed to setup a standby database that is updated by the primary db either when doing a log file switch or when changing the role of the primary db to standby.
    Now I want to put the standby database (that was in primary role for a short period) back into its standby role. I entered
    "Alter database commit to switchover to physical standby with session shutdown;"
    The archived redo logs as well as the control file are updated on the primary database (which was in standby role for the same short period). When I enter
    "Alter database commit to switchover to primary" I am receiving the following error message:
    SQL> alter database commit to switchover to primary;
    alter database commit to switchover to primary
    ERROR at line 1:
    ORA-16139: media recovery required
    After issuing the recovery statement I get this message:
    SQL> recover database
    ORA-00283: recovery session canceled due to errors
    ORA-01610: recovery using the BACKUP CONTROLFILE option must be done
    At the same time this log entry is written into the alert log:
    Database not available for switchover
    End-Of-REDO archived log file has been received
    Archived log files detected beyond End-Of-REDO
    Incomplete recovery SCN:0:962365 archive SCN:0:977340
    Switchover: Media recovery required - standby not in limbo
    ORA-16139 signalled during: alter database commit to switchover to primary...
    But when I try to use the BACKUP CONTROLFILE statement during recovery I get this error message:
    SQL> recover database using backup controlfile;
    ORA-00283: recovery session canceled due to errors
    ORA-01666: control file is for a standby database
    Although being quite a newbie it's obvious that the primary database (which was standby for a short period) is worried that there are older archived redo logs than online logs. I guess this happens because of the log_archive_dest definition on the standby database :
    *.LOG_ARCHIVE_DEST_3='SERVICE=ORAMPPRD REOPEN=60 MAX_FAILURE=3 LGWR SYNC
    VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=ORAMPPRD'
    Changes are applied immediately and only written to the archive.
    But how can it be managed that the online redo logs on the primary system are also updated when switching back from standby ???
    Thanks,
    Philipp.

    Thanks, it's working now.
    I think it's important to explizitely follow the steps to switchover standby and primary for it to work. I maybe shutdown the standby to early.
    Cheers,
    Philipp.

Maybe you are looking for

  • ITunes Backup, Music and Podcasts only

    Dear Discussion members, I would like to back up my iTunes Library. I have a read a few posts first but haven't quite found the answer I'm looking for. I have a lot of podcasts and music on my internal drive. I do have an external but don't want to b

  • Fuzzy Display on my G4

    I am fortunate that my sister gave me her G4 FW800 I use it for a musical recording program called ProTools. I got ProTools last year as well as OS X(10.4.10) updated and all. My Sony display is fuzzy now and has been going between fuzzy and normal s

  • Zen Mozaic 8GB - Clock not working prope

    Hi I have a Zen Mozaic 8GB with the lastest firmware on board. I have notices that the clock appears to reset itself. This once so far, but used to be a regular problem for my Zen Microphoto 8GB. Is anyone aware of a fix for this clock problem? Many

  • "there was an error opening this document the root object is missing or invalid" adobe reader 9

    I get the following message every time I try an open some of my saved PDF files in Adobe Reader 9 "there was an error opening this document. the root object is missing or invalid." these files are not down loaded from a website, they are files I grea

  • Book Error: "Please review your billing information and approve it."

    Hi, I'm trying to purchase a book I created. It's 34 pages, with as many RAW images. The whole process seems to go fine until the end, when it spits out a dialog saying my account settings have changed, "Please review your billing information and app