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:
-
Download the sqljdbc archive.
-
Extract the archive file.
-
Copy the sqljdbc_9.4\enu\mssql-jdbc-9.4.0.jre16.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>;user=<USER>;password=<PASSWORD>
-
For named instance –
jdbc:sqlserver://<HOST>;instanceName=instanceName;databaseName=<DB>;
-
Configuring Windows Authorization
-
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.
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;
-