Movatterモバイル変換


[0]ホーム

URL:


✨ As of November 2023, Arcion has become a part of Databricks.Learn more here
Oracle

Destination Oracle#

The following steps referthe extracted Arcion self-hosted CLI download as the$REPLICANT_HOME directory.

I. Obtain the JDBC driver for Oracle#

Replicant requires Oracle JDBC Driver as a dependency. To obtain the appropriate driver, follow these steps:

II. Set up shared directory#

Replicant uses theexternal directory feature in Oracle for efficient loading of data into target Oracle. You must specify the shared directoryin thestage section of the connection configuration file.

  1. Create a directory shared between Replicant host and Oracle host withREAD andWRITE access.
  2. You can use network file system (NFS) to create the shared directory. For more information, seeAbout NFS andConfiguring an NFS server.

The following steps use/data/shared_fs as the shared directory.

III. Set up Oracle user permissions#

Follow these steps in an Oracle client to grant thenecessary privileges to your Oracle user. The following steps provide these privileges to useralex:

  1. Grant theCREATE TABLE privilege:

    GRANTCREATETABLETO alex;

    If you can’t provide this permission, you must manually create all the tables.

  2. Grant theCREATE ANY DIRECTORY privilege:

    GRANTCREATEANY DIRECTORYTO alex;

    If you can’t provide this permission, you must manually create the following directories usingCREATE OR REPLACE:

    CREATEORREPLACE DIRECTORY csv_data_dirAS'/data/shared_fs';CREATEORREPLACE DIRECTORY csv_log_dirAS'/data/shared_fs';
  3. Grant theALTER ANY TABLE privilege:

    GRANTALTERANYTABLETO alex;
  4. Manually create user schema and a schemaio_replicate. Grant both of these schemas permission to access atablespace.

You must make sure that the user you specify in theconnection details has the preceding privileges:

If the user does not haveCREATE SCHEMA privilege, then follow these steps:

  1. Create a schema manually with nameio_blitzz.
  2. Grant all privileges for theio_blitzz schema to that user.

Replicant usesio_blitzz to maintain internal checkpoints and metadata.

IV. Set up connection configuration#

Specify our Oracle connection details to Replicant with a connection configuration file. You can find a sample connection configuration fileoracle_dst.yaml in the$REPLICANT_HOME/conf/conn directory.

You can store your connection credentials in a secrets management service and tell Replicant to retrieve the credentials. For more information, seeSecrets management.

Otherwise, put your credentials in plain text YAML file like the following sample:

type:ORACLEhost:HOSTNAMEport:PORT_NUMBERservice-name:SERVICE_NAMEusername:'USERNAME'password:'PASSWORD'stage:type:SHARED_FSroot-dir:/data/shared_fs#Enter the path of the shared directorymax-connections:30max-retries:10retry-wait-duration-ms:1000charset:AL32UTF8

Replace the following:

Feel free to change the following parameter values as you need:

Additional parameters#

max-metadata-connections[v21.05.04.6]
When you don’t specifythe--metadata flag, Replicant uses the target to store metadata. This parameter determines the connection pool size for metadata storage.
charset
TheUnicode character set to use when transferring data. The character set you specify here must match the character set in the source connection configuration.

Supported valueAL32UTF8.

V. Set up Applier configuration#

To configure replication mode according to your requirements, specify your configuration in the Applier configuration file. You can find a sample Applier configuration fileoracle.yaml in the$REPLICANT_HOME/conf/dst directory.

Configuresnapshot mode replication#

For operating insnapshot mode, specify your configuration under thesnapshot section of the conifiguration file. For example:

snapshot:enable-partition-load:truedisable-partition-wise-load-on-failure:falsebulk-load:enable:truetype:FILEserialize:truemethod:SQLLDRnative-load:enable:falsestage-type:SHARED_FSdirectory:SHARED_STAGEshared-path:myhost.sub000445.myvcn.oraclevcn.com:/results

For more information about the general Applier parameters forsnapshot mode, seeSnapshot mode.

The following parameters apply to Oracle forsnapshot mode replication:

snapshot.enable-partition-load

{true|false}.

Enables partition-wise load on target oracle.

Default:true for Oracle-to-Oracle pipeline.

snapshot.disable-partition-wise-load-on-failure

{true|false}.

If a mismatch occurs between the partitioning spec on source and target, Replicant throws error at runtime. If you set this parameter totrue, Replicant automatically falls back to multithreaded load without partition awareness in the next retry attempt.

snapshot.init-constraint-post-snapshot

{true|false}.

Creates constraints and indexes after the snapshot completes.

snapshot.init-views-as-views[v21.04.06.8]
{true|false}.

To create views as views instead of as tables.

Default:false.

snapshot.init-views-post-snapshot[v21.04.06.8]

{true|false}.

Ifsnapshot.init-views-as-views istrue, setting this parameter totrue creates views after snapshot completes. If this parameter isfalse, Replicant creates views before snapshot.

Default:true.

snapshot.bulk-load
Arcion can leverage underlying support ofFILE-based bulk loading into the target system. To configure bulk loading, configure the following parameters undersnapshot.bulk-load
snapshot.bulk-load.enable

{true|false}.

Enable or disable bulk loading.

snapshot.bulk-load.type
The type of bulk loading. OnlyFILE type is supported.
snapshot.bulk-load.serialize

{true|false}.

Specifies whether Replicant applies the generated files applied in serial or parallel fashion.

snapshot.bulk-load.method
Specifies the method of bulk loading. The following methods are supported:
NONE
Instructs Replicant to not use a bulk loader.
EXTERNAL_TABLE
This method uses an external table to load intermediate CSV files that Replicant generates into the target Oracle. For this method to work, Replicant requires ashared directory between Replicant host machine and target Oracle.
SQLLDR
UsesOracle’ssqlldr utility for client side data loading into target Oracle.SQLLDR doesn’t require shared directory between Replicant host machine and target Oracle. However, you need to set the following three environment variables before starting Replicant. You can include them in.bashrc file as well.
export ORACLE_HOME=PATH_TO_DIRECTORY_CONTAINING_SQLLDR_BINARYexport LD_LIBRARY_PATH="$ORACLE_HOME":$LD_LIBRARY_PATHexport PATH="$ORACLE_HOME:$PATH"

ReplacePATH_TO_DIRECTORY_CONTAINING_SQLLDR_BINARY with the location of thesqlldr binary file.

Caution:sqlldr doesn’t accept case-sensitive usernames. For example,sqlldr doesn’t accept the first command:

createusertest identifiedbyTest#123createuser test identifiedbyTest#123
snapshot.native-load
Defines the usage of Oracle Data Pump Import (impdp) utility to load table data instead of JDBC. This allows Replicant to efficiently handle large-scale data. For more information, seeOracle Native Import.

Native loading is only supported for Oracle-to-Oracle pipeline.

snapshot.native-load.enable

{true|false}.

Enables or disables native loading.

snapshot.native-load.stage-type
The type of staging area. The following staging areas are supported:
SHARED_FS
A shared directory.
ASM
Oracle Automatic Storage Management (ASM).
snapshot.native-load.directory
The Oracle directory object corresponding to thestage-type. For more information, seeCreate directory object in source and target Oracle.
snapshot.native-load.shared-path
Full path to the network file system (NFS) representing the shared directory between Replicant and Oracle.

Oracle Native Import#

For Oracle as both source and target system, Replicant uses Oracle’s native Data Pump Import (impdp) utility to load data into the target. To set up Replicant and target Oracle to use this feature, follow these instructions:

Step 1: Set upimpdp in Replicant host machine#

  1. Download theOracle Instant Client Tools Package ZIP and extract the files.
  2. Copy theimpdp file to the/usr/bin directory.
  3. Download theOracle Instant Client Basic package ZIP and extract the files in a directory.
  4. Copy the path to the directory where you’ve extracted the Instant Client Basic package ZIP archive.
  5. Set theORACLE_HOME andLD_LIBRARY_PATH environment variables in your~/.bashrc file:
    export ORACLE_HOME=instantClientBasicPathexport LD_LIBRARY_PATH="$ORACLE_HOME":$LD_LIBRARY_PATHexport PATH="$ORACLE_HOME:$PATH"

Step 2: Create directory object in source and target Oracle#

Replicant uses theexternal directory feature of Oracle for efficient loading of data into Target Oracle. To use this feature, create a directory shared between Replicant host and Oracle host withREAD andWRITE access. You must create this directory in both source Oracle host and target Oracle host.

  1. Launch Oracle SQL Plus from the terminal.
  2. From the SQL Plus prompt,create a directory object that points to an operating system directory. The following creates theSHARED_STAGE directory object that points to the/shared-volume operating system directory:
    create directory SHARED_STAGEas'/shared-volume';
  3. GrantREAD andWRITE privileges to the directory object:
    grantread,writeon directory SHARED_STAGEtoSYSTEM;

Step 3: Modify the Applier configuration file#

In Replicant’sApplier configuration file of target Oracle, specify thesnapshot.native-load parameter. This parameter defines the necessary parameters for Replicant to start using Oracle’simpdp utility.


[8]ページ先頭

©2009-2026 Movatter.jp