Defining a Classic Replication Scheme
After you have designed a classic replication scheme, use the CREATE
REPLICATION
SQL statement to apply the scheme to your databases. You must
have the ADMIN
privilege to use the CREATE REPLICATION
statement.
Table 9-2 shows the components of a replication scheme and identifies the clauses associated with the topics in this chapter. See CREATE REPLICATION in the Oracle TimesTen In-Memory Database SQL Reference.
Table 9-2 Components of a Replication Scheme
Component | See... |
---|---|
|
Owner of the Classic Replication Scheme and Replicated Objects |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Configuring Network Operations for a Classic Replication Scheme |
Note:
Naming errors in your CREATE REPLICATION
statement are often hard to troubleshoot, so take the time to check and double-check the element, database, and host names for mistakes.
The classic replication scheme used by a database persists across system reboots. Modify a classic replication scheme by using the ALTER REPLICATION
statement. See Altering a Classic Replication Scheme.
Owner of the Classic Replication Scheme and Replicated Objects
The classic replication scheme and the replicated objects must be owned by the same
user on every database in a replication scheme. To ensure that there is a common owner
across all databases, you should explicitly specify the user and replication scheme in the
CREATE REPLICATION
statement.
For example, create a replication scheme named repscheme
owned by user repl
. The first line of the CREATE REPLICATION
statement for repscheme
is:
CREATE REPLICATION rep1.repscheme
Database Names
There are three roles of the databases in a classic replication scheme.
-
Master: Applications update the master database. The master sends the updates to the propagator or to the subscribers directly.
-
Propagator: The propagator database receives updates from the master database and sends them to subscriber databases.
-
Subscriber: Subscribers receive updates from the propagator or the master.
Before you define the classic replication scheme, you need to define the data source
names (DSNs) for the databases in the replication scheme. On UNIX or Linux platforms,
create an odbc.ini
file. On Windows, use the ODBC Administrator to name
the databases and set connection attributes. See Configuring a Classic Replication Scheme With One Master and One Subscriber for an example.
Each database "name" specified in a classic replication scheme must match the prefix of the database file name without the path specified for the DataStore
data store attribute in the DSN definition. Use the same name for both the DataStore
and Data Source Name
data store attributes in each DSN definition. If the database path is directory
/
subdirectory
/foo.ds0
, then foo
is the database name that you should use. For example, this entry in an odbc.ini
file shows a Data Source Name
(DSN) of masterds
, while the DataStore
value shows the path for masterds
:
[masterds] DataStore=/tmp/masterds DatabaseCharacterSet=AL32UTF8 ConnectionCharacterSet=AL32UTF8