MSSQL database integration with SonarQbue

Hi all,

I am using SonarQube version - 8.6 community edition. When I try to add MSSQL database to sonarqube, I couldn’t start it. So, I use h2 embedded database for it. What would be the issue ? Please help me to sort out this. Thanks

Regards,
Khopi

Hi Khopi,

What do your server logs say?

 
Ann

Hi Ann,

Thank you for your reply. Here you can see the log,

Launching a JVM…
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.

2021.01.29 23:55:23 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory C:\SonarQube\sonarqube-8.6.0.39681\sonarqube-8.6.0.39681\temp
2021.01.29 23:55:23 INFO app[o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:53188]
2021.01.29 23:55:23 INFO app[o.s.a.ProcessLauncherImpl] Launch process[[key=‘es’, ipcIndex=1, logFilenamePrefix=es]] from [C:\SonarQube\sonarqube-8.6.0.39681\sonarqube-8.6.0.39681\elasticsearch]: C:\SonarQube\openjdk-11+28_windows-x64_bin\jdk-11\bin\java -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Djava.io.tmpdir=C:\SonarQube\sonarqube-8.6.0.39681\sonarqube-8.6.0.39681\temp -XX:ErrorFile=…/logs/es_hs_err_pid%p.log -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dio.netty.allocator.numDirectArenas=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Djava.locale.providers=COMPAT -Des.enforce.bootstrap.checks=true -Xmx512m -Xms512m -XX:MaxDirectMemorySize=256m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=C:\SonarQube\sonarqube-8.6.0.39681\sonarqube-8.6.0.39681\elasticsearch -Des.path.conf=C:\SonarQube\sonarqube-8.6.0.39681\sonarqube-8.6.0.39681\temp\conf\es -cp lib/* org.elasticsearch.bootstrap.Elasticsearch
2021.01.29 23:55:23 INFO app[o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
2021.01.29 23:55:44 INFO app[o.s.a.SchedulerImpl] Process[es] is up
2021.01.29 23:55:44 INFO app[o.s.a.ProcessLauncherImpl] Launch process[[key=‘web’, ipcIndex=2, logFilenamePrefix=web]] from [C:\SonarQube\sonarqube-8.6.0.39681\sonarqube-8.6.0.39681]: C:\SonarQube\openjdk-11+28_windows-x64_bin\jdk-11\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=C:\SonarQube\sonarqube-8.6.0.39681\sonarqube-8.6.0.39681\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 -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.|[::1] -cp ./lib/common/;C:\SonarQube\sonarqube-8.6.0.39681\sonarqube-8.6.0.39681\lib\jdbc\mssql\mssql-jdbc-7.4.1.jre11.jar org.sonar.server.app.WebServer C:\SonarQube\sonarqube-8.6.0.39681\sonarqube-8.6.0.39681\temp\sq-process17804724931932854414properties
2021.01.29 23:56:33 INFO app[o.s.a.SchedulerImpl] Process[web] is stopped
2021.01.29 23:56:33 INFO app[o.s.a.SchedulerImpl] Process[es] is stopped
2021.01.29 23:56:33 INFO app[o.s.a.SchedulerImpl] SonarQube is stopped
← Wrapper Stopped

Regards,
Khopi

Hi Khopi,

As my colleague Tobias indicated in your other thread these are not the logs of interest. Did you check the link I sent you in my previous reply?

 
Ann

Hi Ann,

As you and @Tobias_Trabelsi said, I checked the logs and found the solution.

I added the port number after the ip address of the database server in the sonar.properties file.

sonar.jdbc.url=jdbc:sqlserver://xxx.xxx.xxx.xxx:1433;databaseName=nameOfDB;

Thanks,
Khopi

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.