SonarQube9.9 failes to start

Hey , iam trying to deploy sonarqube9.9 developer edition on the first time on windows vm .

Its a windows server 2019 with the following installations: java 17, sql server 2019 express , and jdbc driver .

this are the connection detailes inside sonar.propeties file:
sonar.jdbc.url=jdbc:sqlserver://localhost;databaseName=sonarQube;encrypt=true;trustServerCertificate=true;
sonar.jdbc.username=sonarLogin
sonar.jdbc.password=**********

iam trying the start the service but it failes, this is the error in the logs :

“org.sonar.api.utils.MessageException: Database collation must be case-sensitive and accent-sensitive. It is SQL_Latin1_General_CP1_CI_AS but should be SQL_Latin1_General_CP1_CS_AS.”

full logs of the run :

2023.03.23 08:20:16 INFO  web[][o.s.p.ProcessEntryPoint] Starting Web Server
2023.03.23 08:20:17 INFO  web[][o.s.s.p.LogServerVersion] SonarQube Server / 9.9.0.65466 / ce743843018827cb30c05735e7971523de34bb48
2023.03.23 08:20:17 INFO  web[][o.sonar.db.Database] Create JDBC data source for jdbc:sqlserver://localhost;databaseName=sonarQube;encrypt=true;trustServerCertificate=true;
2023.03.23 08:20:18 INFO  web[][c.z.h.HikariDataSource] HikariPool-1 - Starting...
2023.03.23 08:20:18 INFO  web[][c.z.h.p.HikariPool] HikariPool-1 - Added connection ConnectionID:1 ClientConnectionId: 84fdf417-10cc-4dd2-92d2-c37c76af6685
2023.03.23 08:20:18 INFO  web[][c.z.h.HikariDataSource] HikariPool-1 - Start completed.
2023.03.23 08:20:19 INFO  web[][o.s.s.p.ServerFileSystemImpl] SonarQube home: C:\Users\aterasonar\Downloads\sonarqube-developer-9.9.0.65466\sonarqube-9.9.0.65466
2023.03.23 08:20:19 INFO  web[][o.s.s.u.SystemPasscodeImpl] System authentication by passcode is disabled
2023.03.23 08:20:19 INFO  web[][o.s.c.e.CoreExtensionsLoader] Loaded core extensions: developer-edition, developer-scanner, developer-server, license, monitoring
2023.03.23 08:20:20 INFO  web[][o.s.s.p.ServerPluginManager] Deploy ABAP Code Quality and Security / 3.11.0.4030 / efe73c1da897a69d2545e79710bec0909326dcdb
2023.03.23 08:20:20 INFO  web[][o.s.s.p.ServerPluginManager] Deploy C# Code Quality and Security / 8.51.0.59060 / e14c642f118958f22fd08841dc42f9aae480366a
2023.03.23 08:20:20 INFO  web[][o.s.s.p.ServerPluginManager] Deploy CFamily Code Quality and Security / 6.41.0.60884 / 6efcc8197e558ca2a78cada46494e8afe8c821ff
2023.03.23 08:20:20 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Configuration detection fot Code Quality and Security / 1.2.0.267 / 4f37ba9ffb37a96d5883e52ad392ed32c5c6eaab
2023.03.23 08:20:20 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Dataflow Bug Detection / 1.10.0.3046 / 0
2023.03.23 08:20:20 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Dataflow Bug Detection Rules for Java / 1.10.0.3046 / 0
2023.03.23 08:20:20 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Dataflow Bug Detection Rules for Python / 1.10.0.3046 / 0
2023.03.23 08:20:20 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Flex Code Quality and Security / 2.8.0.3166 / 01f66bdddc678966c81a9064ed139156a6a89c97
2023.03.23 08:20:20 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Go Code Quality and Security / 1.11.0.3905 / e1f28bc000e04ca01881e84218d01d464a17a36f
2023.03.23 08:20:20 INFO  web[][o.s.s.p.ServerPluginManager] Deploy HTML Code Quality and Security / 3.7.1.3306 / d720acc6860c6d8b69ec4d17570a398a1e216da1
2023.03.23 08:20:20 INFO  web[][o.s.s.p.ServerPluginManager] Deploy IaC Code Quality and Security / 1.11.0.2847 / 6892bd3a7320b3c110717acfdb18c4c7451069fd
2023.03.23 08:20:20 INFO  web[][o.s.s.p.ServerPluginManager] Deploy JaCoCo / 1.3.0.1538 / 74a7798c7cea687c72ed9df40c93eb7ea2a58c49
2023.03.23 08:20:20 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Java Code Quality and Security / 7.16.0.30901 / 4b1436558dfd5fc00c8d9aae8bb0364ba122c73e
2023.03.23 08:20:20 INFO  web[][o.s.s.p.ServerPluginManager] Deploy JavaScript/TypeScript/CSS Code Quality and Security / 9.13.0.20537 / 68ff7657415044b86033814795ed95fc1f1558f1
2023.03.23 08:20:20 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Kotlin Code Quality and Security / 2.12.0.1956 / a6df1ae252bd62d63f8673c28f87ad14258a7904
2023.03.23 08:20:20 INFO  web[][o.s.s.p.ServerPluginManager] Deploy PHP Code Quality and Security / 3.27.1.9352 / 3ddc5a03e1a7e3729d41e7c1a30a37d5715958c7
2023.03.23 08:20:20 INFO  web[][o.s.s.p.ServerPluginManager] Deploy PL/SQL Code Quality and Security / 3.8.0.4948 / ab46f4c11644e5c9b17f0a5a1612d4b7362e04f3
2023.03.23 08:20:20 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Python Code Quality and Security / 3.24.0.10784 / 30aa413d983f6c37b4298eba00555c3050009b52
2023.03.23 08:20:20 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Ruby Code Quality and Security / 1.11.0.3905 / e1f28bc000e04ca01881e84218d01d464a17a36f
2023.03.23 08:20:20 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Scala Code Quality and Security / 1.11.0.3905 / e1f28bc000e04ca01881e84218d01d464a17a36f
2023.03.23 08:20:20 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Swift Code Quality and Security / 4.8.0.5759 / 3d5b95aaf19a398736a7f5eec314c3c05f7193d2
2023.03.23 08:20:20 INFO  web[][o.s.s.p.ServerPluginManager] Deploy T-SQL Code Quality and Security / 1.7.0.5449 / 110c82f888b1f40e1c2a0d3165fcffd413af36a5
2023.03.23 08:20:20 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Text Code Quality and Security / 2.0.1.611 / 53bfe3a68ae3886520d6a5c1c21dfdb564821ea1
2023.03.23 08:20:20 INFO  web[][o.s.s.p.ServerPluginManager] Deploy VB.NET Code Quality and Security / 8.51.0.59060 / e14c642f118958f22fd08841dc42f9aae480366a
2023.03.23 08:20:20 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Vulnerability Analysis / 9.9.0.19083 / 6139a53ee01a475a60f6e2944fff40f3fc00dbe1
2023.03.23 08:20:20 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Vulnerability Rules for C# / 9.9.0.19083 / 6139a53ee01a475a60f6e2944fff40f3fc00dbe1
2023.03.23 08:20:20 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Vulnerability Rules for JS / 9.9.0.19083 / 6139a53ee01a475a60f6e2944fff40f3fc00dbe1
2023.03.23 08:20:20 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Vulnerability Rules for Java / 9.9.0.19083 / 6139a53ee01a475a60f6e2944fff40f3fc00dbe1
2023.03.23 08:20:20 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Vulnerability Rules for PHP / 9.9.0.19083 / 6139a53ee01a475a60f6e2944fff40f3fc00dbe1
2023.03.23 08:20:20 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Vulnerability Rules for Python / 9.9.0.19083 / 6139a53ee01a475a60f6e2944fff40f3fc00dbe1
2023.03.23 08:20:20 INFO  web[][o.s.s.p.ServerPluginManager] Deploy XML Code Quality and Security / 2.7.0.3820 / 656bccc1910d50c8984536bd2dfd917066b858e6
2023.03.23 08:20:21 INFO  web[][o.s.s.p.d.m.c.MssqlCharsetHandler] Verify that database collation is case-sensitive and accent-sensitive
2023.03.23 08:20:21 WARN  web[][o.s.c.a.AnnotationConfigApplicationContext] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdk.internal.loader.ClassLoaders$AppClassLoader@659e0bfd-org.sonar.server.platform.db.CheckDatabaseCharsetAtStartup': Initialization of bean failed; nested exception is Database collation must be case-sensitive and accent-sensitive. It is SQL_Latin1_General_CP1_CI_AS but should be SQL_Latin1_General_CP1_CS_AS.
2023.03.23 08:20:21 ERROR web[][o.s.s.p.PlatformImpl] Web server startup failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdk.internal.loader.ClassLoaders$AppClassLoader@659e0bfd-org.sonar.server.platform.db.CheckDatabaseCharsetAtStartup': Initialization of bean failed; nested exception is Database collation must be case-sensitive and accent-sensitive. It is SQL_Latin1_General_CP1_CI_AS but should be SQL_Latin1_General_CP1_CS_AS.
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:628)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:187)
	at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:80)
	at org.sonar.server.platform.platformlevel.PlatformLevel2.start(PlatformLevel2.java:103)
	at org.sonar.server.platform.PlatformImpl.start(PlatformImpl.java:196)
	at org.sonar.server.platform.PlatformImpl.startLevel2Container(PlatformImpl.java:169)
	at org.sonar.server.platform.PlatformImpl.init(PlatformImpl.java:77)
	at org.sonar.server.platform.web.PlatformServletContextListener.contextInitialized(PlatformServletContextListener.java:43)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4764)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5222)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1383)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
	at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145)
	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916)
	at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:835)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1383)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
	at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145)
	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916)
	at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:265)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.StandardService.startInternal(StandardService.java:430)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.startup.Tomcat.start(Tomcat.java:486)
	at org.sonar.server.app.EmbeddedTomcat.start(EmbeddedTomcat.java:72)
	at org.sonar.server.app.WebServer.start(WebServer.java:55)
	at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:97)
	at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:81)
	at org.sonar.server.app.WebServer.main(WebServer.java:104)
Caused by: org.sonar.api.utils.MessageException: Database collation must be case-sensitive and accent-sensitive. It is SQL_Latin1_General_CP1_CI_AS but should be SQL_Latin1_General_CP1_CS_AS.
2023.03.23 08:20:21 INFO  web[][c.z.h.HikariDataSource] HikariPool-1 - Shutdown initiated...
2023.03.23 08:20:21 INFO  web[][c.z.h.HikariDataSource] HikariPool-1 - Shutdown completed.
2023.03.23 08:20:21 INFO  web[][o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
2023.03.23 08:20:21 INFO  web[][o.s.p.ProcessEntryPoint] Hard stopping process

I was looking for solutions but nothing is working currently, Thank you in advance

Hey i Resolved the error my self:

solution:

Right click on the database > properties > options > Collation:

Set the collation to ‘SQL_Latin1_General_CP1_CS_AS’

This should solve it :slight_smile: !

Great day.