The Microsoft SQL JDBC driver provides connections for MS SQL databases.
By default, ReadyAPI installation includes this driver. If you chose not to install it, download and add it manually:
-
Download the sqljdbc archive.
-
Extract the archive file.
-
Copy the sqljdbc_6.0\enu\jre8\sqljdbc.jar file to the <ReadyAPI>/bin/ext.
-
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.
-
Click
Preferences on the toolbar.
-
Open the JDBC Drivers settings.
-
Click
.
-
Enter a descriptive name for the 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.
-
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>;
-
For named instance –
jdbc:sqlserver://<HOST>;instanceName=instanceName;databaseName=<DB>;
-
Configuring Windows Authorization
-
To use Windows (NTLM) authorization with JTDS, open the sqljdbc_6.0\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 sqljdbc_auth.dll file, and place it in the <ReadyAPI>/bin folder of your ReadyAPI installation.
If ReadyAPI is running, you need to restart it. -
Add the
integratedSecurity=true;
parameter to your connection string. To do that:-
Open the Databases dialog.
-
Double-click the Connection string column next to the needed connection.
-
Add the parameter to the connection string.
-
Press Enter to finish editing.
The connection string will look like this:
jdbc:sqlserver://localhost:1433;databaseName=myDB;integratedSecurity=true;
-