How to carry out Switch-over Drill aka DR drill.


Sanity testing/check  is a cursory test to confirm if a particular database is working properly or not. This implies that the database has already passed other kinds of testing before they can undergo sanity testing.  It is important to note that sanity test is not as in-depth as other kinds of testing/checks.

1. Check DR

show parameter log_archive_dest;



archive log list


select process,status,sequence# from v$managed_standby



production to production and dr to dr


production to dr and dr to production



tnsping <tns_entry>



show parameter undo

select name from v$datafile;

select name from v$tempfile;



alter system checkpoint
shu immediate
startup mount


backup:(on production)

set oracle_sid=<>

rman connect target sys/sys@<>

allocate channel c1 device type disk;
allocate channel c2 device type disk;
allocate channel c3 device type disk;
allocate channel c4 device type disk;
backup as compressed backupset database format 'L:\Daily_NEFT_Backup\neft_120117\RMAN_%U.bkp';


8.For checking the backup

select distinct time_remaining/60,opname from v$session_longops;



In production

1) alter database  commit to switchover to physical standby with session shutdown;
2) exit
3) startup mount
4) alter database recover managed standby database disconnect from session;      
5) select name,open_mode,database_role,switchover_status from v$database;

In standby

1) alter database commit to switchover to primary with session shutdown;

2) alter database open;

3) select name,open_mode,database_role,switchover_status from v$database;


10.Sync check

On Production

archive log list

On Standby

select process,status,sequence# from v$managed_standby;


11.In-case of errors

Errors in Prod

select error,status from v$archive_dest where dest_id<5;

Errors in DR

select file#, error from v$recover_file;
select max(sequence#) from v$archived_log where applied='YES';

Failover Switchover

Switch-over to Physical Standby Database:-

In the Primary:-

Begin by verifying that the primary database is capable of performing a
switchover. Query V$DATABASE for the value of the SWITCHOVER_STATUS

select switchover_status from v$database;

If the SWITCHOVER_STATUS column’s value is anything other than TO
STANDBY, it is not possible to perform the switchover (usually due to a
configuration or hardware issue).

Continue reading

Oracle Database 11g Dataguard Implementation Manual

What is a DataGuard ?

Oracle DataGuard ensures high availability, data protection, and disaster recovery for enterprise data. Data Guard provides a comprehensive set of services that create, maintain, manage, and monitor one or more standby databases to enable production Oracle databases to survive disasters and data corruptions. Data Guard maintains these standby databases as transactionally consistent copies of the production database. Then, if the production database becomes unavailable because of a planned or an unplanned outage, Data Guard can switch any standby database to the production role, minimizing the downtime associated with the outage. Data Guard can be used with traditional backup, restoration, and cluster techniques to provide a high level of data protection and data availability.

Preparing the PRIMARY Database:-

On the primary database, make sure you have set values for the following parameters, which impact the transfer of the redo log data. The first three parameters, listed next, are standard for most databases.

  1. DB_NAME: The database name. Use the same name for all standby databases and the primary database.
  2. DB_UNIQUE_NAME: The unique name for the database. This value must be
    different for each standby database and must differ from the primary database.
  3. SERVICE_NAMES: Service names for the databases; set separate service names for the primary and standby databases.

Continue reading

Installing Oracle Golden Gate

What is Oracle Golden Gate?

Oracle GoldenGate 12c offers a real-time, log-based change data capture (CDC) and replication software platform to meet the needs of today’s transaction-driven applications. The software provides capture, routing,
transformation, and delivery of transactional data across heterogeneous environments in real time. Oracle GoldenGate only captures and moves committed database transactions to insure that transactional integrity is maintained at all times. The application carefully ensures the integrity of data as it is moved from the source
database or messaging system, and is applied to any number of target databases or messaging systems.

Oracle Goldengate supports the replication of data across various heterogeneous platforms. The Goldengate replication topology includes the capture and transfer of the extracted data from the source database, across to the destination database.

Continue reading

Creating a local repository


Let’s create a yum repository from the packages that we have in the Red Hat/Centos installation DVD. Creating a YUM repository will help you to understand the concept of a YUM repository closely.

You get a large number of packages(development tools & application packages etc), inside the installation disk. However all are not installed, when you install the operating system.

Later on if you need a particular package, its not at all advisable to insert the installation disk once again, and fetch that required .rpm package and install it. Again if you face dependency problems, you need to fetch that dependency package once again(sometimes there are yet another dependency package required for installing your dependency package.So it becomes a tedious job). Continue reading