Installing Error Cannot connect to database. Please check connectivity and settings

Trying to install SonarQube
We took a backup copy of our database from the production SQL Server and restored it to a new server, Renamed the DB as well.
Then added the connection string to the file:

I have not added any user id or password as we are using integrated security.

I open up a command prompt (run as administrator) then run the StartSonar.bat in the folder
After a few minutes I receive the following message in the cmd prompt window:
2022.04.21 15:11:52 INFO app[o.s.a.SchedulerImpl] Process[es] is up
2022.04.21 15:11:52 DEBUG app[o.s.a.p.ManagedProcessLifecycle] EventWatcher[es] tryToMoveTo es from STARTED to STARTING => false
2022.04.21 15:11:52 DEBUG app[o.s.a.p.ManagedProcessLifecycle] EventWatcher[es] tryToMoveTo web from INIT to STARTING => true
2022.04.21 15:11:52 INFO app[o.s.a.ProcessLauncherImpl] Launch process[[key=‘web’, ipcIndex=2, logFilenamePrefix=web]] from [driveletter:\somedirectory\sonarqube-]: C:\Program Files\Java\jdk-11.0.9\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8\somedirectory\sonarqube-\temp -XX:-OmitStackTraceInFastThrow --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/ --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED -Xmx2048m -Xms2048m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.proxyPort=31060 -Dhttp.nonProxyHosts=localhost|127.*|[::1] -Dhttps.proxyPort=31060 -cp ./lib/sonar-application-;driveletter:\somedirectory\sonarqube-\lib\jdbc\mssql\mssql-jdbc-9.2.0.jre11.jar driveletter:\somedirectory\sonarqube-\temp\sq-process13397974562514351778properties
2022.04.21 15:11:53 DEBUG app[o.s.a.p.ManagedProcessLifecycle] EventWatcher[es] tryToMoveTo web from STARTING to STARTED => true

The web.log file has the following error:
Caused by: java.lang.IllegalStateException: Can not connect to database. Please check connectivity and settings (see the properties prefixed by ‘sonar.jdbc.’).
at org.sonar.db.DefaultDatabase.checkConnection(
at org.sonar.db.DefaultDatabase.start(
… 24 common frames omitted
Caused by: java.sql.SQLException: Cannot create PoolableConnectionFactory (This driver is not configured for integrated authentication. ClientConnectionId:27244990-aa97-4b73-9a9a-f5e4defea5c8)
at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(
at org.apache.commons.dbcp2.BasicDataSource.createDataSource(
at org.apache.commons.dbcp2.BasicDataSource.getConnection(
at org.sonar.db.profiling.NullConnectionInterceptor.getConnection(
at org.sonar.db.profiling.ProfiledDataSource.getConnection(
at org.sonar.db.DefaultDatabase.checkConnection(

The mssql jdbc driver we have in the lib\jdbc\mssql\ folder is mssql-jdbc-9.2.0.jre11.jar which is the correct one according to all the documents I have read.

I have tried running this from the command prompt as administrator and as my own account and receive the same error each time.

At this point I am at a loss as to how to proceed and really would appreciate some help?

Hey there.

It’s mssql-jdbc_auth-9.2.0.x64.dll (note .dll) that you’ll want to make sure exists on your PATH. This is documented:

Integrated Security

To use integrated security:

  1. Download the Microsoft SQL JDBC Driver 9.2.0 package and copy mssql-jdbc_auth-9.2.0.x64.dll to any folder in your path.

(It’s due to the nature of the license that we can’t bundle this right into SonarQube).

Once this additional .dll exists on your PATH (Test-Path is useful for this), you should be able to make some progress.

Colin, Thanks that worked appreciate it. Now I just have to figure how to update the database from 7.2 to 8.9 as it says it needs to be manually updated