Connecting to Microsoft SQL Server
Use the Microsoft SQL Server connection to connect to a Microsoft SQL Server database from a Linux machine.
Configuring Native Connectivity
You must choose ODBC or OLEDB as the provider type while configuring a Microsoft SQL Server connection.
The server name and database name are retrieved from the connect string if you enable the Use DSN option. The connect string is the DSN configured in the odbc.ini file. If you do not enable the Use DSN option, you must specify the server name and database name in the connection properties. If you cannot to connect to the database, verify that you correctly entered all of the connectivity information.
After you upgrade, the Microsoft SQL Server connection is set to the OLEDB provider type by default. It is recommended that you upgrade all your Microsoft SQL Server connections to use the ODBC provider type. You can upgrade all your Microsoft SQL Server connections to the ODBC provider type by using the following commands:
- •If you are using the Informatica platform, run the following command: infacmd.sh isp upgradeSQLSConnection
After you run the upgrade command, you must set the environment variable on each machine that hosts the Developer tool and on the machine that hosts Informatica services in the following format:
ODBCINST=<INFA_HOME>/ODBC7.1/odbcinst.ini
After you set the environment variable, you must restart the node that hosts the Informatica services.
For specific connectivity instructions, see the database documentation.
Rules and Guidelines for Microsoft SQL Server
Consider the following rules and guidelines when you configure ODBC connectivity to a Microsoft SQL Server database:
- •If you want to use a Microsoft SQL Server connection without using a Data Source Name (DSN less connection), you must configure the odbcinst.ini environment variable.
- •If you are using a DSN connection, you must add the entry "EnableQuotedIdentifiers=1" to the ODBC DSN. If you do not add the entry, data preview and mapping run fail.
- •When you use a DSN connection, you can configure the DataDirect specific properties. For more information about how to configure and use the Data Direct specific properties, see the DataDirect documentation.
- •You can use the Microsoft SQL Server NTLM authentication on a DSN less Microsoft SQL Server connection on the Microsoft Windows platform.
- •If the Microsoft SQL Server table contains a UUID data type and if you are reading data from an SQL table and writing data to a flat file, the data format might not be consistent between the OLE DB and ODBC connection types.
- •You cannot use SSL connection on a DSN less connection. If you want to use SSL, you must use the DSN connection. Enable the Use DSN option and configure the SSL options in the odbc.ini file.
- •If the Microsoft SQL Server uses Kerberos authentication, you must set the GSSClient property to point to the Informatica Kerberos libraries. Use the following path and filename: <Informatica installation directory>/server/bin/libgssapi_krb5.so.2.Create an entry for the GSSClient property in the DSN entries section in odbc.ini for a DSN connection or in the SQL Server wire protocol section in odbcinst.ini for a connection that does not use DSN.
Configuring SSL Authentication through ODBC
You can configure SSL authentication for Microsoft SQL Server through ODBC using the DataDirect New SQL Server Wire Protocol driver.
1. Open the odbc.ini file and add an entry for the ODBC data source and DataDirect New SQL Server Wire Protocol driver under the section [ODBC Data Sources].
2. Add the attributes in the odbc.ini file for configuring SSL.
The following table lists the attributes that you must add to the odbc.ini file when you configure SSL authentication:
Attribute | Description |
---|
EncryptionMethod | The method that the driver uses to encrypt the data sent between the driver and the database server. Set the value to 1 to encrypt data using SSL. |
ValidateServerCertificate | Determines whether the driver validates the certificate sent by the database server when SSL encryption is enabled. Set the value to 1 for the driver to validate the server certificate. |
TrustStore | The location and name of the trust store file. The trust store file contains a list of Certificate Authorities (CAs) that the driver uses for SSL server authentication. |
TrustStorePassword | The password to access the contents of the trust store file. |
HostNameInCertificate | Optional. The host name that is established by the SSL administrator for the driver to validate the host name contained in the certificate. |