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

**URL:** <https://community.sonarsource.com/t/installing-8-9-7-52159-error-cannot-connect-to-database-please-check-connectivity-and-settings/62054>\
**Category:** SonarQube Server / Community Build\
**Tags:** sonarqube\
**Created:** [April 22, 2022, 1:31am UTC](https://community.sonarsource.com/t/installing-8-9-7-52159-error-cannot-connect-to-database-please-check-connectivity-and-settings/62054 "2022-04-22T01:31:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndyCapp77](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@AndyCapp77](https://community.sonarsource.com/u/AndyCapp77)\
**Post date:** [April 22, 2022, 1:31am UTC](https://community.sonarsource.com/t/installing-8-9-7-52159-error-cannot-connect-to-database-please-check-connectivity-and-settings/62054/1 "2022-04-22T01:31:38Z")

</div>

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](http://preprod-proxy.web.boeing.com) -Dhttp.proxyPort=31060 -Dhttp.nonProxyHosts=localhost|127.\*|[::1] -Dhttps.proxyHost=[preprod-proxy.web.boeing.com](http://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?

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [April 25, 2022, 4:08pm UTC](https://community.sonarsource.com/t/installing-8-9-7-52159-error-cannot-connect-to-database-please-check-connectivity-and-settings/62054/2 "2022-04-25T16:08:34Z")

</div>

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](https://docs.sonarqube.org/8.9/setup/install-server/):

> ### Integrated Security
> 
> To use integrated security:
> 
> 1. Download the [Microsoft SQL JDBC Driver 9.2.0 package](https://docs.microsoft.com/en-us/sql/connect/jdbc/release-notes-for-the-jdbc-driver?view=sql-server-ver15#92) 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](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/test-path?view=powershell-7.2) is useful for this), you should be able to make some progress.

---

<div class="post-metadata">

**Author:** ![AndyCapp77](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@AndyCapp77](https://community.sonarsource.com/u/AndyCapp77)\
**Post date:** [April 26, 2022, 5:25pm UTC](https://community.sonarsource.com/t/installing-8-9-7-52159-error-cannot-connect-to-database-please-check-connectivity-and-settings/62054/3 "2022-04-26T17:25:17Z")

</div>

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
