Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

An inside look at DB2 Advanced Enterprise Server Edition, Part 2: Q replication and federation

David Tolleson (tolleson@us.ibm.com), Product Manager, IBM
David Tolleson has worked for IBM for 30 years. He is currently product manager for IBM's InfoSphere Federation Server and InfoSphere Replication Server products. He has worked extensively on data federation and was one of the developers of IBM's first federation server, called DB2 DataJoiner. He manages two blogs: The Data Replication Exchange and About Data Federation.

Summary:  This article is the second in a series highlighting IBM® DB2® Advanced Enterprise Server Edition (AESE) for Linux®, UNIX®, and Windows® (LUW) — a software package that includes IBM DB2 Enterprise Server Edition V9.7 with optimization, plus a set of robust development and management tools. Providing a comprehensive, integrated solution in one package, DB2 AESE improves your ability to manage the DB2 environment without adding complexity.

View more content in this series

Date:  14 Jul 2011
Level:  Intermediate PDF:  A4 and Letter (417KB | 12 pages)Get Adobe® Reader®
Also available in:   Chinese  Vietnamese  Portuguese

Activity:  4084 views
Comments:  

This article spotlights two key features in DB2 AESE:

  • Q replication provides high system availability through active/active replication between a pair of DB2 for LUW data servers.
  • Federation provides transparent access to data from different databases to help simplify data integration for customers using DB2 and other database technologies in a mixed environment. AESE adds federation of Oracle databases to DB2's built-in federation for DB2 and Informix® databases.

DB2 Advanced Enterprise Server Edition at a glance

DB2 AESE includes, at no additional cost, the following features and benefits:

  • Storage Optimization Feature (Compression) reduces storage costs.
  • IBM Optim Performance Manager (OPM) helps to identify problems before they affect the business.
  • Homogeneous Replication (Q-REP) enables seamless version-to-version migration and active-active high-availability topologies (limited to one pair of DB2 for LUW databases).
  • Advanced Access Control enables greater control over who can access your data.
  • IBM Optim Database Administrator (ODA) helps save time and reduce errors for database administration.
  • IBM Optim Development Studio (ODS) helps speed development and improve cross-team collaboration.
  • IBM InfoSphere™ Federation enables cross-application, real-time data integration (limited to DB2, Informix®, and Oracle federation).
  • IBM DB2 Workload Manager aligns resource allocation with business priority.

Continuous availability delivered through Q replication

The Q replication technology within DB2 AESE can replicate transactions between databases with low latency at very high throughputs and over practically unlimited distances for thousands of DB2 tables, while preserving transactional integrity and tolerating system and network outages. As an example, you may be able to achieve a throughput of millions of changes per minute with latency less than one second.

In DB2 AESE, this capability is delivered through the restricted use of the IBM homogeneous replication feature for DB2, enabling active/active replication between a pair of DB2 for LUW databases to maximize the use of server resources, reduce costs and provide multi-site availability. If a more flexible replication scenario is needed (for example, replication with an Oracle server), the full version of InfoSphere Replication Service can be purchased.

DB2 AESE's two-site Q replication is ideal for multi-site continuous availability solutions, such as active/active databases. Each database is active, allowing for workload distribution. Databases can be configured differently and reside on different types of hardware and software versions, allowing for immediate fail-over during outages, as well as no downtime during maintenance, upgrades, and migrations. Replication can be multi-directional and manage conflicting database changes. And if your company is using the IBM pureScale® feature of DB2 Enterprise Server, Q replication can be used seamlessly with it for additional value.

The components of Q replication include:

  • One Q Capture and one Q Apply program for each direction
  • One WebSphere® MQ queue manager per system (a restricted copy of WebSphere MQ is included in AESE).
  • Replication control tables are created in DB2 for containing the Q replication configuration and operational information.

Captured changes are staged and delivered via WebSphere MQ, which allows for moving data off the DB2 log quickly, even if the target database is down. Each captured database transaction is published in an MQ message. The Q replication process is depicted below.


Figure 1. The Q replication process
Diagram of the Q replication process enabling an active/active replication

To illustrate an active/active replication process, consider the simplified scenario depicted here:

  • Updating apps are assigned to the primary site with read-only apps assigned to the stand-by sites. Remember, Q replication also works with both sites active for updates.
  • Running at both sites are log-capture and apply programs, but in this simplified scenario, data is only replicating one way — from primary to standby.
  • A fail-over connection is set up for automatic switchover of updating apps from primary to standby.

Figure 2. Replication scenario
Initial replication scenario where Site A is active with Site B is standby

When an outage occurs at the primary site, the apps switch automatically to the standby site although a manual process is available if preferred. To avoid conflicts, let replication finish processing any queued data before you let updating apps start up on the standby site. Replication will begin queuing changed data for return of the primary site as soon as the updated apps hit the standby system.


Figure 3. Outage of primary site
Diagram of rerouting to standby site when outage occurs on site A

When the primary site returns, updating apps stay where they are until the potential for conflicts is resolved. First, the capture program is started on the primary to capture any changed data that was stranded on the primary when it went down. This provides the opportunity to see if there are conflicts because older changes on the primary may not fit well with new changes on the standby. Whenever replication detects a conflict, the SQL for the conflict is logged in a table. A report can be generated to see if any major issues exist. Choosing the option that prevents replication from applying the conflicted data to the standby table, prevents newer data (assumed to be better) from being overwritten by older data.


Figure 4. Receiving data from the standby
Upon recovery of Site A, the secondary site remains primary in                     order to update Site A

When the stranded data is replicated, the standby data can be sent to the primary by starting the apply program on the primary system. Then the standby data will flow to the primary. If you previously saw a conflict between the older data of the primary and the newer data of the standby, the option selected enables the older data to be overwritten by the newer data, but is logged for your review. Apps can be moved back to the primary, but it is best to wait until the apply program gets through the standby's backlog first. After this, the system looks again like the original scenario.


Figure 5. Updating apps return to primary
Site A returns to primary status when updates are complete

In addition to the flexible and powerful Q replication capabilities provided by DB2 AESE, several reports and tools are available to make it even more effective. First is a sample health summary from the Q Replication Dashboard, which provides global live views and aggregated views of the health and status of program, queues, subscription, and topology. Drill-down details are available behind the status, as well as access to historical data. Also available from the dashboard are support for alerts, operations, and user roles for access control.


Figure 6. Q Replication Dashboard
Image shows a screenshot of Q replication dashboard

The following is a sample report of the historical trend for the end-to-end latency of data at a target system, which helps verify SLA compliance and track unexpected spikes in latency.


Figure 7. Latency history
Image shows a screenshot showing the historical trend for the end-to-end latency of data

Finally, the Q Replication Performance Advisor helps identify latency issues with the replication environment and actually suggests ways to lower end-to-end latency.


Figure 8. Q Replication Performance Advisor
A screenshot of Q Replication Performance Advisor

Integrating Oracle databases with DB2 through federation

Included in AESE for LUW is a restricted use copy of IBM InfoSphere Federation Server, which provides easy integration of Oracle, Informix, and DB2 databases in an enterprise and the ability to query this data residing in multiple databases with a single SQL statement. InfoSphere Replication Server (purchased separately) is required to use Q replication with Oracle databases.

The federation of diverse data sources into a seamless system provides:

  • Transparency — The ability to code and use applications as though the data resides in a single database. This enables applications to continue to work despite any change in how data is stored.
  • Heterogeneity — The ability to accommodate different data requirements and sources in the enterprise.
  • Autonomy — The absence of restrictions being enforced at the remote data source, allowing it to remain autonomous and eliminating any disruption to data sources, applications, and systems.
  • High function — The ability of applications to exploit not only the high degree of function provided by the federated system but also the special functions unique to some of the data sources.
  • Extensibility and openness — The flexibility to seamlessly add a new data source to the enterprise information system.
  • Optimized performance — The power of applications developed for the federated system to achieve strong performance without the need to implement special strategies to evaluate the queries.

The core of the federated system consists of a DB2 instance that operates as a federated server. Components include a DB2 database that acts as the federated database, one or more data sources such as an Oracle or another DB2 database, and clients (users and applications) that access data through the federated database. With a federated database, you can use a single SQL statement that joins data from multiple data sources, including the federated database itself.

After you register a data source's tables in the federated database, you can reference them as easily as you would reference local tables. Applications communicate with the federated server through any programming interface supported by DB2. Because a federated system includes a DB2 database, you can also store local data, as well as combine information from local and remote tables.

The basic concepts of an IBM federated system are depicted as follows.


Figure 9. Federation server
Diagram illustrating the components of a federated system

To turn DB2 AESE into a federated database server, you must change its DB2 instance's database manager configuration to allow federation (set Federated to Yes) and configure it to communicate with the data sources.

  • The federated server communicates with the data sources by means of software modules called wrappers. These wrappers provide the logic to facilitate federated object registration and communication with the data source. You need to register only one wrapper to access all the data sources of the type that the wrapper supports. For example, one Oracle database wrapper is all that's needed for any number of Oracle data sources.
  • After you register the wrapper libraries with the federated database, each data source must be identified to the system as a server. A server usually represents a database on another system. The federated database relies on server attributes to ensure that the capabilities of each data source are properly exploited. Server attributes on the federated database store the characteristics of each data source. The DB2 optimizer uses these characteristics and restrictions when determining the best way to process a query. Using server options to set external server attributes, you can specify the data source location (machine node), connection security information (ID and password), and some server characteristics that affect performance. Each wrapper module maintains a set of server attributes pertaining to the type and version of the data sources it supports. Pushing down — an operation that allows it to take place on the remote data source — can be beneficial in reducing the amount of data brought to the federated server over the network, thus helping the performance of the query.
  • Nicknames are created in the federated database to identify data source tables and views. You can now reference the nickname in your application as if it were a local table, and they will appear to clients as DB2 tables. Nicknames can have columns, statistics, indexes, or information constraints.
  • Data sources generally require authentication. Authentication information is registered with the federated system as user mappings. This provides an additional layer of security. The client's user ID and password for accessing the federated database is mapped to a remote user ID and password.
  • A federated procedure is a local procedure mapped to the data source procedure.

Conclusion

DB2 AESE is a complete database solution in a single package for a low price. Among the wide range of capabilities and benefits it offers are high-availability and business-continuity solutions, and simplified administration that can help unify the heterogeneous data environment for customers using DB2 and Oracle databases. The active/active replication provided through its Q replication technology enables protection from site failure and continuous availability during updates and maintenance. The federation server included in DB2 AESE simplifies database integration for customers moving from Oracle to DB2 or who are managing a mixed environment. To learn more about DB2 AESE and the capabilities it offers, consult the resources below.


Resources

Learn

Get products and technologies

Discuss

About the author

David Tolleson has worked for IBM for 30 years. He is currently product manager for IBM's InfoSphere Federation Server and InfoSphere Replication Server products. He has worked extensively on data federation and was one of the developers of IBM's first federation server, called DB2 DataJoiner. He manages two blogs: The Data Replication Exchange and About Data Federation.

Report abuse help

Report abuse

Thank you. This entry has been flagged for moderator attention.


Report abuse help

Report abuse

Report abuse submission failed. Please try again later.


developerWorks: Sign in


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

Choose your display name

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


Rate this article

Comments

Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Information Management, WebSphere
ArticleID=726845
ArticleTitle=An inside look at DB2 Advanced Enterprise Server Edition, Part 2: Q replication and federation
publish-date=07142011
author1-email=tolleson@us.ibm.com
author1-email-cc=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

For articles in technology zones (such as Java technology, Linux, Open source, XML), Popular tags shows the top tags for all technology zones. For articles in product zones (such as Info Mgmt, Rational, WebSphere), Popular tags shows the top tags for just that product zone.

For articles in technology zones (such as Java technology, Linux, Open source, XML), My tags shows your tags for all technology zones. For articles in product zones (such as Info Mgmt, Rational, WebSphere), My tags shows your tags for just that product zone.

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.

Special offers