This article provides step by step instructions on how to handle No suitable driver found error while establishing MSSQL connection with confluence instance using SQL for Confluence (Pro Edition) app.
Instructions
- Log in to Confluence as an administrator.
- Click the Cog menu > Manage apps.
- Expand the app, Bob Swift Atlassian Add-ons - SQL (Pro Edition).
- Click Configure to see the configuration page.
- Select the View and modify data source profiles tab.
- To create a data source profile, click Add profile.
Provide the following parameters along with other required details while creating a profile:
Connection String for MSSQL database:
jdbc:sqlserver://<hostname>:1433;databaseName=<database-name>
Driver class:
com.microsoft.sqlserver.jdbc.SQLServerDriverDriver Jar location:
<Confluence-Installation-Directory>/Confluence/WEB-INF/lib/<mssql-jdbc-x.x.x.jar>
To download the required jar file, navigate to this URL: https://docs.microsoft.com/en-us/sql/connect/jdbc/download-microsoft-jdbc-driver-for-sql-server?view=sql-server-ver15 and place the jar file in this location: <Confluence-Installation-Directory>/Confluence/WEB-INF/lib.
In general, Confluence provides the JDBC jar for MS-SQL. It is under <Confluence-Installation-Directory>/Confluence/WEB-INF/lib.
Note:
- The port number may vary according to your database set up.
- As per Atlassian, the open source jTDS driver for Microsoft SQL Server will not be supported for use with Confluence beyond Confluence 6.5. This means you will need to switch to using the official Microsoft JDBC Driver for SQL Server, which is bundled with Confluence 6.4 and later.
Click Test connection. Once the connection is successful, you see this message: Connection successful.
- Click Next and Save profile. MS-SQL connection is set for your confluence instance and it resolves the error: No suitable driver found. You will be able to use the SQL profile, connect to the database and run the sql queries from the SQL macros.