Quantcast
Channel: Oracle
Viewing all articles
Browse latest Browse all 1814

Wiki Page: Shareplex for Oracle Data Replication: Part 1

$
0
0
Introduction We are all aware of data replication . We have also heard about a variety of tools to facilitate data replication for Oracle Databases. Today, I would like to discuss about one such tool called Shareplex. Please read on to explore!! I would try to put it in the simplest form. Data replication is process of maintaining copies of business data. What is the need? Data Replication is an essential business need to maintain high availability, addressing disaster recovery, offloading adhoc database queries, database reporting and so on. By means of data replication, the business maintains multiple copies of business data to address the forth mentioned scenarios. Data Replication in Oracle: Oracle itself provides a variety of tools to facilitate data replication across multiple sites such as Oracle Streams, Materialized Views, DataGuard and GoldenGate. However, there is pros and cons associated with each of these tools. To mention few, lets consider the most popular tool DataGuard. Though it is arguably the best tool to facilitate disaster recovery, It has its own limitation like, we can only configure it for Oracle Enterprise Edition. Both source and target database must be in the same version and so on. The logical data replication tool 'GoldenGate' is considered to be the most expensive replication tool in market which most organizations do not find feasible (cost-effective) to implement. In addition to that, GoldenGate doesn't have any inbuilt mechanism to facilitate data comparison and addressing out of sync data between source and target database. We need to have another tool called Veridata to facilitate data comparison and data repair, which again increases the cost of data replication. It also requires certain level of expertise to support the GoldenGate implementations, which again increases the resource cost. Oracle Streams on the other hand is going to be obsolete soon and GoldenGate is going to replace it all together. What is Shareplex? Shareplex is a data replication tool primarily designed for replicating data across different Oracle databases. It is a product from Dell (Originally from Quest). It provides a wide range of real-time data replication features. Shareplex differs from other replication technologies in a number of ways, a few of which are listed below. 1. Shareplex replicates only the changes made to the business data, without interrupting the business processing. Shareplex captures the changes made to the business data as they happen (by means of Redo Logs and Archive Logs). This makes Shareplex very lightweight, fast and at the same time very accurate. 2. Since, Shareplex replicates the changes as they happen; the replication site is always up to date and in sync with the business data. 3. The replication sites maintained by Shareplex can be utilized for Query offloading as well as for reporting (as they are up to date). This in turn improves the performance of the OLTP databases. 4. Shareplex architecture is simple to learn and understand which makes it very adaptive for the Oracle DBAs to implement and support Shareplex replication environments. 5. Shareplex Licensing is very reasonable and cost-effective while compared to other replication technologies providing the similar replication features for Oracle databases. 6. Shareplex data replication supports Oracle Enterprise as well as Standard Edition. The most important of all, Shareplex has the patented solution for comparing replicated data between source and target as well as fixing the replicated data in case it is not in sync with the source data. Shareplex Replication Architecture: On a high level, Shareplex captures changes as they happen from the source database by reading Oracle Redo Logs and or Archive Logs, processes it on the source system to prepare a copy of the replicated data and transports it on the target system. On the target system Shareplex receives the replicated copy of data and processes it to construct equivalent SQL operations and then executes the SQL operations on the target database. Shareplex replication framework consists the following components. 1. Source Database 2. Capture Process 3. Capture Queue 4. Read Process 5. Export Queue 6. Export Process 7. Import Process 8. Post Queue 9. Post Process 10. Target Database A pictorial representation of the framework is given below. Source Database: SOURCE is the primary database system that contains the business data that needs to be replicated. This business data is called the source data. Capture Process: The Capture Process runs on the source database system. The capture process reads the Oracle Redo Logs (as changes happen to the source data) and if required the Archive Logs (mostly when the redo generation is high) and then makes a copy of the data (target data) and sends it to the Capture Queue. The capture process is named as sp_ocap (Oracle Capture). There can be only one capture process running on the source database system for a particular datasource (replication configuration). Queues in Shareplex: Shareplex queues are basically temporary data repositories that holds the interim replicated data during the process of the data transmission from source to target system. All the Shareplex queues are maintained out of oracle database for further processing by Shareplex to facilitate data replication. Data flows through the Shareplex queues in the order of data generation. This means data flows from Capture Queue to Export Queue and then to the Post Queue.Data in a queue is not released (erased) until it is written to the next queue. Capture Queue: The capture queue is located on the source system. The Capture queue holds the data read by the Capture process from source database redo logs or archive logs. Since we can have only one capture process in the source database, there is only one capture queue that holds the interim captured data from the source database. Read Process: The Read Process runs on the source system. The job of the read process is to read the data from the capture queue and prepare it for transmission (add routing information to the data) to the target system across the network and place the data in export queues. The Read process is named as sp_ordr (Oracle Reader). There can be only one Read process running on the source database system to read data from the capture queue (mapped to a datasource). Export Queues: The Export Queue (s) are located on the source system. It holds the data that has been processed by Shareplex Read process and is ready for transmission to the target system. By default, we have one export queue on the source database system irrespective of the number of target database systems being configured for that source database. However, we can create additional named export queues for complex replication configuration. Export Process: The Export process runs on the source system. It reads the replicated data from export queues and transports it to the target system across the network. The export process is named as sp_xport (Export) We have a one-to-one mapping for export process. In a multi-target Shareplex replication, there would be a export process running on the corresponding source database for each of the target database. Import Process: The Import process runs on the target system. It receives the replicated data on the target system from source system and sends it to the post queues. The import process is named as sp_mport (Import) Similar to the export process, Import process has a one-to-one mapping. In a multi-source SharePlex replication, there would be a import process running on the corresponding target database for each of the source databases. Post Queue: The Post queue (s) are located on the target system. It holds the replicated data that is ready for writing on the target database. By default, there is one post queue in the target database system for a corresponding source and target. However, we can create additional named post queues depending on the replication complexity. Post Process: The Post process runs on the target system. It reads data from the post queue, constructs the necessary SQL statements for operations and applies them on the target database. The post process is named as sp_opst_mt. There is one post process for each post queue on the target database system. Target Database: The database system to which the source data needs to be replicated (copied) is called the TARGET system and the replicated copy of the data in the TARGET system is called target data. What to replicate? When we configure any logical data replication , there needs to be a mechanism to define what data needs to replicated. Shareplex does this by means of configuration files. A configuration file is a user defined TEXT file, which specifies the database objects that needs to be replicated by Shareplex and where to replicate. The configuration file consists of following 1. Datasource: It is the ORACLE_SID (o.SOURCE_ORACLE_SID) of the source database which contains the source data that needs to replicated. 2. Source Objects: The name of source database objects which contain the source data that needs to be replicated. Shareplex supports replication of TABLES and SEQUENCES. 3. Target Objects: The name of target database objects that will receives the replicated data. 4. Routing Map: The route for transporting data from source to target system. In general, a routing map consists of targets system (s), any intermediate system or Shareplex named queues and the ORACLE_SID of target database (TARGET_SYSTEM[:named_queues]@o.TARGET_ORACLLE_SID) . A simple template of the configuration file is shown below. Datasource:o.SOURCE_ORACLE_SID #source_object target_object routing_map SCHEMA.TABLE_NAME SCHEMA.TABLE_NAME TARGET_SYSTEM@o.TARGET_ORACLLE_SID SCHEMA.SEQUENCE_NAME SCHEMA.SEQUENCE_NAME TARGET_SYSTEM@o.TARGET_ORACLLE_SID Supported replication configuration: Shareplex is versatile and flexible replication tool. It supports a variety of data replication configuration. A source system can have multiple target systems. At the same time, a source system can simultaneously act as a target system, receiving replicated data from other source systems. Likewise, a target system can receive replicated data from multiple source systems, and it can simultaneously serve as a source system, sending data to other target systems. SharePlex can even be configured to replicate data between tables on the same system (server), either within the same database or in different databases. The following diagram depicts the different type of replication set-up that can be configured using Shareplex. Conclusion Shareplex is undoubtedly a very simple and easy to use replication tool for oracle. It is probably the most cost-effective data replication solution for oracle considering the vast number of replication features it provides. What makes it different is the patented compare/repair solution for data comparison and data repair between source and target database. In the next article, we will discuss how to install Shareplex as well as we will get familiarize with the file system architecture of a Shareplex installation. SharePlex Quick Links Product Information (Features, specifications, and additional resources) Free Trial

Viewing all articles
Browse latest Browse all 1814

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>