Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
On this page
Note

If you upload customized JDBC jars to the directory, the following error might occur:

java.lang.UnsatisfiedLinkError: Native Library C:\\opt\\snaplogic\\ldlib\\sqljdbc_auth.dll already loaded in another classloader

To fix this issue, remove all JDBC jars from the SQL server account and restart the JCC node.

  • Do not specify a port number.
  • Configure the following extra properties for JDBC under URL properties: IntegratedSecurity as true & domain as the corresponding <SQL Server domain>.
  • Image Removed 

    Note
    titleConnecting to an MSSQL Instance
    • You can connect to a specific instance of MSSQL by using the instance name along with the server name in Hostname <server_name>/<instance_name>. 
      Image Removed
    • Alternatively, you can define the instance name by using the URL property name, instanceName.
      Image Removed
    Note

    If the Snap fails to connect to the database, it will retry three more times.

    You can Validate an account connection when creating a SQL Database Account but not when creating a SQL Server Dynamic Account because the account properties of a dynamic account are provided dynamically as Pipeline parameters.

    Windows-based Authentication Using the NTLM Protocol

    There are two ways to authenticate your Windows SQL Server connection using the NTLM protocol.

    Method 1: Using the MSSql Driver jar file:

  • Download one of the following the JAR files based on your Java version:
    1. Java 8: mssql-jdbc-7.4.1.jre8.jar (Tested and Certified by SnapLogic)
    2. Java 11: mssql-jdbc-7.4.1.jre11.jar
  • Download the sqljdbc_auth.dll file compatible with the jar file specified above and place it in $SL_ROOT/ldlib , for example, c:\opt\Snaplogic\ldlib.
  • In the SQL Server account Settings
  • Click + next to the JDBC JARs field and upload the JAR file.

  • Specify the JDBC Driver Class name as: com.microsoft.sqlserver.jdbc.SQLServerDriver.

  • Add the following Url properties:

    Url property name
    Url property value
    domain

    Your domain name

    Note

    Domain name must be added as a URL property and not along with the user name.

    integratedSecuritytrueauthenticationSchemeNTLM
  • Click Validate and select the plex when prompted. The message "Account validation successful" is displayed.
  • Click Apply to finish setting up NTLM-based authentication. 
  • Note

    Any version of the JAR files available in Microsoft Java and JDBC Support page later than the versions mentioned here can be used.

    Method 2: Using the JTDI file:

  • Download the distribution ZIP file, jtds-1.3.1-dist.zip.
  • Extract the contents of the ZIP file and 

    1. Upload the jtdi-1.3.1.jar driver to the SnapLogic shared/jar_file folder. 

    2. Upload the ntlmauth.dll file that matches the target architecture (for a 64-bit operating system, extract the file under x64/SSO) to the  $SL_ROOT/ldlib folder, for example, c:\opt\Snaplogic\ldlib.

  • In the SQL Server account settings: 

  • Specify the JDBC Driver Class as net.sourceforge.jtds.jdbc.Driver.

  • Add the following Url properties:

    Url property name
    Url property value
    Domain

    Your domain name

    Note

    Domain name must be added as a URL property and not along with the user name.

    useNTLMv2true
  • Click Validate and select the plex when prompted. The message "Account validation successful" is displayed.
  • Click Apply to finish setting up NTLM-based authentication. 
  • Active Directory Kerberos Authentication

    SnapLogic supports Active Directory authentication for SQL server for the following driver JAR versions based on the Java version:

    • Java 8: mssql-jdbc-7.4.1.jre8.jar (Tested and Certified by SnapLogic)
    • Java 11: mssql-jdbc-7.4.1.jre11.jar

    See Microsoft JDBC Driver for SQL Server for details.

    Ensure that you have installed the correct JAR file. Also, use the following configurations in Account Settings to configure Active Directory authentication:

    SnapLogic supports Active Directory authentication for SQL Server using the User impersonation method. The prerequisites are as follows:

    In the account settings, add the following to Url property name and Url property value:

    Url property name
    Url property value
    IntegratedSecurityTrueAuthenticationSchemeJavaKerberos
  • In the account settings, enter your Active Directory Username and Password.

  • NoteAny version of the JAR files available in Microsoft Java and JDBC Support page later than the versions mentioned here can be used

    In this article

    Table of Contents
    maxLevel2
    absoluteUrltrue

    excludeOlder Versions|Additional Resources|Related Links|Related Information

    This account is used by the Snaps in the SQL Server Snap Pack. 

    You can create an account from Designer or Manager. In Designer, when working on pipelines, every Snap that needs an account prompts you to create a new account or use an existing account. The accounts can be created in or used from:

    • Your private project folder: This folder contains the pipelines that will use the account.
    • Your Project Space’s shared folder: This folder is accessible to all the users that belong to the Project Space.
    • The global shared folder: This folder is accessible to all the users within an organization in the SnapLogic instance.

    Account Configuration

    In Manager, you can navigate to the required folder and create an account in it (see Accounts). To create an account for SQL Server:

  • Click Create, then select SQLServer > SQL Server Account or SQLServer > SQL Server Dynamic Account.
  • Supply an account label.
  • Supply the Account properties, JDBC jarsAdvanced properties, URL properties for your SQL Server database. When using SQL Server Dynamic Account, you can specify the Account properties as expressions referencing pipeline parameters. You cannot use document fields under expressions for Account Properties. 

    Note
    The JDBC driver should be available in any project directory the user can access. The JDBC driver class should default to com.microsoft.sqlserver.jdbc.SQLServerDriver.
  • (Optional) Supply additional information on this account in the Notes field of the Info tab.
  • Click Apply.
  • Warning

    Avoid changing account credentials while pipelines using them are in progress. This may lead to unexpected results, including locking the account.

    Account Types

    SQL Server Account

    SQL Server Dynamic Account

    Note

    The difference between SQL Server Account and SQL Server Dynamic Account is that in the latter you can specify the Account properties as expressions referencing pipeline parameters.

    Label

    Required. User provided label for the account instance.

    Account properties

    Required. Enter in the information to create a connection to the database.

    Hostname

    Required. The server's address to connect to.

    Default value: [None]

    Port Number

    Required. The database server's port to connect to.

    Default value: 1433

    Note

    Remove the port number for Windows-based authentication when connecting to an MS SQL instance with multiple or named instances. Else, SnapLogic tries to connect to the specified port without checking with the Server Browser service list.

    Database name

    Required. The database name to connect to.

    Default value: [None]

    Username

    Username that is allowed to connect to the database. Username will be used as the default username when retrieving connections. The username must be valid in order to set up the data source.

    Default value: [None]

    Password

    Password used to connect to the data source. Password wil be used as the default password when retrieving connections. The password must be valid in order to set up the data source.

    Default value: [None]

    JDBC Driver

    Select the JDBC driver to use. A different driver binary for a driver must have a different name, the same name can not be reused for a different driver. If this property is left blank, a default JDBC driver will be loaded.

    Default value: [None]

    JDBC Driver Class

    Required. JBDC driver class name to use.

    Default value: com.microsoft.sqlserver.jdbc.SQLServerDriver

    Advanced properties

    Auto commit

    When selected, each of the batches is committed immediately after it is executed. If the Snap fails, only the batch being executed at that moment is rolled back.

    When deselected, the Snap execution output is committed only after all the batches are executed. If the Snap fails, the entire transaction is rolled back, unless the Snap finds invalid input data before it sends the insert request to the server, and routes the error documents to the Error view.

    Default value: Selected

    Batch size

    Required. Number of statements to execute at a time.
    Note: Select queries are not batched.

    Warning
    Using a large batch size could use up the JDBC placeholder limit of 2100.

    Default value: 50

    Fetch size

    Required. Number of rows to fetch at a time when executing a query.

    Warning

     Large values could cause the server to run out of memory.

    Default value: 100

    Max pool size

    Required. Maximum number of connections a pool will maintain at a time.

    Default value: 50

    Max life time

    Required. Maximum lifetime of a connection in the pool. Ensure that the value you enter is a few seconds shorter than any database or infrastructure-imposed connection time limit. A value of 0 indicates an infinite lifetime, subject to the Idle Timeout value. An in-use connection is never retired. Connections are removed only after they are closed.

    Default value: 30

    Idle Timeout

    Required. The maximum amount of time a connection is allowed to sit idle in the pool. A value of 0 indicates that idle connections are never removed from the pool.

    Default value: 5

    Checkout timeout

    Required. Number of milliseconds to wait for a connection to be available when the pool is exhausted. Zero waits forever. An exception will be thrown after the wait time has expired.

    Default value: 10000

    URL Properties

    URL property name

    URL property name

    Default value: selectMethod

    URL property value

    URL property value

    Default value: cursor

    Windows-based Authentication

  • Make sure that Snaplex is running Windows (Linux is not supported). 
  • Place the latest version of sqljdbc_auth.dll in $SL_ROOT/ldlib  (c:\opt\Snaplogic\ldlib). You can find latest the version of the DLL on the Microsoft SQLServer Server JDBC Driver website.

    Articles in this section

    Panel
    bgColor#ebf7e1

    Child pages (Children Display)


    Overview

    You must create SQL Server accounts to connect to data sources that you want to use in your Pipelines.

    Snap-Account Compatibility

    Snaps in the SQL Server Snap Pack work with different accounts and protocols per the following table.

    SnapSQL Server AccountSQL Server Dynamic AccountProtocols Supported

    SQL Server - Bulk Load

    TCP/IP
    SQL Server - DeleteTCP/IP
    SQL Server - ExecuteTCP/IP
    SQL Server - InsertTCP/IP
    SQL Server - LookupTCP/IP
    SQL Server - MergeTCP/IP
    SQL Server - SelectTCP/IP
    SQL Server - Stored ProcedureTCP/IP

    SQL Server - Table List

    TCP/IP
    SQL Server - UpdateTCP/IP

    Configuring SQL Server Accounts

    You can configure your SQL Server accounts in SnapLogic using either the Designer or Manager.

    Using SnapLogic Designer

    Drag a SQL Server Snap to the Canvas and click the Snap to open its settings. Click the Account tab. You can now either use an existing account or create a new one.

    Selecting an existing account

    SnapLogic organizes and displays all accounts to which you have access, sorting them by account type and location. To select an existing account:

    1. Click the Image Added icon to view the accounts to which you have access and select the account that you want to use. 
    2. Click Image Added.
      Image Added

    Creating an account

    1. Click Add Account in the Account Reference dialog.
    2. Select the Location in which you want to create the account, select the account type, and click ContinueThe Add Account dialog associated with the account type appears.
      Image Added
    3. Enter the required account details. For detailed guidance on how to provide information associated with each account type, use the following links:

      Child pages (Children Display)

      Info

      Enter additional information on this account in the Notes field of the Info tab. This will help you–and other users–understand the purpose of the account, especially if there are multiple accounts of the same type.


    4. Click Validate to verify the account, if the account type supports validation.
    5. Click Apply to complete configuring the SQL Server account.

    Using SnapLogic Manager

    Use Manager to create accounts without associating them immediately with Pipelines.

    Note

    Accounts in SnapLogic are associated with projects. You can use accounts created in other projects only if you have at least Read access to them.

    1. In the left pane, browse to the project in which you want to create the account and click CreateAccount SQL Server, followed by the appropriate account type.
      Image Added
      The Create Account dialog associated with the selected account type appears. 
    2. Repeat the steps numbered 3 through 5 in the Creating an account section.
    Note

    Avoid updating account credentials while Pipelines using that account are executing. This may lead to unexpected results, including locking your account.

    Insert excerpt
    SQL Server Snap Pack
    SQL Server Snap Pack
    nopaneltrue


    See Also

    Child pages (Children Display)