Updates from November, 2014 Toggle Comment Threads | Keyboard Shortcuts

  • Sachin Thapa 16:32 on November 21, 2014 Permalink | Reply
    Tags: , , , , , , , , , troubleshooting, Troubleshooting Data Guard   

    Troubleshooting Data Guard 

    In this post related to Data Guard we are going to cover troubleshooting, I cover common issues and resolutions regarding the configuration and maintainance of a Data Guard environment.

    You already might know that you have the alert log and trace files, Data Guard broker checks and configuration. Data Guard could have any of the following problems

    • Common management issues
    • Physical standby issues
    • Logical Standby issues
    • Switchover problems
    • failover problems
    • Data Guard Broker issues
    • Data Guard snapshot standby issues (More …)
  • Sachin Thapa 16:28 on November 21, 2014 Permalink | Reply
    Tags: , , , Backup and Recovery in Dataguard, , , , , ,   

    Backup and Recovery in Dataguard 

    Protecting your data is extremely important, your job could depend on it, making sure that your data is backed up and that you are able to restore it in a disaster goes without saying. They are many methods to backing up your data

    • Unix backup tools such as tar, dd cpio
    • SAN backup utilities
    • Tape backup
    • 3rd Party backup software such as netbackup
    • Oracle’s RMAN

    In this section I will only be covering Oracle RMAN which I have also covered in a previous Oracle article called RMAN, so if you need to brush up on your RMAN skills then take a look. Below is the terminology that I will be using

    • Target database – the database against which RMAN commands are run
    • Catalog database – the database that houses the recovery catalog schema
    • Auxiliary database – when cloning a database, represents the name of the actual clone database
    • Recovery Catalog – the catalog that contains metadata information about the backups
    • Backup piece – the file that contains the backup of a control file,archived logs or a datafile
    • Backupset – one or more backup pieces
    • Image copy – the copy of a datafile, or archive log that is similar to copies made with the cp or dd operating system command

      (More …)

  • Sachin Thapa 16:22 on November 21, 2014 Permalink | Reply
    Tags: , , , , , , TAF, Transparent Application Failover   

    Automating Site and Client Failover 

    Client Failover

    Now we know how to switchover/failover the database what about the clients or even middleware servers, how do they react to a switchover/failover. In this section I discuss automatic site and client failover, I will cover how to configure your client applications and databases so your connections seamlessly and transparently reconnect to the new primary database. The failover can be divided into three categories

    • Service relocation – The database service used by the primary application to connect to the database should be active only on the primary database, if a failover or switchover occurs this service should be automatically migrated to the new primary database
    • Client notification – Once the failover has completed the application should be notified that a failover has occurred and that connections should be migrated to the new primary database (More …)
  • Sachin Thapa 16:18 on November 21, 2014 Permalink | Reply
    Tags: , , , , , , , Read-Only Standby, Real Application Testing, Snapshot Standby   

    Active Data Guard 

    In this section I will discuss the following

    • Physical Standby – open read-only
    • Snapshot Standby – QA and Testing
    • Real Application Testing (RAT)
    • Active Data Guard

    The read-only physical standby database can be used to offload query from the primary database, you can use select statements and complex queries against this this database freeing up resources on the primary database, also remember that the standby database could be localized thus reducing network latency. While the standby is open read-only, the following operations are disallowed

    • Any Data Manipulation Language (DML) except for select statements
    • Any Data Definition Language (DDL)
    • Access of local sequences
    • DMLs on local temporary tables (More …)
  • Sachin Thapa 16:08 on November 21, 2014 Permalink | Reply
    Tags: , , , , ,   

    Switchover and Failover 

    This section is what Data Guard is really all about, its about a standby database taking over the production database, and how to revert back when problems have been fixed.

    Role transition is divide into two types switchover and failover, they also might be called switchback, failback but they all mean the the same thing to transition the state of Data Guard from one state to another.


    Switchover is the act of change the standby database into the primary but in a controlled manor, the planned event means that it is safe from data loss because the primary database must complete all redo generation on the production data before allowing the switchover to commence. The switchback does not exists as it is a switchover but in the reserve order, which would restore the database back on its original server. This planned event normally happens during a quiet period, the reason for the switchover might be DR testing, patch, hardware changes, implementing RAC, etc. (More …)

  • Sachin Thapa 16:01 on November 21, 2014 Permalink | Reply
    Tags: , , , , ,   

    Monitoring Data Guard 

    Proactive monitoring plays a big parting in making sure that your Data Guard environment is working correctly and that potential problems are picked up very quickly. This is one area the business never see’s, it takes a lot of work to keep a system running 365 days per year without downtime. This section will cover both physical and logical standby databases, we look at log files, statistical information, log gaps, redo transport.

    We first start at the alert log file which every dba should be familiar with, I use a script which was supplied by the http://www.dataguardbook.com website, I have made a few changes and linked into my monitoring system (Big Brother or BB for short). The script compares the alert.log to the previous version that was checked and any new ORA errors are then alerted. The script is called alert_log_monitor.ksh, you need to setup an environment first which means creating a file called .ORACLE_BASE which you would source first or put in your profile as that it gets sourced every time you login (More …)

  • Sachin Thapa 15:58 on November 21, 2014 Permalink | Reply
    Tags: , , , , grid, grid control, grid control agent,   

    Oracle Grid Control 

    Installing Grid Control

    I am going to confess that setting up Oracle Grid Control was no easy task, I do think that the Oracle documentation is not an easy read, they really need a quick setup guide.

    Firstly the Virtual Machine needs to be a bit more powerful and you do require more disk space, I have allocated 50GB, this will allow me to install and keep the installation binaries. Again I have prepared the Linux server in the same way as the primary database server, I also used the oracle-validated RPM to prepare the server for Oracle.

    Prepare Oracle using oracle-validated ## as root
    cd /etc/yum.repos.d
    wget http://public-yum.oracle.com/public-yum-el5.repo## Edit the downloaded repo file and enable any of the sections you require## install oracle-validated
    yum list
    yum install oracle-validated

    I am not going to explain in detail how to setup grid control but point you to some sites that have already done this, but I will highlight some of the pitfalls I encountered, firstly GRID control is very picky on what version (More …)

  • Sachin Thapa 15:55 on November 21, 2014 Permalink | Reply
    Tags: , Configuration Files, , , , , , Interaction, , State and Monitoring   

    Data Guard Broker 

    The broker is part of Oracle’s Database Enterprise Manager and an integral part of Data Guard, it is the management framework. You can of course use SQL*Plus to manage Data Guard but the broker when used with the Enterprise Manager becomes a powerful tool offering the following

    • Configuration
    • Monitoring
    • Alerting
    • Performance Analysis
    • Manual switchover’s
    • Automatic switchover’s

    Before I discuss the integration of the broker into the Enterprise Manager lets first discuss the broker itself. The broker can make changes to a Data Guard setup (physical or logical database), the type of changes are configuration, transport modes, apply setup and role change services and the protection mode. You can also monitor the health of any configuration, it is also responsible for implementing and managing the automatic failover capability also know as Fast-Start Failover (FSFO).

    The broker has three parts, a set of background processes on each database, a set of configuration files and a commandline interface (CLI) called DGMGRL.

    The broker has a number of processes running, the broker manages these processes automatically you have no control over them

    • Data Guard Monitor (DMON) – this is the main process and (More …)
  • Sachin Thapa 15:49 on November 21, 2014 Permalink | Reply
    Tags: Components of a physical Standby, , , , , , , Physical Standby Corruption Detection, redo processing   

    Dataguard Redo Processing 

    What makes a good database is its ability to recover from crashes and mistakes by users or dba’s, redo data is used to recover from these types of mishaps. I have already discuss redo in my Oracle section, but in section I go into a little more depth and were it fits in the Oracle Data Guard Environment.

    Recovery deals mainly with redo data that recovery can use to reconstruct all the changes made to the database, it’s like a replay. Below are the important concepts and components of Oracle recovery

    • Redo change vectors – a change vector describes a single change to a single data block
    • Redo Record – a collection of redo change vectors that describe an atomic change, atomic meaning all changes are successful not successful
    • System Change Number (SCN) – it describes a point in time and is very important, when a transaction starts its reference point for database consistency is relative to the SCN of when it started, the SCN increases when a transaction is committed. The SCN is stored in the redo log, controlfiles and data files headers.
    • Checkpoint – A point in time when all items are of a consistent state, all recovery is bounded by the database checkpoint, there are thread checkpoints (local checkpoint), database checkpoint (global checkpoint) and a datafile checkpoint (stored in the datafile header). (More …)
  • Sachin Thapa 14:58 on November 21, 2014 Permalink | Reply
    Tags: , , , , logical standby, , standby   

    Logical Standby Dataguard 

    A logical standby mines the primary database redo and reconstructs the higher level SQL operations that resulted in the database change, and then applies these SQL statements to maintain the standby database. The benefits to using a logical standby is that

    • It can be open for reads
    • Can support indexes and materialized views
    • Can add tables, schemas and have read-write access to these tables and schemas (as long as they are not managed by redo apply)
    • Perform rolling upgrades, for example the primary may be using 10g and the logical standby could be using 11g
    • Idea for testing patch sets
    • Idea as a staging system to propagate changes

    There are three major aspects when dealing with a logical standby (More …)

Compose new post
Next post/Next comment
Previous post/Previous comment
Show/Hide comments
Go to top
Go to login
Show/Hide help
shift + esc