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

Trying to install SonarQube 8.9.7.52159.
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 sonar.properties file:
sonar.jdbc.url=jdbc:sqlserver://dev-somesqlserver;databaseName=sonar_xxx_xxx;integratedSecurity=true

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
…\sonarqube-8.9.7.52159\bin\windows-x86-64
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-8.9.7.52159]: C:\Program Files\Java\jdk-11.0.9\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=driveletter:\somedirectory\sonarqube-8.9.7.52159\temp -XX:-OmitStackTraceInFastThrow --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED -Xmx2048m -Xms2048m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.proxyHost=preprod-proxy.web.boeing.com -Dhttp.proxyPort=31060 -Dhttp.nonProxyHosts=localhost|127.*|[::1] -Dhttps.proxyHost=preprod-proxy.web.boeing.com -Dhttps.proxyPort=31060 -cp ./lib/sonar-application-8.9.7.52159.jar;driveletter:\somedirectory\sonarqube-8.9.7.52159\lib\jdbc\mssql\mssql-jdbc-9.2.0.jre11.jar org.sonar.server.app.WebServer driveletter:\somedirectory\sonarqube-8.9.7.52159\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(DefaultDatabase.java:118)
at org.sonar.db.DefaultDatabase.start(DefaultDatabase.java:83)
… 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(BasicDataSource.java:669)
at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:544)
at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:753)
at org.sonar.db.profiling.NullConnectionInterceptor.getConnection(NullConnectionInterceptor.java:31)
at org.sonar.db.profiling.ProfiledDataSource.getConnection(ProfiledDataSource.java:317)
at org.sonar.db.DefaultDatabase.checkConnection(DefaultDatabase.java:115)

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