Oracle Connector for CData Sync

Build 23.0.8839
  • Oracle
    • Establishing a Connection
      • Fine-Tuning Data Access
    • Advanced Features
      • SSL Configuration
      • Firewall and Proxy
    • Connection String Options
      • Authentication
        • ConnectionType
        • Server
        • Port
        • ServiceName
        • User
        • Password
        • DataSource
        • LDAPUri
        • LDAPUser
        • LDAPPassword
        • LDAPVersion
        • Wallet
      • Logging
        • LogModules
      • Schema
        • Location
        • BrowsableSchemas
        • Tables
        • Views
        • IncludeSynonyms
        • ShowMetadataDescriptions
        • UseDBAMetadataViews
      • Miscellaneous
        • AllowPreparedStatement
        • MaxLobSize
        • MaxRows
        • NativeFolder
        • Other
        • QueryPassthrough
        • ReconnectTimeout
        • ReconnectTries

Oracle Connector for CData Sync

Overview

The CData Sync App provides a straightforward way to continuously pipeline your Oracle data to any database, data lake, or data warehouse, making it easily available for Analytics, Reporting, AI, and Machine Learning.

The Oracle OCI connector can be used from the CData Sync application to pull data from Oracle OCI and move it to any of the supported destinations.

Oracle OCI Version Support

The Sync App can connect Oracle Database 11.2 or later. The Sync App requires the Oracle OCI Library, which is shipped alongside it.

Oracle Connector for CData Sync

Establishing a Connection

Adding a Connection to Oracle OCI

To add a connection to Oracle OCI:

  1. In the application console, navigate to the Connections page.
  2. At the Add Connections panel, select the icon for the connection you want to add.
  3. If the Oracle OCI icon is not available, click the Add More icon to download and install the Oracle OCI connector from the CData site.

For required properties, see the Settings tab.

For connection properties that are not typically required, see the Advanced tab.

Before You Connect

To connect to Oracle, you will first need to update the appropriate environment variable. This variable must contain a folder location that includes the Oracle OCI Library assemblies. The correct environment variable depends upon your platform:

  • Windows: The native libraries should be on your PATH.
  • Mac: The native libraries should be on your DYLIB_LIBRARY_PATH.
  • Linux: The native libraries should be on your LD_LIBRARY_PATH.

If you are using the Application Data-Source wizard to download the Oracle connector, the native libraries are downloaded along with the Oracle driver. These libraries are placed in the www/bin directory of your application folder. You must either edit the environment variable to include the Oracle OCI directory or copy the Oracle OCI directory to an existing path in this environment variable. Afterwards, restart the application to load the Oracle native libraries.

Connecting to Oracle OCI

The following connection types are available:

  • Oracle Server
  • OracleTNS
  • LDAP

Oracle Server

After you have added the appropriate libraries to your PATH, set the following to connect:

  • User: The user Id provided for authentication with the Oracle database.
  • Password: The password provided for authentication with the Oracle database.
  • Port: The port used to connect to the server hosting the Oracle database.
  • ServiceName: The service name of the Oracle database. You can obtain this value by querying global_name (select * from global_name) using the Oracle SQL*PLUS command line.
  • Server: The host name or IP address of the server hosting the Oracle database.

OracleTNS

Set the following connection properties prior to connecting:

  • User: The user Id provided for authentication with the Oracle database.
  • Password: The password provided for authentication with the Oracle database.
  • DataSource: The Oracle Net Services Name, Connect Descriptor (known also as TNS Connect String), or a connection name that identifies the database to which to connect. You should be able to find these values in your tnsnames.ora file.

For example,

DataSource='(DESCRIPTION=(ADDRESS=(protocol_address_information))(CONNECT_DATA= (SERVICE_NAME=service_name)))'

LDAP

In this scheme, you need to authenticate to the LDAP server. Set the following connection properties to connect:

  • User: The user Id provided for authentication with the Oracle database.
  • Password: The password provided for authentication with the Oracle database.
  • LDAPUri: The LDAP URI used to connect to the LDAP server.
  • LDAPUser: The User account for LDAP server.
  • LDAPPassword: The password for the LDAP user.

Your connection string should look similar to this:

LDAPUri=ldap://myldap.com:389/SERVICE_EXMPL,cn=OracleContext,dc=example,dc=com; User=ORACLEUSER; Password=OracleUserPassword;
Note that this connection type requires both your Oracle and LDAP usernames and passwords. Your system administrator may allow anonymous LDAP logins, in which case your LDAP username and password are not needed.

Oracle Connector for CData Sync

Fine-Tuning Data Access

Oracle offers 2 different methods for tracking the changes from your source database:

  • Flashback Query
  • Oracle Logminer

Flashback vs. Logminer

Oracle Flashback is a lightweight solution that provides an efficient tracking mechanism for CData Sync. Once configured on your tables, Sync can execute Flashback queries on the source table to determine what changes have been made to the table since the previous run.

Oracle Logminer tracks changes in the redo logs allowing Sync to read those logs to determine the changes to a specfic table. The main difference vs. Orcale Flahsback is Sync does not interact with the source table. Instead, Sync reads directly from logs which has lower impact on the source database.

Enable Oracle Logminer

  1. Enable the Archivelog on your database, if it has not been already. This will require restarting the database.
      --Check if ArchiveLog is enabled already
      SELECT LOG_MODE FROM V$DATABASE
    
      --If LOG_MODE does not equal ARCHIVELOG
      SHUTDOWN IMMEDIATE;
      STARTUP MOUNT;
      ALTER DATABASE ARCHIVELOG;
      ALTER DATABASE OPEN;
    
  2. Ensure the database retains backups and archivelogs for 24 hours (CData recommends 7 days)
       RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
  3. Enable supplemental logging at the Database or Table level. Only 1 is required
      --Database level
      ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS
    
      --Table level
      ALTER TABLE <schema_name>.<table_name> ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS
  4. Ensure the user has the correct permissions for viewing the Logminer.

In CData Sync, create a Job with you Oracle source and select the Use Change Data Capture option.

Enable Oracle Flashback for CData Sync

  1. Set up the Tablespace (You will need to connect as the System user):
    	CREATE TABLESPACE <tablespace_name> DATAFILE SIZE 100M AUTOEXTEND ON MAXSIZE 200M;
  2. Create the Archive
    	CREATE FLASHBACK ARCHIVE <archive_name> TABLESPACE <tablespace_name> RETENTION 7 DAY;
    RETENTION specifies the time period for which archive information is kept in your database. It is best to set a larger window to give Sync time to resolve conflicts and errors. If the last successful Job run is outside the retention period (i.e. RETENTION is set to 7 Days but the last successful sync was 8 days previous), Sync will automatically replicate the full table to ensure no changes were missed.
  3. Enable Flashback on each table:
    	ALTER TABLE <table_name> FLASHBACK ARCHIVE <archive_name>;
    Note: To use Flashback, each table must have at least 1 Primary Key.

In CData Sync, create a Job with you Oracle source and select the Use Oracle Flashback option.

Oracle Connector for CData Sync

Advanced Features

This section details a selection of advanced features of the Oracle OCI Sync App.

SSL Configuration

Use SSL Configuration to adjust how Sync App handles TLS/SSL certificate negotiations. You can choose from various certificate formats; see the SSLServerCert property under "Connection String Options" for more information.

Firewall and Proxy

Configure the Sync App for compliance with Firewall and Proxy, including Windows proxies. You can also set up tunnel connections.

Logging

See Logging for an overview of configuration settings that can be used to refine CData logging. For basic logging, you only need to set two connection properties, but there are numerous features that support more refined logging, where you can select subsets of information to be logged using the LogModules connection property.

Oracle Connector for CData Sync

SSL Configuration

Customizing the SSL Configuration

By default, the Sync App attempts to negotiate SSL/TLS by checking the server's certificate against the system's trusted certificate store.

To specify another certificate, see the SSLServerCert property for the available formats to do so.

Oracle Connector for CData Sync

Firewall and Proxy

Connecting Through a Firewall or Proxy

Set the following properties:

  • To use a proxy-based firewall, set FirewallType, FirewallServer, and FirewallPort.
  • To tunnel the connection, set FirewallType to TUNNEL.
  • To authenticate, specify FirewallUser and FirewallPassword.
  • To authenticate to a SOCKS proxy, additionally set FirewallType to SOCKS5.

Oracle Connector for CData Sync

Connection String Options

The connection string properties are the various options that can be used to establish a connection. This section provides a complete list of the options you can configure in the connection string for this provider. Click the links for further details.

For more information on establishing a connection, see Establishing a Connection.

Authentication


PropertyDescription
ConnectionTypeConnection properties to use for authentication. Accepted entries are Server, OracleTNS, LDAP.
ServerThe host name or IP of the server hosting the Oracle database.
PortThe port used to connect to the server hosting the Oracle database.
ServiceNameThe service name of the Oracle database.
UserThe Oracle OCI user account used to authenticate.
PasswordThe password used to authenticate the user.
DataSourceOracle Net Services Name, Connect Descriptor (known also as TNS Connect String), or an easy connect naming that identifies the database to which to connect.
LDAPUriLDAP uri to connect the LDAP server.
LDAPUserThe User account for LDAP server.
LDAPPasswordThe password for the LDAP user.
LDAPVersionThe LDAP version used to connect to and communicate with the server.
WalletThe location of the client's wallet that os required to setup secure TCPS connection.

Logging


PropertyDescription
LogModulesCore modules to be included in the log file.

Schema


PropertyDescription
LocationA path to the directory that contains the schema files defining tables, views, and stored procedures.
BrowsableSchemasThis property restricts the schemas reported to a subset of the available schemas. For example, BrowsableSchemas=SchemaA,SchemaB,SchemaC.
TablesThis property restricts the tables reported to a subset of the available tables. For example, Tables=TableA,TableB,TableC.
ViewsRestricts the views reported to a subset of the available tables. For example, Views=ViewA,ViewB,ViewC.
IncludeSynonymsQuery metadata for synonyms as though they are the original tables.
ShowMetadataDescriptionsControls whether table and column descriptions are returned via the platform metadata APIs and sys_tables / sys_views / sys_tablecolumns.
UseDBAMetadataViewsQuery meta data from DBA_.. system views instead of ALL_.. system views.

Miscellaneous


PropertyDescription
AllowPreparedStatementPrepare a query statement before its execution.
MaxLobSizeThe volume in numbers of bytes or UTF-8 chars which is allowed to query by non-parameterized SELECT query.
MaxRowsLimits the number of rows returned when no aggregation or GROUP BY is used in the query. This takes precedence over LIMIT clauses.
NativeFolderThe path to the directory containing the native dlls the provider works with. This property is effective on the Windows and macOS platforms only.
OtherThese hidden properties are used only in specific use cases.
QueryPassthroughThis option passes the query to the Oracle OCI server as is.
ReconnectTimeoutThe sleep time, in seconds, before retrying to reconnect to the server on a maximum idle time exceeded error.
ReconnectTriesThe number of retry to connect server when a maximum idle time exceeded error is reported by server.
Oracle Connector for CData Sync

Authentication

This section provides a complete list of the Authentication properties you can configure in the connection string for this provider.


PropertyDescription
ConnectionTypeConnection properties to use for authentication. Accepted entries are Server, OracleTNS, LDAP.
ServerThe host name or IP of the server hosting the Oracle database.
PortThe port used to connect to the server hosting the Oracle database.
ServiceNameThe service name of the Oracle database.
UserThe Oracle OCI user account used to authenticate.
PasswordThe password used to authenticate the user.
DataSourceOracle Net Services Name, Connect Descriptor (known also as TNS Connect String), or an easy connect naming that identifies the database to which to connect.
LDAPUriLDAP uri to connect the LDAP server.
LDAPUserThe User account for LDAP server.
LDAPPasswordThe password for the LDAP user.
LDAPVersionThe LDAP version used to connect to and communicate with the server.
WalletThe location of the client's wallet that os required to setup secure TCPS connection.
Oracle Connector for CData Sync

ConnectionType

Connection properties to use for authentication. Accepted entries are Server, OracleTNS, LDAP.

Remarks

Together with Password and User, this field is used to choose connection properties that are used to authenticate against the server. Server is the default option. Use the following options:

  • Server: Set this to connect with server's by its address, port number and service name.
  • OracleTNS: Set this to use TNS record to connect the server.
  • LDAP: Set this to connect LDAP server in order to resolve Oracle server connection with TNS record stored by LDAP server.

Oracle Connector for CData Sync

Server

The host name or IP of the server hosting the Oracle database.

Remarks

The host name or IP of the server hosting the Oracle database.

Oracle Connector for CData Sync

Port

The port used to connect to the server hosting the Oracle database.

Remarks

The port used to connect to the server hosting the Oracle database.

Oracle Connector for CData Sync

ServiceName

The service name of the Oracle database.

Remarks

The service name of the Oracle database, such as XE.

You can obtain this value by querying global_name from the Oracle SQL command line.

Oracle Connector for CData Sync

User

The Oracle OCI user account used to authenticate.

Remarks

Together with Password, this field is used to authenticate against the Oracle OCI server.

Oracle Connector for CData Sync

Password

The password used to authenticate the user.

Remarks

The User and Password are together used to authenticate with the server.

Oracle Connector for CData Sync

DataSource

Oracle Net Services Name, Connect Descriptor (known also as TNS Connect String), or an easy connect naming that identifies the database to which to connect.

Remarks

Oracle Net Services Name, Connect Descriptor (known also as TNS Connect String), or an easy connect naming that identifies the database to which to connect.

Oracle Connector for CData Sync

LDAPUri

LDAP uri to connect the LDAP server.

Remarks

LDAP uri to connect the LDAP server and find out the Oracle's service name stored on LDAP server in the TNS record format.

Oracle Connector for CData Sync

LDAPUser

The User account for LDAP server.

Remarks

Use it when your LDAP server requires authorization to bind. Leave it empty otherwise.

Oracle Connector for CData Sync

LDAPPassword

The password for the LDAP user.

Remarks

Use it when your LDAP server requires authorization to bind. Leave it empty otherwise.

Oracle Connector for CData Sync

LDAPVersion

The LDAP version used to connect to and communicate with the server.

Remarks

Set this property to 2 or 3. The Sync App connects to a standard LDAP client as specified in RFC 1777, 2251, and other LDAP RFCs.

Oracle Connector for CData Sync

Wallet

The location of the client's wallet that os required to setup secure TCPS connection.

Remarks

The location of the client's wallet that os required to setup secure TCPS connection.

Oracle Connector for CData Sync

Logging

This section provides a complete list of the Logging properties you can configure in the connection string for this provider.


PropertyDescription
LogModulesCore modules to be included in the log file.
Oracle Connector for CData Sync

LogModules

Core modules to be included in the log file.

Remarks

Only the modules specified (separated by ';') will be included in the log file. By default all modules are included.

See the Logging page for an overview.

Oracle Connector for CData Sync

Schema

This section provides a complete list of the Schema properties you can configure in the connection string for this provider.


PropertyDescription
LocationA path to the directory that contains the schema files defining tables, views, and stored procedures.
BrowsableSchemasThis property restricts the schemas reported to a subset of the available schemas. For example, BrowsableSchemas=SchemaA,SchemaB,SchemaC.
TablesThis property restricts the tables reported to a subset of the available tables. For example, Tables=TableA,TableB,TableC.
ViewsRestricts the views reported to a subset of the available tables. For example, Views=ViewA,ViewB,ViewC.
IncludeSynonymsQuery metadata for synonyms as though they are the original tables.
ShowMetadataDescriptionsControls whether table and column descriptions are returned via the platform metadata APIs and sys_tables / sys_views / sys_tablecolumns.
UseDBAMetadataViewsQuery meta data from DBA_.. system views instead of ALL_.. system views.
Oracle Connector for CData Sync

Location

A path to the directory that contains the schema files defining tables, views, and stored procedures.

Remarks

The path to a directory which contains the schema files for the Sync App (.rsd files for tables and views, .rsb files for stored procedures). The folder location can be a relative path from the location of the executable. The Location property is only needed if you want to customize definitions (for example, change a column name, ignore a column, and so on) or extend the data model with new tables, views, or stored procedures.

If left unspecified, the default location is "%APPDATA%\\CData\\OracleOci Data Provider\\Schema" with %APPDATA% being set to the user's configuration directory:

Platform %APPDATA%
Windows The value of the APPDATA environment variable
Linux ~/.config

Oracle Connector for CData Sync

BrowsableSchemas

This property restricts the schemas reported to a subset of the available schemas. For example, BrowsableSchemas=SchemaA,SchemaB,SchemaC.

Remarks

Listing the schemas from databases can be expensive. Providing a list of schemas in the connection string improves the performance.

Oracle Connector for CData Sync

Tables

This property restricts the tables reported to a subset of the available tables. For example, Tables=TableA,TableB,TableC.

Remarks

Listing the tables from some databases can be expensive. Providing a list of tables in the connection string improves the performance of the Sync App.

This property can also be used as an alternative to automatically listing views if you already know which ones you want to work with and there would otherwise be too many to work with.

Specify the tables you want in a comma-separated list. Each table should be a valid SQL identifier with any special characters escaped using square brackets, double-quotes or backticks. For example, Tables=TableA,[TableB/WithSlash],WithCatalog.WithSchema.`TableC With Space`.

Note that when connecting to a data source with multiple schemas or catalogs, you will need to provide the fully qualified name of the table in this property, as in the last example here, to avoid ambiguity between tables that exist in multiple catalogs or schemas.

Oracle Connector for CData Sync

Views

Restricts the views reported to a subset of the available tables. For example, Views=ViewA,ViewB,ViewC.

Remarks

Listing the views from some databases can be expensive. Providing a list of views in the connection string improves the performance of the Sync App.

This property can also be used as an alternative to automatically listing views if you already know which ones you want to work with and there would otherwise be too many to work with.

Specify the views you want in a comma-separated list. Each view should be a valid SQL identifier with any special characters escaped using square brackets, double-quotes or backticks. For example, Views=ViewA,[ViewB/WithSlash],WithCatalog.WithSchema.`ViewC With Space`.

Note that when connecting to a data source with multiple schemas or catalogs, you will need to provide the fully qualified name of the table in this property, as in the last example here, to avoid ambiguity between tables that exist in multiple catalogs or schemas.

Oracle Connector for CData Sync

IncludeSynonyms

Query metadata for synonyms as though they are the original tables.

Remarks

By default, the Sync App maps synonyms to their parent tables. It queries columns and their primary/foreign key metadata as if they were the regular tables.

If this property is set to false, then the Sync App does not list table and view synonyms.

Setting this property to false improves metadata performance. Consider doing so if you do not need to request metadata of synonyms automatically.

Oracle Connector for CData Sync

ShowMetadataDescriptions

Controls whether table and column descriptions are returned via the platform metadata APIs and sys_tables / sys_views / sys_tablecolumns.

Remarks

By default table and column descriptions are not shown, since the Oracle OCI requires an extra join in meta-query beyond what is usually required to read system views describing the object comments.

Enabling this option will show table and column descriptions. This can slow down metadata operations on large datasets.

Oracle Connector for CData Sync

UseDBAMetadataViews

Query meta data from DBA_.. system views instead of ALL_.. system views.

Remarks

By default, the Sync App queries meta data for the objects accessible to the current user. If the UseDBAMetadataViews property is set to true, then the Sync App will query meta data for all respective objects in the database.

This option will not work if current user has insufficient privileges to access DBA_.. system views.

Oracle Connector for CData Sync

Miscellaneous

This section provides a complete list of the Miscellaneous properties you can configure in the connection string for this provider.


PropertyDescription
AllowPreparedStatementPrepare a query statement before its execution.
MaxLobSizeThe volume in numbers of bytes or UTF-8 chars which is allowed to query by non-parameterized SELECT query.
MaxRowsLimits the number of rows returned when no aggregation or GROUP BY is used in the query. This takes precedence over LIMIT clauses.
NativeFolderThe path to the directory containing the native dlls the provider works with. This property is effective on the Windows and macOS platforms only.
OtherThese hidden properties are used only in specific use cases.
QueryPassthroughThis option passes the query to the Oracle OCI server as is.
ReconnectTimeoutThe sleep time, in seconds, before retrying to reconnect to the server on a maximum idle time exceeded error.
ReconnectTriesThe number of retry to connect server when a maximum idle time exceeded error is reported by server.
Oracle Connector for CData Sync

AllowPreparedStatement

Prepare a query statement before its execution.

Remarks

If the AllowPreparedStatement property is set to false, statements are parsed each time they are executed. Setting this property to false can be useful if you are executing many different queries only once.

If you are executing the same query repeatedly, you will generally see better performance by leaving this property at the default, true. Preparing the query avoids recompiling the same query over and over. However, prepared statements also require the Sync App to keep the connection active and open while the statement is prepared.

Oracle Connector for CData Sync

MaxLobSize

The volume in numbers of bytes or UTF-8 chars which is allowed to query by non-parameterized SELECT query.

Remarks

If the MaxLobSize property is set to 0 or negative value, the default of 2000 bytes will be used instead.

Oracle Connector for CData Sync

MaxRows

Limits the number of rows returned when no aggregation or GROUP BY is used in the query. This takes precedence over LIMIT clauses.

Remarks

Limits the number of rows returned when no aggregation or GROUP BY is used in the query. This takes precedence over LIMIT clauses.

Oracle Connector for CData Sync

NativeFolder

The path to the directory containing the native dlls the provider works with. This property is effective on the Windows and macOS platforms only.

Remarks

The path to the directory containing the native dlls the Sync App works with. By default Sync App relies on the standard system policy for loading the dynamic libaries. Apply full path or the path relative to your executable.

Oracle Connector for CData Sync

Other

These hidden properties are used only in specific use cases.

Remarks

The properties listed below are available for specific use cases. Normal driver use cases and functionality should not require these properties.

Specify multiple properties in a semicolon-separated list.

Integration and Formatting

DefaultColumnSizeSets the default length of string fields when the data source does not provide column length in the metadata. The default value is 2000.
ConvertDateTimeToGMTDetermines whether to convert date-time values to GMT, instead of the local time of the machine.
RecordToFile=filenameRecords the underlying socket data transfer to the specified file.

Oracle Connector for CData Sync

QueryPassthrough

This option passes the query to the Oracle OCI server as is.

Remarks

When this is set, queries are passed through directly to Oracle OCI.

Oracle Connector for CData Sync

ReconnectTimeout

The sleep time, in seconds, before retrying to reconnect to the server on a maximum idle time exceeded error.

Remarks

The ReconnectTries property must be greater than 0 for this value to have any effect.

Oracle Connector for CData Sync

ReconnectTries

The number of retry to connect server when a maximum idle time exceeded error is reported by server.

Remarks

Setting this value will allow the Sync App to autmotically reconnect if an 'ORA-02396: exceeded maximum idle time' error is received from the server. The default value the ReconnectTries property is set to 0 meaning the request will not be retried.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839