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

Similar Messages

  • Propagation after switchover to standby

    Hi
    My DB Version=10.2.0.4
    I had a stream relation that working correctly after switchover to standby in destination now in source database i got the following error in propagation:
    select status,error_message from dba_propagation
    DISABLED
    ORA-02068: following severe error from AQHOS
    ORA-01033: ORACLE initialization or shutdown in progress
    ORA-06512: at "SYS.DBMS_AQADM_SYS", line 1087
    ORA-06512: at "SYS.DBMS_AQADM_SYS", line 7616
    ORA-06512: at "SYS.DBMS_AQADM", line 631
    ORA-06512: at line 1
    i corrected all tnsnames and dblink is working correctly but still i have this error.
    WHAT I MUST TO DO?

    Refer to metalink document _STREAMS propagation to Primary of physical Standby configuation errors with Ora-01033, Ora-02068 *[ID 359971.1]*_
    You need to set SERVICE_NAMES. Hope this helps resolve your issue.
    Thanks

  • Hi Support team, somehow my mozilla settings have been changed and it baceme transprenet, now how to change back to normal ?

    Hi Support team, somehow my mozilla settings have been changed and it became transparent, now how to change back to normal because everything is transparent, menus, pages etc.

    This could be the same problem other users are reporting as a white screen or black screen, caused by an incompatibility between Firefox 33 and some older graphics card/chipset drivers.
    Please disable hardware acceleration as a temporary workaround. Step-by-step directions in this thread: https://support.mozilla.org/questions/1025438
    Does that work?

  • I partitioned my Mac Book so I could have windows and now i don't know how to switch back it also doesn't tell me what I want to use when I reboot it. How do I switch back to OS X?

    I partitioned my Mac Book so I could have windows and now i don't know how to switch back it also doesn't ask me what I want to use when I reboot it. How do I switch back to OS X?

    At startuo hold down the Option key. That will bring up a boot menu screen.

  • I have downloaded i tunes on my windows 7 pc 64 bit now how do i back up the music , contacts, files ...etc

    i  have downloaded i tunes on my windows 7 pc 64 bit now how do i back up my contacts , music , emails, files .....

    iTunes does not provide backup facilities.
    If you use backup software, it can be incorporated in the normal backup
    Or you can copy the iTunes folder onto an external disk or see this user tip using synctoy:
    https://discussions.apple.com/docs/DOC-2682
    This refers to backing up your iTunes library, not iPhone backup.

  • I'm copletley unhapy with ISO 7 Im using iphone 4 GSM it's so slow now how to downgrade back ???

    I'm copletley unhapy with ISO 7 Im using iphone 4 GSM it's so slow now how to downgrade back ???

    Thanks a lot for the link. I'll try out if that will help to speed up my phone.
    However, there has to be a possibility to downgrade to ios6 - otherwise the guys from Apple wouldn't have advised me to do so.
    Beside of all the problems I have withe the new ios it also looks childish designwise and lot of of things like handling was much better with ios 6.

  • Dual boot OSX and 9.2, how to switch back to OSX?

    Hi Guys,
    I am brand new to Mac. I was given this iMac Power Mac 750 600Mhz with 256MB memory and a 80G hard drive. When I got it, it boots to OS X and I don't know what I did (maybe because I plugged in a USB hard drive) but it started to boot to OS 9.2 now, and I don't know how to switch back to OS X.
    I remember, when I plugged in the USB flash key, it was running OS X, and it asked me to hold on the power button for several seconds to reboot, I followed that, and it boots to 9.2 ever since.
    How do I make it boot to OSX?
    Thanks!

    Hi Hexar,
    First of all, Welcome to the  Discussion forums and to Mac computers!
    See: "Mac OS 9, Mac OS X: Press X key during startup to select Mac OS X on single-volume installations"
    post back if you have further questions or comments,
    LS

  • I'm using  proxy media for a video I'm editing but now that i switch back to the original media some of my effects are missing can anyone help me.

    I'm using  proxy media for a video I'm editing but now that i switch back to the original media some of my effects are missing can anyone help me.

    Shouldn't happen.Only thing I can think of suggesting is to delete render files and try again. Trashing preferences is a long shot, but no harm in trying. Use the Digital Rebellion Preference Manager, a free download.
    Assume you have a reason for using such an outdated version of FCP X. That may be contributing to your problem.
    Russ

  • How to switch back my apps store to Malaysia apps store (own country)?

    Can someone tell me how to switch back my apple apps store to Malaysia apps store(own country).
    I have accidentally switch it to china apps store..
    Thanks

    Try going to the bottom of the Featured tab in the App Store app on your iPad and tap on your account id, tap on 'View Apple ID' on the popup and log into your account, and then select the Country/Region section and select Malaysia.

  • How to switch back to LAN?

    Bought a M10 Valet.
    Connected to a desktop via LAN. Then, we switched to wireless. How to switch back to LAN cable?
    Thanks.

    Spoiler (Highlight to read)
    Desktop has both wireless and cable capability. I was running cable direct without router or modem. Bought M10 and installed easily.
    Then, I discovered that router is running wireless to desktop. WAnted to return to cable for the desktop for security reasons.
    Issue: How to tell the M10 to run internet thru cable, and not wireless?
    Is it possible to tell router to do that for desktop alone? Or, must I disable wireless completely?
    M10 has no button or software control to switch between wireless and cable. What is that button the top of the router?

  • How to switch back to snow leopard from mavericks

    My macbook takes forever to lauch and many applications crash when i use them.
    i need my laptop to run as fast as it used too before mavericks.
    im not a professional concerning computer so i need step by step instructions on how to switch back to snow leopard.
    Please help me !!!

    See this User Tip  >  https://discussions.apple.com/docs/DOC-6161

  • HT1918 Suddenly cannot access iTunes US store. Says that I am at a UK iTunes store. How can switch back my US account?

    Suddenly cannot access iTunes US store. Says that I am at a UK iTunes store. How can switch back my US account?

    Sign/log out of your apple account then log back in. It will then allow you to use the US store.
    Rick

  • I live in Spain, but am an English speaker. I tried to download some apps from the English shop, but am told I cannot do that. Now I do not know how to switch back to the Spanish store ? I can not even update my existing Apps. I went to Settings' but cann

    I tried to download some Apps from the English shop but am apparently not allowed to do that. I am prompted to switch back to the Spanish shop.
    Unfortunately I do not remember how to do that. I cannot even update my existing Apps. I cannot find anything in Settings to get back to the
    Spanish store. help!!!
    Bambi

    Settings > Stores (or iTunes and App Store) > Apple ID > View Apple ID > enter password > Country/Region

  • Random crashes after upgrade; how to switch back to previous version Firefox

    First of all Firefox upgraded itself without asking, even though I did not give any approval or command to go ahead. Since my HW is a bit older, I do not want to go for any SW upgrades of my infrastructure SW, except essential tools for my work. 99% of time upgraded SW will need/ use up more resources and slow down the performance while providing "NEW" features or enhancements which I may not even want unless I upgrade my HW. Now I am prone to more crashes when I have scores of tabs in 3 or 4 windows, which is normal for my concurrent processing mind; as often my searches result in things that I cannot finish reading/followup in a day. Although I do bookmark a lot too, but one has to remember to do it; whereas a Tab is open there to REMIND me to read or followup.
    Secondly, Then there is no easily visible way or button to switch back to the "previous" version of Firefox; i.e. to undo the Upgrade. Very disappointing and frustrating !! What happened to customer-oriented thinking ?
    Adobe behaves better, I have been saying NO to its upgrade question a zillion times, without unchecking "Remind Later" box. And it did not upgrade automatically in last 2 yrs. Only when I pressed ENTER with its button in focus, did it go ahead and upgrade itself (even that was unwittingly done, but at least it WAS my action).
    S. Jalali

    Go to Tools>Advanced>Firefox updates - and check as you wish for the future.
    Going back to an earlier version is never a good idea for security reasons.

  • Boot Camp, How to switch back to Mac OS X from Windows?

    I successfully installed boot camp and Vista on my imac so I could watch netflix on my computer (other than that I have no use or patience for Vista or Windows). Now, I am in Windows Vista and am unable to switch back to Mac OS X. I have looked everywhere, including the Windows Help and Support and I can't see how to close Windows and get back to the good side.

    Open the Control Panel, click on Startup Disk, and change the setting; this item will only appear if the Boot Camp drivers are installed. Alternatively, restart the computer with the X or Option keys held down; in the second case, select the Mac OS X system, push the button with the straight arrow, and change the startup disk from System Preferences afterwards.
    (35215)

Maybe you are looking for