On-Premises DB2 Linked Service

 

Important

This topic provides the JSON format that is supported by the older versions of Azure PowerShell. If you are using the July 2015 Release version of Azure PowerShell or later, see On-Premises DB2 Linked Service for the latest JSON format. You can convert the JSON from old format to new format by using the tool: JSON Upgrade Tool 

You create an On-premises DB2 linked service to link an on-premises DB2 database to an Azure data factory. This topic describes syntax for defining an on-premises DB2 linked service in a JSON file. When you use the Data Factory Editor in Azure Portal, the editor provides you a JSON template for defining a linked service that you can modify and deploy to create a linked service. To use the T:Microsoft.Azure.Commands.DataFactories.New-AzureDataFactoryLinkedService cmdlet to create a linked service, you will need to create a JSON file and use it with the cmdlet.

For the Azure Data Factory service to be able to connect to an IBM DB2 database, you must install the IBM DB2 Data Server Driver on your on-premises computer. The Azure Data Factory service works with IBM.Data.DB2 9.7.4.4 driver.

You must install a Data Management Gateway on an on-premises computer either on the same machine that hosts the database or on a separate machine to avoid competing for resources with the database. Data Management Gateway is a software that connects on-premises data sources to cloud services in a secure and managed way. See Enable your pipelines to work with on-premises data for detail about Data Management Gateway.

When creating a dataset based on this linked service, you set the location type in the dataset JSON to: On-premises DB2 Database. When creating a pipeline, you set the source type to RelationalSource properties if you are using an on-premises DB2 database as a source in a copy operation. Using a DB2 database as a sink in a copy operation is not supported yet.

JSON Schema

Here is the JSON schema for defining an On-premises DB2 linked service. See the Properties section for description of the properties in the JSON schema.

{
    "Name": "<User specified name>",
    "Properties":
    {
        "type": "OnPremisesDb2LinkedService",
        "server": "<server name>",
        "database": "<database name>",
        "schema": "<schema name>",
        "authenticationType": "<authentication type>",
        "userName": "<user name >",
        "password": "<password>",
        "gatewayName": "<gateway>"
    }
}

Properties

Property

Description

type

The type property should be set to: OnPremisesDb2LinkedService.

server

Name of the DB2 server.

database

Name of the DB2 database.

schema (optional)

Name of the schema in the database.

authenticationType

Type of authentication used to connect to the DB2 database. Possible values are: Anonymous, Basic, and Windows.

username(optional)

Specify user name if you are using Windows Authentication.

password (optional)

Specify password for the user account you specified for the username.

gatewayName

Name of the gateway that the Data Factory service should use to connect to the on-premises DB2 database.