Skip Headers
Oracle® TimesTen In-Memory Database Replication Guide
11
g
Release 2 (11.2.2)
Part Number E21635-04
Home
Book List
Index
Master Index
Contact Us
Next
PDF
·
Mobi
·
ePub
Contents
Title and Copyright Information
Preface
Audience
Related documents
Conventions
Documentation Accessibility
What's New
New features in Release 11.2.2.4.0
New features in Release 11.2.2.2.0
New features in Release 11.2.2.1.0
New features in Release 11.2.2.0.0
1
Overview of TimesTen Replication
What is replication?
Requirements for replication compatibility
Replication agents
Copying updates between databases
Default replication
Return receipt replication
Return twosafe replication
Types of replication schemes
Active standby pair with read-only subscribers
Full database replication or selective replication
Unidirectional or bidirectional replication
Split workload configuration
Distributed workload
Direct replication or propagation
Cache groups and replication
Replicating an AWT cache group
Replicating an AWT cache group with a subscriber propagating to an Oracle database
Replicating a read-only cache group
Sequences and replication
Foreign keys and replication
Aging and replication
2
Getting Started
Configuring an active standby pair with one subscriber
Step 1: Create the DSNs for the master and the subscriber databases
Step 2: Create a table in one of the master databases
Step 3: Define the active standby pair
Step 4: Start the replication agent on a master database
Step 5: Set the state of a master database to 'ACTIVE'
Step 6. Create a user on the active database
Step 7: Duplicate the active database to the standby database
Step 8: Start the replication agent on the standby database
Step 9. Duplicate the standby database to the subscriber
Step 10: Start the replication agent on the subscriber
Step 11: Insert data into the table on the active database
Step 12: Drop the active standby pair and the table
Configuring a replication scheme with one master and one subscriber
Step 1: Create the DSNs for the master and the subscriber
Step 2: Create a table and replication scheme on the master database
Step 3: Create a table and replication scheme on the subscriber database
Step 4: Start the replication agent on each database
Step 5: Insert data into the table on the master database
Step 6: Drop the replication scheme and table
3
Defining an Active Standby Pair Replication Scheme
Restrictions on active standby pairs
Defining the DSNs for the databases
Defining an active standby pair replication scheme
Identifying the databases in the active standby pair
Table requirements and restrictions for active standby pairs
Using a return service
RETURN RECEIPT
RETURN RECEIPT BY REQUEST
RETURN TWOSAFE
RETURN TWOSAFE BY REQUEST
NO RETURN
Setting STORE attributes
Setting the return service timeout period
Disabling return service blocking manually
Establishing return service failure/recovery policies
Compressing replicated traffic
Port assignments
Setting the log failure threshold
Configuring network operations
Using automatic client failover for an active standby pair
Including or excluding database objects from replication
Materialized views in an active standby pair
Replicating sequences in an active standby pair
4
Administering an Active Standby Pair Without Cache Groups
Overview of master database states
Duplicating a database
Setting up an active standby pair with no cache groups
Recovering from a failure of the active database
Recovering when the standby database is ready
When replication is return receipt or asynchronous
When replication is return twosafe
Recovering when the standby database is not ready
Recover the active database
Recover the standby database
Failing back to the original nodes
Recovering from a failure of the standby database
Recovering from the failure of a subscriber database
Reversing the roles of the active and standby databases
Detection of dual active databases
5
Administering an Active Standby Pair with Cache Groups
Active standby pairs with cache groups
Setting up an active standby pair with a read-only cache group
Setting up an active standby pair with an AWT cache group
Recovering from a failure of the active database
Recovering when the standby database is ready
When replication is return receipt or asynchronous
When replication is return twosafe
Recovering when the standby database is not ready
Recover the active database
Recover the standby database
Failing back to the original nodes
Recovering from a failure of the standby database
Recovering from the failure of a subscriber database
Reversing the roles of the active and standby databases
Detection of dual active databases
Using a disaster recovery subscriber in an active standby pair
Requirements for using a disaster recovery subscriber with an active standby pair
Rolling out a disaster recovery subscriber
Switching over to the disaster recovery site
Creating a new active standby pair after switching to the disaster recovery site
Switching over to a single database
Returning to the original configuration at the primary site
6
Altering an Active Standby Pair
Making DDL changes in an active standby pair
Creating a new PL/SQL object in an existing active standby pair
Restrictions on making DDL changes in an active standby pair
Examples: Making DDL changes in an active standby pair
Making other changes to an active standby pair
Examples: Altering an active standby pair
7
Using Oracle Clusterware to Manage Active Standby Pairs
Overview
Active standby configurations
Required privileges
Hardware and software requirements
Restricted commands and SQL statements
The cluster.oracle.ini file
Configuring basic availability
Configuring advanced availability
Including cache groups in the active standby pair
Including the active standby pair in a cache grid
Implementing application failover
Recovering from permanent failure of both master nodes
Using the RepDDL attribute
Creating and initializing a cluster
Install Oracle Clusterware
Install TimesTen on each host
Register the TimesTen cluster information
Start the TimesTen cluster agent
Create and populate a TimesTen database on one host
Create sys.odbc.ini files on other hosts
Create a cluster.oracle.ini file
Create the virtual IP addresses (optional)
Create an active standby pair replication scheme
Start the active standby pair
Load cache groups
Including more than one active standby pair in a cluster
Configuring an Oracle database as a disaster recovery subscriber
Configuring a read-only subscriber that is not managed by Oracle Clusterware
Using Oracle Clusterware with a TimesTen cache grid
Creating and initializing a cluster of cache grid members
Failure and recovery for active standby pair grid members
Making schema changes to active standby pairs in a grid
Add a cache group
Drop a cache group
Change an existing cache group
Recovering from failures
How TimesTen performs recovery when Oracle Clusterware is configured
When an active database or its host fails
When a standby database or its host fails
When read-only subscribers or their hosts fail
When failures occur on both master nodes
Automatic recovery when not attached to a grid
Manual recovery of both nodes of an active standby pair grid member
Manual recovery for advanced availability
Manual recovery for basic availability
Manual recovery to the same master nodes when databases are corrupt
Manual recovery when RETURN TWOSAFE is configured
When more than two master hosts fail
Performing a forced switchover after failure of the active database or host
Planned maintenance
Changing the schema
Performing a rolling upgrade of Oracle Clusterware software
Upgrading TimesTen
Adding a read-only subscriber to an active standby pair
Removing a read-only subscriber from an active standby pair
Adding an active standby pair to a cluster
Adding a read-only subscriber not managed by Oracle Clusterware
Rebuilding a read-only subscriber not managed by Oracle Clusterware
Removing an active standby pair from a cluster
Adding a host to the cluster
Removing a host from the cluster
Reversing the roles of the master databases
Moving a database to a different host
Performing host or network maintenance
Performing maintenance on the entire cluster
Changing user names or passwords
Monitoring cluster status
Obtaining cluster status
Message log files
8
TimesTen Configuration Attributes for Oracle Clusterware
List of attributes
Required attributes
MasterHosts
Conditionally required attributes
AppCheckCmd
AppFailureInterval
AppName
AppRestartAttempts
AppStartCmd
AppStopCmd
AppType
AppUptimeThreshold
CacheConnect
GridPort
MasterVIP
RemoteSubscriberHosts
RepBackupDir
SubscriberHosts
SubscriberVIP
VIPInterface
VIPNetMask
Optional attributes
AppFailoverDelay
AppFailureThreshold
AppScriptTimeout
AutoRecover
DatabaseFailoverDelay
FailureThreshold
MasterStoreAttribute
RepBackupPeriod
RepDDL
RepFullBackupCycle
ReturnServiceAttribute
SubscriberStoreAttribute
TimesTenScriptTimeout
9
Defining Replication Schemes
Designing a highly available system
Considering failover and recovery scenarios
Making decisions about performance and recovery tradeoffs
Distributing workloads
Defining a replication scheme
Owner of the replication scheme and replicated objects
Database names
Table requirements and restrictions for replication schemes
Defining replication elements
Defining the DATASTORE element
Defining table elements
Replicating tables with foreign key relationships
Replicating sequences
Views and materialized views in a replicated database
Checking for replication conflicts on table elements
Setting transmit durability on data store elements
Using a return service
RETURN RECEIPT
RETURN RECEIPT BY REQUEST
RETURN TWOSAFE BY REQUEST
RETURN TWOSAFE
NO RETURN
Setting STORE attributes
Setting the return service timeout period
Managing return service timeout errors and replication state changes
When to manually disable return service blocking
Establishing return service failure/recovery policies
Compressing replicated traffic
Port assignments
Setting the log failure threshold
Replicating tables with different definitions
Configuring network operations
Replication scheme syntax examples
Single subscriber schemes
Multiple subscriber schemes with return services and a log failure threshold
Replicating tables to different subscribers
Propagation scheme
Bidirectional split workload schemes
Bidirectional distributed workload scheme
Creating replication schemes with scripts
10
Setting Up a Replicated System
Configuring the network
Network bandwidth requirements
Replication in a WAN environment
Configuring host IP addresses
Identifying database hosts and network interfaces using the ROUTE clause
Identifying database hosts on UNIX without using the ROUTE clause
Host name resolution on Windows
User-specified addresses for TimesTen daemons and subdaemons
Identifying the local host of a replicated database
Setting up the replication environment
Establishing the databases
Connection attributes for replicated databases
Configuring parallel replication
Configuring automatic parallel replication
Configuring user-defined parallel replication for other replication schemes
Managing the transaction log on a replicated database
About log buffer flushing
About transaction log growth on a master database
Setting connection attributes for logging
Applying a replication scheme to a database
Duplicating a master database to a subscriber
Configuring a large number of subscribers
Replicating databases across releases
Starting and stopping the replication agents
Setting the replication state of subscribers
11
Managing Database Failover and Recovery
Overview of database failover and recovery
General failover and recovery procedures
Subscriber failures
Master failures
Automatic catch-up of a failed master database
When master catch-up is required for an active standby pair
Failures in bidirectional distributed workload schemes
Network failures
Failures involving sequences
Recovering a failed database
Recovering a failed database from the command line
Recovering a failed database from a C program
Recovering nondurable databases
Writing a failure recovery script
12
Monitoring Replication
Show state of replication agents
Using ttStatus to obtain replication agent status
Using ttAdmin -query to confirm policy settings
Using ttDataStoreStatus to obtain replication agent status
Show master database information
Using ttRepAdmin to display information about the master database
Querying replication tables to obtain information about a master database
Show subscriber database information
Using ttRepAdmin to display subscriber status
Using ttReplicationStatus to display subscriber status
Querying replication tables to display information about subscribers
Show the configuration of replicated databases
Using the ttIsql repschemes command to display configuration information
Using ttRepAdmin to display configuration information
Querying replication tables to display configuration information
Show replicated log records
Using ttRepAdmin to display bookmark location
Using ttBookMark to display bookmark location
Using ttRepAdmin to show replication status
MAIN thread status fields
Replication peer status fields
TRANSMITTER thread status fields
RECEIVER thread status fields
Checking the status of return service transactions
Improving replication performance
13
Altering Replication
Altering a replication scheme
Adding a table or sequence to an existing replication scheme
Adding a PL/SQL object to an existing replication scheme
Adding a DATASTORE element to an existing replication scheme
Including tables or sequences when you add a DATASTORE element
Excluding a table or sequence when you add a DATASTORE element
Dropping a table or sequence from a replication scheme
Dropping a table or sequence that is replicated as part of a DATASTORE element
Dropping a table or sequence that is replicated as a TABLE or SEQUENCE element
Creating and adding a subscriber database
Dropping a subscriber database
Changing a TABLE or SEQUENCE element name
Replacing a master database
Eliminating conflict detection
Eliminating the return receipt service
Changing the port number
Changing the replication route
Changing the log failure threshold
Altering a replicated table
Truncating a replicated table
Dropping a replication scheme
14
Resolving Replication Conflicts
How replication conflicts occur
Update and insert conflicts
Delete/update conflicts
Using a timestamp to resolve conflicts
Timestamp comparisons for local updates
Configuring timestamp comparison
Including a timestamp column in replicated tables
Configuring the CHECK CONFLICTS clause
Enabling system timestamp column maintenance
Enabling user timestamp column maintenance
Reporting conflicts
Reporting conflicts to a text file
Reporting conflicts to an XML file
Reporting uniqueness conflicts
Reporting update conflicts
Reporting delete/update conflicts
Suspending and resuming the reporting of conflicts
The conflict report XML Document Type Definition
The main body of the document
The uniqueness conflict element
The update conflict element
The delete/update conflict element
Index
Scripting on this page enhances content navigation, but does not change the content in any way.