Written by Nassyam Basha
Oracle introduced Far Sync instance for Data Guard use from 12c to work as proxy/broker between the primary and standby database if the both sites are too far and network bandwidth issues, But the Far-Sync is not supported with EM 12c but limited with monitoring, but we cannot create Far-Sync instance like we create standby database, Finally Far-Sync is fully supported with EM13c, This Article explains how to create Far-Sync instance and how to configure using EM13c.
Usually standby database created for the disaster recovery solutions and of course geographically different location. But there are challenges when the DR database is too far from primary database with the network and bandwidth. There are many issues seen by users in such configuration. Now oracle comes up with the solution as a broker or proxy between the primary and standby databases. Primary can send redo synchronously or asynchronously to Far Sync instances but Far Sync can send redo asynchronously hence zero data loss can be achieved. Of course we have already seen various articles on FarSync creation using sqlplus mode and configuration hence not giving in depth details on architecture or configuration or creation. Again our goal is to create Far Sync near to the primary database to ensure redo is receiving with no LAG. As said this articles explain how to create and configure Far Sync using EM13c.
Below is the overall view of the Data Guard configuration includes hostnames, database names and unique name details. We have also configured Data Guard broker so that we can manage entire Data Guard configuration.
DGMGRL> show configuration
Configuration - hadg
Protection Mode: MaxPerformance Members: canada - Primary database india - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:SUCCESS (status updated 7 seconds ago)
In this setup we have used EM 13.1.0 and the databases version is 220.127.116.11 , Data Guard working under maximum performance with Broker. Before adding the Far Sync from EM13c we have to prepare the plan on what steps to be performed prior to creating Far Sync. We will look at glance of Data Guard configuration from EM13c.
If we see above image we can see the “Add Far Sync” option from the configuration.
There are various attribute fields we have to provide in EM13c in order to create, based on the inputs the deployment works. Hence we have to clear and ensure they are available or accessible and the information is correct.
1) Host Name
Provide the host name which is discovered, with EM we have flexibility to select the host name from the list of the targets.
2) Oracle Home of Far Sync
We have to provide the location of the Oracle home we installed i.e. 18.104.22.168[oracle@ORA-U2 ~]$ cd /u01/app/oracle/product/22.214.171.124/dbhome_1/[oracle@ORA-U2 dbhome_1]$ pwd/u01/app/oracle/product/126.96.36.199/dbhome_1[oracle@ORA-U2 dbhome_1]$
3) Instance Name
Provide the proposed instance name for Far Sync , In this setup we have used instance name same for all the databases i.e. ORC1
4) Database Unique Name
Far Sync am going to create near to the primary database “CANADA” so am naming the unique name as “CANFAR”
5) Target Name
This name basically used by EM but not related to the Far Sync instance, so either we can use same name CANFAR or any other name.
This option provides you whether you prefer to create database on ASM Disk groups or normal file system, in this setup I have chosen normal file system. Click “Next” to proceed with other attributes
7) File Location
8) Listener Configuration
If the Listener already exists then we can specify the Listener name and ensure this was already discovered. If not create the listener using NETCA or manually.
LISTENER12C =(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.120)(PORT = 1521)))
Same time add the TNS entries of all the three databases.
INDIA =(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = ORA-C2.localdomain)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SID = ORC1)))CANADA =(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = ORA-C1.localdomain)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SID = ORC1)))CANFAR =(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = ORA-U2.localdomain)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SID = ORC1)))
Selected the listener which is running from the host.
After providing all the attributes again click on “Next”From the summary part we can review the entire configuration and if any changes are required then we can go back to previous pages and change accordingly, If we are good with the configuration then we can submit the deployment.
Once the deployment started, EM gives allocates the activity name and also great flexibility to check the status of all the steps.
We can monitor in which step the EM is working and also elapsed time of total activity so far. If there is any network issues or bandwidth issues or SSH issues expected to take much time.
Now we can see the overall status that creation of Far Sync is completed, we can also see the elapsed time and the status of the entire activity. Next we will proceed to check the Data Guard administration to check whether the Far Sync instance appears or not. While the deployment is in progress we can also review the alert log files for the status or if stuck somewhere.
Mon Sep 12 02:39:39 2016ALTER DATABASE CREATE FAR SYNC INSTANCE CONTROLFILE AS '/tmp/ORC1_2016091120093908/control01.ctl'Mon Sep 12 02:39:39 2016Clearing standby activation ID 1550288635 (0x5c6786fb)The primary database controlfile was created using the'MAXLOGFILES 16' clause.There is space for up to 13 standby redo logfilesUse the following SQL commands on the standby database to createstandby redo logfiles that match the primary database:ALTER DATABASE ADD STANDBY LOGFILE 'srl1.f' SIZE 52428800;ALTER DATABASE ADD STANDBY LOGFILE 'srl2.f' SIZE 52428800;ALTER DATABASE ADD STANDBY LOGFILE 'srl3.f' SIZE 52428800;ALTER DATABASE ADD STANDBY LOGFILE 'srl4.f' SIZE 52428800;Completed: ALTER DATABASE CREATE FAR SYNC INSTANCE CONTROLFILE AS '/tmp/ORC1_2016091120093908/control01.ctl'
We are done with Deployment of Far Sync instance and next we will ahead with the configuration tasks.
This is the critical step to configure the entire Data Guard configuration, Earlier the primary was sending redo/archive to standby database, now we are going to change the redo routes from Primary to Far Sync Instance and then Far Sync will pass the redo to standby database.
1. Edit India – Standby Database Configuration.
The below configuration says INDIA is alternate for Far Sync in case of Far Sync inaccessible.
Update the parameters and then save the changes.
2. Edit CANFAR – Far Sync Instance
This below configuration states in which databases Far Sync works and then save the changes.
Finally we are done with the configuration of the Far Sync for Redo Routes.
Finally we can review the configuration of the Data Guard including Far Sync, Below we can see the status is successful and also India (standby) works as the alternate of CANFAR.
Protection Mode: MaxPerformance Members: canada - Primary database CANFAR - Far sync instance india - Physical standby database (alternate of CANFAR)
Configuration Status:SUCCESS (status updated 39 seconds ago)
From the FarSync configuration we can clearly see what is the source and the destination – Redo Routes.
DGMGRL> validate far_sync 'CANFAR' Member Role: Far Sync Instance When Primary Is: canada
Active Redo Source: canada Redo Destinations: india
Thread # Online Redo Log Groups Standby Redo Log Groups Status canada CANFAR 1 3 3 Insufficient SRLs
DGMGRL> validate database india
Database Role: Physical standby database Primary Database: canada
Ready for Switchover: Yes Ready for Failover: Yes (Primary Running)
Flashback Database Status: canada: Off india: Off
Current Log File Groups Configuration: Thread # Online Redo Log Groups Standby Redo Log Groups Status (canada) (india) 1 3 3 Insufficient SRLs
Future Log File Groups Configuration: Thread # Online Redo Log Groups Standby Redo Log Groups Status (india) (canada) 1 3 2 Insufficient SRLs
Transport-Related Property Settings: Property canada Value india Value RedoRoutes (LOCAL:CANFAR sync alt=(india async fall(LOCAL:canada async)
We’ve seen how to deploy the Far Sync instance to act as broker between primary and standby databases starting from action plan including the review of the deployment of Far sync and also how to configure the redo routes from EM13c and finally we have reviewed the configuration and how the destinations were configured and also replicated to Data guard Broker. Important points also mentioned as Do’s for the readers which ease the deployment without any issues.