Friday, March 27, 2020

Oracle Data Guard - How to rebuild PRIMARY after a Failover

If the primary database is not available for a long duration or suffered a permanent failure, then we have to consider a failover (not switchover) to the standby database to make it as the new primary database. Later, we also have to rebuild the old primary database and make it the new standby database.

Assumptions : 

a) The FLASHBACK database feature is turned on.
b) Oracle database version is Oracle 12c R1 (

Note: The last full backup on primary server must be successful and available. This will help in having at least a traditional backup/restore alternative in case the failover to the standby database is not successful.


Run the below steps on the standby server 

a) alter database recover managed standby database cancel; (Must return "Database altered" message quickly.)
b) alter database recover managed standby database finish; (Must return "Database altered" message quickly.)
c) alter database activate standby database; (Must return "Database altered" message quickly.)

At this stage, the database role must be turned as PRIMARY

d) shutdown immediate;
e) startup;

f) select to_char(standby_became_primary_scn) from v$database;  (NOTE THIS SCN value)

Now, it is strongly recommended to take a full database backup.

Rebuild OLD primary database

Run the below steps on the old primary server (which had a permanent problem that made you to do the failover in the first place).

1) shutdown immediate; (If it is already in running status)
2) startup mount;
3) flashback database to SCN nnnnn (Replace nnnnn with the actual SCN value noted in #f above)

4)  alter database convert to physical standby;
5) alter database recover managed standby database disconnect from session; (This will start the managed recovery process - MRP0 in the background)

6) select database_role from v$database; (Must show PHYSICAL STANDBY)

7) select switchover_status from v$database; It can show either "SWITCHOVER PENDING" or "NOT ALLOWED". Both are valid values.

Oracle database 8i to 12c R1 upgrade

This blog post provides the overall approach to upgrade from Oracle 8i (specifically to Oracle 12c R1 (specifically

Is your current version (8i R3) ?

If so, this is the approach. You have to perform two upgrades. The first one is called an intermediate upgrade.

We recommend you to use dbua tool (database upgrade assistant GUI tool) instead of export and import tools.

1) Oracle (8i R3) to Oracle

Do you have access to Oracle support ?

If so, request them to provide you Oracle software (base edition) through a service request.  Install this base software - Then download 8202632 which is the patch number for patchset and apply to the installed folder to bring it up to

Now do a direct upgrade from Oracle to 

2) In a separate path, install Oracle

Then upgrade the upgraded database to Oracle 

Monday, February 3, 2020

Best R Tutorial for beginners

If you are new to the R programming language (a beginner), then the best tutorial that we recommend is It is free and very interactive. There are LIVE DEMOs for most examples and you can practice them using your web browser.

Saturday, February 1, 2020

VirtualBox Error in supR3HardenedWinReSpawn VBoxHardening


One of our students was getting the error VirtualBox Error in supR3HardenedWinReSpawn with log details in VBoxHardening.log while starting a virtual machine.

This issue happens even after uninstalling VirtualBox and reinstalling using a different version. It happens both with version 6.x and 5.x respectively.


This problem was resolved after uninstalling "Trusteer Endpoint Protection" offered by IBM in the student's Windows 10 operating system.

We tried other potential solutions described in but uninstalling "Trusteer Endpoint Protection" offered by IBM solved the problem.

Saturday, January 25, 2020

AWS certification training

Hello all,

DBA University has started Amazon Web Services (AWS) Training courses in 2020. We now have two courses that will help students gain rich practical skills and pass AWS certification exams.

Both the courses are live training courses and can be registered using the below links

1) AWS certified cloud practitioner

Duration: 24 hours in 4 weeks. 
Schedule: Wednesday, Thursday and Friday 7:30 pm to 9:30 pm central time.

2) AWS certified solutions architect associate

Duration: 40 hours in 5 weeks.


Sunday  : 8:00 am to 12:30 pm central time (30 minute break).
Monday : 7:30 pm to 9:30 pm central time.
Tuesday : 7:30 pm to 9:30 pm central time.
Related Posts Plugin for WordPress, Blogger...