Oracle Active DataGuard 12.1 Installation on Centos 6.7
Beta version of the document. Needs to be tested on real servers! If anyone follows this version of the document, please report back on what works, what needs fixing.
Oracle Data Guard technology provides a solution for high availability, increased performance, and automatic disaster recovery.
Changes in the primary database can be transmitted to standby databases with a guarantee of no data loss during the transfer.
Two types of standby databases are supported - physical and logical standby.
A physical standby database contains the same structures as the primary database. A logical standby database may have different internal structures (e.g., additional indexes used for report generation). Synchronization of the primary database with standby databases is accomplished by transferring log data through SQL statements executed on the standby database.
A physical standby database is a block-level copy of the primary database. During disaster recovery, the standby database is exactly identical to the primary database.
A logical standby database is used for report generation (which requires significant system resources). In this case, the standby database is opened read-only and users who need to generate reports work with it. Meanwhile, the primary database continues to receive data from operators.
I don’t have an environment where I constantly work with DataGuard. Here I will try to configure it. I will update it as I gain new knowledge.
If you find errors, inaccuracies, typos, or know better approaches, write in the chat or email.
And yes, I haven’t read the DataGuard Concepts Guide yet and don’t plan to in the near future. Nowhere I’ve worked has it been used, because it’s expensive. When there are tasks, I’ll start a more in-depth study right away. Therefore, clarifications will be very useful.
The essence of DataGuard for someone who hasn’t read the Concepts Guide seems quite simple. You need 2 identical (or roughly identical) servers. One will handle routine tasks, the other will, for example, build reports that consume a lot of CPU time, memory, etc.
To do this, a copy of the primary server is made. The primary server shares archive logs with the standby, thus keeping the database up to date. If the first server crashes, they can be swapped.
You can also configure the server to work in failover mode and switchover mode (role switching between primary and standby instance).
DataGuard works in Enterprise configuration and requires GRID. The license cost will be higher than Standard. If so, it might be cheaper to deploy 2 Standard servers and feed archive logs from one to the other, for example using RSYNC.
A similar task can also be solved using Oracle Golden Gate. Perhaps the solution with Golden Gate would be better.
db_name - name of our database (same for primary and standby instance).
db_unique_name - this is a unique name for each instance, it does not change when switching roles from standby to production.
Preparing virtual machines and instances:
- Description of the system to be configured
- Preliminary steps for environment setup
- Preliminary steps for configuring instance parameters
Preparing and creating DATAGUARD:
- Creating directories on standby that exist on primary
- Copying password file from primary to standby
- Starting instance on standby
- Configuring Oracle network services for creating a duplicate of primary on standby
- Configuring instance parameters on primary for DataGuard configuration
- Creating standby redologs on primary
- Checking RMAN connection to both Instances
- Creating and executing RMAN script for duplicating primary
- Configuring Instance parameters after creating the duplicate on standby
- Checking redo apply
- Queries for obtaining DataGuard status information
Broker (DGMGRL)
- Installing the broker (DGMGRL)
- Reconfiguring Listener for Switchover
- Switchover (role switching between primary and standby instance)
Backups
Related materials: (Sorted from more useful to less):