Microsoft SQL JDBC Driver

The Microsoft SQL JDBC driver provides connections for MS SQL databases.

By default, ReadyAPI installation includes this driver. If, for some reason, you do not have it, you can install it manually:

  1. Download the sqljdbc archive.

  2. Extract the archive file.

  3. Copy the sqljdbc_9.4\enu\mssql-jdbc-9.4.0.jre16.jar file to the <ReadyAPI>/bin/ext.

  4. Restart ReadyAPI to load the driver.

Connection String Template

ReadyAPI has preconfigured connection strings for MSSQL. If you need a custom one, add it by using the ReadyAPI Preferences menu.

  1. Click preferences.png Preferences on the toolbar.

  2. Open the JDBC Drivers settings.

  3. Click add.png.

  4. Enter a descriptive name for the driver.

    ReadyAPI: Naming the JDBC driver

    Use the following name for now: MSSQL(MS)/com.microsoft.sqlserver.jdbc.SQLServerDriver.

    The new connection will appear at the end of the list.

    ReadyAPI: The new connection in the JDBC connections list
  5. Add a connection string template.

    The connection string syntax may vary depending on whether you use an unnamed or named instance:

    • For server port

      jdbc:sqlserver://<HOST>:<PORT:1433>;databaseName=<DB>;user=<USER>;password=<PASSWORD>

    • For named instance

      jdbc:sqlserver://<HOST>;instanceName=instanceName;databaseName=<DB>;

    ReadyAPI: The new connection with the connection string

Configuring Windows Authorization

  1. To use Windows (NTLM) authorization with JTDS, open the sqljdbc_9.4\enu\auth folder of the extracted driver archive. Depending on the bitness of your operating system, open to the x86 or x64 folder, copy the mssql-jdbc_auth-9.4.0.x86.dll or mssql-jdbc_auth-9.4.0.x64.dll file, and place it in the <ReadyAPI>/bin folder of your ReadyAPI installation.

    Important

    If ReadyAPI is running, you need to restart it.

  2. Add the integratedSecurity=true; parameter to your connection string. To do that:

    1. Open the Databases dialog.

    2. Double-click the Connection string column next to the needed connection.

    3. Add the parameter to the connection string.

    4. Press Enter to finish editing.

    The connection string will look like this:

    jdbc:sqlserver://localhost:1433;databaseName=myDB;integratedSecurity=true;
    

See Also

Publication date: