So that SharePlex can determine the correct objects to capture from, and post to, you must qualify the object names in the configuration file in the same way that the database stores them logically. The general way this is indicated in SharePlex syntax is:
owner.object
Where:
- owner is the schema or database that contains the object (or objects, if wildcarded), depending on how that container is defined by the database.
- object is the name of the object or a wildcard specification to specify multiple objects.
When defining source or target objects in the configuration file, follow these guidelines for specifying the owner component:
Aurora |
database_name.object_name |
MySQL |
database_name.object_name |
Oracle |
schema_name.object_name |
PostgreSQL |
schema_name.object_name |
SQL Server |
schema_name.object_name |
This topic shows you how to specify case-sensitive names in the configuration file, for example when specifying table names or if you need to specify column names explicitly in a column mapping.
Case-sensitive object names
If the owner or name of an object is case-sensitive in the database, you must enclose that name within quotes in the SharePlex configuration file.
Important: This applies whether the database itself requires a case-sensitive name to be within quotes, such as Oracle, or whether the database accepts names that are spelled out in their case-sensitive form without quotes, like SQL Server.
To enforce case-sensitive object names:
Specify the name in its correct case and enclose it within double quotes.
Correct way
-
This is how to specify an object where both the owner and object names are both case-sensitive:
"Owner"."Object"
-
This is how to specify an object where only one of the components is case-sensitive:
owner."Object" or "Owner".object
The name that is not case-sensitive can be specified in any case.
Examples of both ways:
Datasource o.oraA |
|
|
sales."Emp" |
"Sales"."Emp" |
sysB@o.oraB |
Incorrect way
This is not correct, because both components are within one set of quotes:
"Sales.Employees"
Case-sensitive column names
Ordinarily, column names are not specified in the configuration file, unless source column names need to be mapped to different target column names by means of a column mapping (see Map Source and Target Columns). However, if the names of any pair of source and target columns have difference cases, you may need to include them in a column mapping to enforce their case sensitivity. Whether or not a column mapping is required depends on the target type: Oracle or Open Target.
To enforce case-sensitive column names for Oracle to Oracle replication
The Oracle Post process does not perform case conversion of column names automatically for Oracle to Oracle replication. If the case is different between source and target columns, you must use a column map to map the case of the source names to the case of the target names. To get Post to enforce the case, specify the name in its correct case and enclose it within double quotes.
This is an example of case-sensitive column name mapping in a column map:
Datasource o.oraA |
|
|
sales.emp(ID,"first","last") |
sales.emp(ID,"First","Last") |
sysB@o.oraB |
To enforce case-sensitive column names to Open Target:
The Open Target Post process performs case conversion of column names automatically. If replicating to target columns that have a different case from their source columns, no column mapping is needed.
A database specification is required in the following components of the configuration file:
- the datasource (source datastore) specification
- routing map (target datastore and location) specification
Oracle source |
o. |
Depending on the Oracle database configuration, use one of the following. This is the string that SharePlex will use to connect to the database.
- The Oracle SID of a regular (non-CDB) Oracle database, as in o.ora12.
- The TNS alias of a pluggable database (PDB) in an Oracle container database (CDB), as in o.pdb1.
- The global TNS alias of an Oracle RAC cluster, as in o.rac1. SharePlex connects to an Oracle RAC instance through this TNS alias, which is mapped locally on each node to the Oracle SID of the local Oracle instance. For more information about creating this alias, see Installation and Setup for HA Cluster in the SharePlex Installation Guide.
|
Open Targe targets |
r. |
Use to specify the name of an Open Target (non-Oracle) target database, as in r.mydb.
IMPORTANT! Use the actual database name. Do not use the ODBC datasource name (DNS) or database instance name. If the database name is case-sensitive, specify it that way. |
Oracle change-history target |
c. |
Use in a routing map to specify the Oracle SID, TNS alias, or global RAC TNS alias of an Oracle change history database, as in c.ORA12CH. In this configuration, SharePlex applies all source transactions as INSERTs to the target tables, to maintain a history of every operation performed.
For more information, see Configure Replication to a Change History Target. |
* Note: The dot is required.
The following table shows how to specify a target table or non-table target in a configuration file.
Database table |
tgt_owner.table |
The fully qualified name of a database table. For more information, see How to Qualify Object Names. |
Database sequence |
tgt_owner.sequence |
The fully qualified name of a sequence. For more information, see How to Qualify Object Names |
File |
!file[:tgt_owner.table] |
The !file designator directs Post to write change operations to a file in SQL, XML, or JSON format. The file name is applied internally by SharePlex.
Optionally, you can specify the fully qualified name of a target table if the data will be consumed by a process that ultimately applies it to a database table. |
JMS |
!jms[:tgt_owner.table] |
The !jms designator directs Post to write change operations to a JMS queue or topic in XML format. The queue or topic name can be defined by using the target command.
Optionally, you can specify the fully qualified name of a target table if the data will be consumed by a process that ultimately applies it to a database table. |
Kafka |
!kafka[:tgt_owner.table] |
The !Kafka designator directs Post to write change operations to a Kafka topic in XML, AVRO, or JSON format. The topic name can be defined by using the target command.
Optionally, you can specify the fully qualified name of a target table if the data will be consumed by a process that ultimately applies it to a database table. |
Change history table |
!cdc:tgt_owner.table |
The !cdc designator directs Post to insert every data change to the table as a new row, rather than overlay the old data with new data. Specify the fully qualified name of the change history table.
For more information, see Configure Replication to a Change History Target. |