ttRepDuplicateEx
Description
Creates a replica of a remote database on the local system. The process is initiated from the receiving local system. From there, a connection is made to the remote source database to perform the duplicate operation.
Note:
-
This utility has features to recover from a site failure by creating a disaster recovery (DR) read-only subscriber as part of the active standby pair replication scheme. See Using a Disaster Recovery Subscriber in an Active Standby Pair in Oracle TimesTen In-Memory Database Replication Guide.
-
If the database does not use cache groups, the following items discussed below are not relevant:
cacheuid
andcachepwd
data structure elements;TT_REPDUP_NOKEEPCG
,TT_REPDUP_RECOVERINGNODE
,TT_REPDUP_INITCACHEDR
, andTT_REPDUP_DEFERCACHEUPDATE
flag values. -
There are elements in the
ttRepDuplicateExArg
structure that is a parameter of this utility,localIP
andremoteIP
, that enable you to optionally specify which local network interface to use, which remote network interface to use, or both.
Required Privilege
Requires an instance administrator on the receiving local database (where ttRepDuplicateEx
is called) and a user with ADMIN
privilege on the remote source database. Create the internal user on the remote source store as necessary.
In addition, be aware of the following requirements to execute ttRepDuplicateEx
:
-
The operating system user name of the instance administrator on the receiving local database must be the same as the operating system user name of the instance administrator on the remote source database.
-
When
ttRepDuplicateEx
is called, theuid
andpwd
data structure elements must specify the user name and password of the user withADMIN
privilege on the remote source database. This user name is used to connect to the remote source database to perform the duplicate operation.
Syntax
ttRepDuplicateEx (ttUtilHandle handle,
const char* destConnStr,
const char* srcDatabase,
const char* remoteHost,
ttRepDuplicateExArg* arg
)
typedef struct
{
unsigned int size; /*set to size of(ttRepDuplicateExArg) */
unsigned int flags;
const char* uid;
const char* pwd;
const char* pwdcrypt;
const char* cacheuid;
const char* cachepwd;
const char* localHost;
int truncListLen;
const char** truncList;
int dropListLen;
const char** dropList;
int maxkbytesPerSec;
int remoteDaemonPort;
int nThreads4initDR;
const char* localIP
const char* remoteIP
int crsManaged;
} ttRepDuplicateExArg
Parameters
Parameter | Type | Description |
---|---|---|
|
|
Specifies the TimesTen utility library environment handle allocated using |
|
|
This is a null-terminated string specifying the connection string for a local database into which the replica of the remote database is created. |
|
|
This is a null-terminated string specifying the remote source database name. This name is the last component of the database path name. |
|
|
This is a null-terminated string specifying the TCP/IP host name of the system where the remote source database is located. |
|
|
This is the address of the structure containing the desired |
Struct Elements
The ttRepDuplicateExArg
structure contains these elements:
Element | Type | Description |
---|---|---|
|
|
Size This must be set up to |
|
|
Bit-wise union of values chosen from the list in the table of flag values |
|
|
User name of a user on the remote source database with This user name is used to connect to the remote source database to perform the duplicate operation. |
|
|
Password associated with the user ID |
|
|
Encrypted password associated with the user ID |
|
|
TimesTen cache administration user ID |
|
|
TimesTen cache administration user password |
|
|
Null-terminated string specifying the TCP/IP host name of the local system This element is ignored if |
|
|
Number of elements in the |
|
|
List of non-replicated tables to truncate after duplicate |
|
|
Number of elements in |
|
|
List of non-replicated tables to drop after the duplicate operation |
|
|
Maximum kilobytes per second Setting this to a nonzero value specifies that the duplicate operation should not put more than |
|
|
Remote daemon port Setting this to 0 results in the daemon port number for the target database being set to the port number used for the daemon on the source database. This option cannot be used in duplicate operations for databases with automatic port configuration. |
|
|
Number of threads for initialization For the disaster recovery subscriber, this determines the number of threads used to initialize the Oracle database on the disaster recovery site. After the TimesTen database is copied to the disaster recovery system, the Oracle database tables are truncated and the data from the TimesTen Classic cache groups is copied to the Oracle database on the disaster recovery system. Also see the |
|
|
A null-terminated string specifying the alias or IP address (IPv4 or IPv6) of the local network interface to use for the duplicate operation. Set this to |
|
|
A null-terminated string specifying the alias or IP address (IPv4 or IPv6) of the remote network interface to use for the duplicate operation. Set this to Note: You can specify both |
|
|
For internal use This should be set to 0 (default). |
The ttRepDuplicateExArg
flags
element is constructed from these values:
Value | Description |
---|---|
|
Indicates no flags. |
|
Enables compression of the data transmitted over the network for the duplicate operation. |
|
Directs |
|
Keeps the database in memory upon completion of the duplicate operation. It changes the RAM policy for the database to |
|
Directs |
|
Do not preserve the cache group definitions; By default, cache group definitions are preserved. |
|
Specifies that |
|
Forces the deferral of changes to metadata stored on the Oracle database until the cache and replication agents are started and the agents can connect to the Oracle database. Using this option can cause a full autorefresh if some incremental cache groups are not replicated or if |
|
Initializes disaster recovery. You must also specify |
See Also
ttRepAdmin
-duplicate
in Oracle TimesTen In-Memory Database
Reference
The following built-in procedures are described in Built-In Procedures in Oracle TimesTen In-Memory Database Reference.
ttReplicationStatus
ttRepPolicySet
ttRepStop
ttRepSubscriberStateSet
ttRepSyncGet
ttRepSyncSet