Skip to content

Commit 811851a

Browse files
committed
Update Oracle v2
1 parent 2c07a9a commit 811851a

File tree

2 files changed

+131
-30
lines changed

2 files changed

+131
-30
lines changed

articles/data-factory/connector-oracle.md

Lines changed: 131 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: jianleishen
66
ms.subservice: data-movement
77
ms.custom: synapse
88
ms.topic: conceptual
9-
ms.date: 07/15/2024
9+
ms.date: 02/06/2025
1010
ms.author: jianleishen
1111
---
1212

@@ -84,7 +84,93 @@ The following sections provide details about properties that are used to define
8484

8585
## Linked service properties
8686

87-
The Oracle linked service supports the following properties:
87+
The Oracle connector now supports version 2.0. Refer to this section to upgrade your Oracle connector version from version 1.0. For the property details, see the corresponding sections.
88+
89+
- [Version 2.0](#version-20)
90+
- [Version 1.0](#version-10)
91+
92+
### Version 2.0
93+
94+
The Oracle linked service supports the following properties when apply version 2.0:
95+
96+
| Property | Description | Required |
97+
|:--- |:--- |:--- |
98+
| type | The type property must be set to **Oracle**. | Yes |
99+
| version | The version that you specify. The value is `2.0`. | Yes |
100+
| server | The Oracle server name. | Yes |
101+
| authenticationType | Authentication type for connecting to the Oracle database. Only **Basic** auth is supported now. | Yes |
102+
| username | The Oracle database username. | Yes |
103+
| password | The Oracle database password. | Yes |
104+
| connectVia | The [integration runtime](concepts-integration-runtime.md) to be used to connect to the data store. Learn more from [Prerequisites](#prerequisites) section. If not specified, the default Azure Integration Runtime is used. |No |
105+
106+
More connection properties you can set in connection string per your case:
107+
108+
| Property | Description | Required | Default value |
109+
|:--- |:--- |:--- |:--- |
110+
| encryptionClient | Specifies the encryption client behavior. Supported values are `accepted`, `rejected`, `requested`, or `required`. Type: string | No | `required` |
111+
| encryptionTypesClient | Specifies the encryption algorithms that client can use. Supported values are `AES128`, `AES192`, `AES256`, `3DES112`, `3DES168`. Type: string | No | `AES256` |
112+
| cryptoChecksumClient | Specifies the desired data integrity behavior when this client connects to a server. Supported values are `accepted`, `rejected`, `requested`, or `required`. Type: string | No | `required` |
113+
| cryptoChecksumTypesClient | Specifies the crypto-checksum algorithms that client can use. Supported values are `SHA1`, `SHA256`, `SHA384`, `SHA512`. Type: string | No | `SHA512` |
114+
| initialLOBFetchSize | Specifies the amount that the source initially fetches for LOB columns. Type: int | No | 0 |
115+
| fetchSize | Specifies the number of bytes that the driver allocates to fetch the data in one database round-trip. Type: int | No | 10 MB |
116+
| statementCacheSize | Specifies the number of cursors or statements to be cached for each database connection. Type: int | No | 0 |
117+
| initializationString | Specifies a command that is issued immediately after connecting to the database to manage session settings. Type: string | No | null |
118+
| enableBulkLoad | Specifies whether to use bulk copy or batch insert when loading data into the database. Type: boolean | No | true |
119+
| supportLegacyDataTypes | Specifies whether to use the legacy version 1.0 data type mappings. Do not set this to true unless you want to keep backward compatibility with legacy 1.0 version's data type mappings. Type: boolean | No, this property is for BC use only | false |
120+
| fetchTSWTZasTimestamp | Specifies whether the driver returns column value with the TIMESTAMP WITH TIME ZONE data type as DateTime or string. This setting is ignored if supportLegacyDataTypes is not true. Type: boolean | No, this property is for BC use only | true |
121+
122+
**Example:**
123+
124+
```json
125+
{
126+
"name": "OracleLinkedService",
127+
"properties": {
128+
"type": "Oracle",
129+
"typeProperties": {
130+
"server": "<server name>",
131+
"username": "<user name>",
132+
"password": "<password>",
133+
"authenticationType": "<authentication type>"
134+
},
135+
"connectVia": {
136+
"referenceName": "<name of Integration Runtime>",
137+
"type": "IntegrationRuntimeReference"
138+
}
139+
}
140+
}
141+
```
142+
143+
**Example: store password in Azure Key Vault**
144+
145+
```json
146+
{
147+
"name": "OracleLinkedService",
148+
"properties": {
149+
"type": "Oracle",
150+
"typeProperties": {
151+
"server": "<server name>",
152+
"username": "<user name>",
153+
"authenticationType": "<authentication type>",
154+
"password": { 
155+
"type": "AzureKeyVaultSecret", 
156+
"store": { 
157+
"referenceName": "<Azure Key Vault linked service name>", 
158+
"type": "LinkedServiceReference" 
159+
}, 
160+
"secretName": "<secretName>" 
161+
}
162+
},
163+
"connectVia": {
164+
"referenceName": "<name of Integration Runtime>",
165+
"type": "IntegrationRuntimeReference"
166+
}
167+
}
168+
}
169+
```
170+
171+
### Version 1.0
172+
173+
The Oracle linked service supports the following properties when apply version 1.0:
88174

89175
| Property | Description | Required |
90176
|:--- |:--- |:--- |
@@ -237,7 +323,7 @@ To copy data from Oracle, set the source type in the copy activity to `OracleSou
237323
|:--- |:--- |:--- |
238324
| type | The type property of the copy activity source must be set to `OracleSource`. | Yes |
239325
| oracleReaderQuery | Use the custom SQL query to read data. An example is `"SELECT * FROM MyTable"`.<br>When you enable partitioned load, you need to hook any corresponding built-in partition parameters in your query. For examples, see the [Parallel copy from Oracle](#parallel-copy-from-oracle) section. | No |
240-
| convertDecimalToInteger | Oracle NUMBER type with zero or unspecified scale will be converted to corresponding integer. Allowed values are **true** and **false** (default).| No |
326+
| convertDecimalToInteger | Oracle NUMBER type with zero or unspecified scale will be converted to corresponding integer. Allowed values are **true** and **false** (default). <br>Apply when the useLegacyDataTypes is true. | No |
241327
| partitionOptions | Specifies the data partitioning options used to load data from Oracle. <br>Allowed values are: **None** (default), **PhysicalPartitionsOfTable**, and **DynamicRange**.<br>When a partition option is enabled (that is, not `None`), the degree of parallelism to concurrently load data from an Oracle database is controlled by the [`parallelCopies`](copy-activity-performance-features.md#parallel-copy) setting on the copy activity. | No |
242328
| partitionSettings | Specify the group of the settings for data partitioning. <br>Apply when the partition option isn't `None`. | No |
243329
| partitionNames | The list of physical partitions that needs to be copied. <br>Apply when the partition option is `PhysicalPartitionsOfTable`. If you use a query to retrieve the source data, hook `?AdfTabularPartitionName` in the WHERE clause. For an example, see the [Parallel copy from Oracle](#parallel-copy-from-oracle) section. | No |
@@ -374,39 +460,54 @@ You are suggested to enable parallel copy with data partitioning especially when
374460

375461
## Data type mapping for Oracle
376462

377-
When you copy data from and to Oracle, the following interim data type mappings are used within the service. To learn about how the copy activity maps the source schema and data type to the sink, see [Schema and data type mappings](copy-activity-schema-and-type-mapping.md).
378-
379-
| Oracle data type | Interim data type |
380-
|:--- |:--- |
381-
| BFILE |Byte[] |
382-
| BLOB |Byte[]<br/>(only supported on Oracle 10g and higher) |
383-
| CHAR |String |
384-
| CLOB |String |
385-
| DATE |DateTime |
386-
| FLOAT |Decimal, String (if precision > 28) |
387-
| INTEGER |Decimal, String (if precision > 28) |
388-
| LONG |String |
389-
| LONG RAW |Byte[] |
390-
| NCHAR |String |
391-
| NCLOB |String |
392-
| NUMBER (p,s) |Decimal, String (if p > 28) |
393-
| NUMBER without precision and scale |Double |
394-
| NVARCHAR2 |String |
395-
| RAW |Byte[] |
396-
| ROWID |String |
397-
| TIMESTAMP |DateTime |
398-
| TIMESTAMP WITH LOCAL TIME ZONE |String |
399-
| TIMESTAMP WITH TIME ZONE |String |
400-
| UNSIGNED INTEGER |Number |
401-
| VARCHAR2 |String |
402-
| XML |String |
463+
When you copy data from and to Oracle, the following mappings apply from Oracle's data types to the internal data types used by the service. To learn about how the copy activity maps the source schema and data type to the sink, see [Schema and data type mappings](copy-activity-schema-and-type-mapping.md).
464+
465+
| Oracle data type | Interim service data type (for version 2.0) | Interim service data type (for version 2.0) |
466+
|:--- |:--- |:--- |
467+
| BFILE |Byte[] | Byte[] |
468+
| BINARY_FLOAT | Single | Single |
469+
| BINARY_DOUBLE | Double | Double |
470+
| BLOB |Byte[] | Byte[] |
471+
| CHAR |String |String |
472+
| CLOB |String |String |
473+
| DATE |DateTime |DateTime |
474+
| FLOAT (P < 16) | Double | Double |
475+
| FLOAT (P >= 16) | IBigDecimal | Double |
476+
| INTERVAL YEAR TO MONTH |Int64 |String |
477+
| INTERVAL DAY TO SECOND |TimeSpan |String |
478+
| LONG |String |String |
479+
| LONG RAW |Byte[] |Byte[] |
480+
| NCHAR |String |String |
481+
| NCLOB |String |String |
482+
| NUMBER | IBigDecimal | Double |
483+
| NUMBER (1-4,0) |Int16 | Int16 |
484+
| NUMBER (5-9,0) |Int32 | Int32 |
485+
| NUMBER (10-18,0) |Int64 | Int64 |
486+
| NUMBER(p < 8 && ((s <= 0 && p-s <= 38) \|\| (s > 0 && s <= 44))) |Single | Decimal |
487+
| NUMBER(p >= 16 && p <= 28) |IBigDecimal | Decimal |
488+
| NUMBER (p > 28) |IBigDecimal | String |
489+
| Other NUMBER (p,s) |Double | Decimal |
490+
| NVARCHAR2 |String |String |
491+
| RAW |Byte[] |Byte[] |
492+
| TIMESTAMP |DateTime |DateTime |
493+
| TIMESTAMP WITH LOCAL TIME ZONE |DateTime |DateTime |
494+
| TIMESTAMP WITH TIME ZONE |DateTimeOffset |DateTime |
495+
| VARCHAR2 |String |String |
496+
| XMLTYPE |String |String |
403497

404498
> [!NOTE]
405-
> The data types INTERVAL YEAR TO MONTH and INTERVAL DAY TO SECOND aren't supported.
499+
> If convertDecimalToInteger is not set, the return type will be Decimal.
406500
407501
## Lookup activity properties
408502

409503
To learn details about the properties, check [Lookup activity](control-flow-lookup-activity.md).
410504

505+
## Upgrade the Oracle connector
506+
507+
Here are steps that help you upgrade the Oracle connector:
508+
509+
1. In **Edit linked service** page, select **2.0 (Preview)** under **Version** and configure the linked service by referring to [Linked service properties version 2.0](#version-20).
510+
1. The data type mapping for the Oracle linked service version 2.0 is different from that for the version 1.0. To learn the latest data type mapping, see [Data type mapping for Oracle](#data-type-mapping-for-oracle).
511+
411512
## Related content
412513
For a list of data stores supported as sources and sinks by the copy activity, see [Supported data stores](copy-activity-overview.md#supported-data-stores-and-formats).
-2.32 KB
Loading

0 commit comments

Comments
 (0)