DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
Securing Your Software Supply Chain with JFrog and Azure
Register Today

Trending

  • Replacing Apache Hive, Elasticsearch, and PostgreSQL With Apache Doris
  • Mastering Go-Templates in Ansible With Jinja2
  • Step Into Serverless Computing
  • How to Implement Istio in Multicloud and Multicluster

Trending

  • Replacing Apache Hive, Elasticsearch, and PostgreSQL With Apache Doris
  • Mastering Go-Templates in Ansible With Jinja2
  • Step Into Serverless Computing
  • How to Implement Istio in Multicloud and Multicluster
  1. DZone
  2. Data Engineering
  3. Databases
  4. Installing SonarQube on Windows and SQL Server

Installing SonarQube on Windows and SQL Server

Trying to install SonarQube on Windows and SQL Server? Here's a tutorial to get you started.

Ricci Gian Maria user avatar by
Ricci Gian Maria
·
Nov. 03, 15 · Tutorial
Like (5)
Save
Tweet
Share
15.82K Views

Join the DZone community and get the full member experience.

Join For Free

installing sonarqube on windows machine with sql server express as back end is quite simple, but here is some information you should know to avoid some common problem with database layer (or at least avoid problem i had).

setting up sonar qube in windows is easy, but sometimes you can encounter some problem to have it talk to sql server database.

first of all i avoid using integrated authentication in sql server, because i find easier to setup everything with a standard sql user. after all my instance of sql express is used only for the instance of sonar. so i create a user called sonar with a password, and remove the check for password expiration .

figure 1: avoid password expiration

then you should open sql server configuration manager, and you must enable the tcp procol .

figure 2: enable tcp/ip protocol in sql server configuration manager

now i found that java drivers are a little bit grumpy on connecting with my database, so i decided to explicitly disable dynamic port and specify the 1433 port directly . just double click the tcp/ip protocol shown in figure 2 to open properties for tcp/ip protocol.

figure 3: disable dynamic ports and specify 1433 as tcp port

now create a new database called sonar, and set user sonar as owner of the database. place specific attention to case of database name. i choose sonar with capital s.

figure 4: create a new database called sonar with sonar user as owner

now be sure to select the correct collation, remember that you should use a collation that is case sensitive and accent sensitive, like sql_latin1_general_cp1_cs_as .

figure 5: specify the right collation for the database. it should be cs and as

now, just to be sure that everything is ok, try to connect from management studio using the port 1433 and with user sonar . to specify port you should use a comma between server name and the port.

figure 6: try to connect to the server with user sonar and port 1433

verify that you can see sonar database. if you are able to connect and see sonar db you have everything ready. remember to download jdbc driver for mssql at this address , once downloaded be sure to right click the zip file and in properties section unblock the file. then unzip the content and copy the file jtds-1.3.1.jar into subfolder extensions\jdbc-driver\mssql of your sonar installation (the mssql folder usually does not exists and you should manually create it).

now you should edit conf/sonar.properties file and add connection string to the database.

sonar.jdbc.username=sonar
sonar.jdbc.password=xxxxxxxxxx
sonar.jdbc.url=jdbc:jtds:sqlserver://localhost/sonar;selectmethod=cursor;instance=sqlexpress

place specific attention to database name in connection string because it is case sensitive , as you can see i specified sqlserver://localhost/sonar with capital s exactly as database name. since you are using accent sensitive and case sensitive collation is super important that the name of the database is equal in casing to the name used in connection string. if you specify wrong casing, you are not able to start sonar and you will find this error in the sonar log.

the error: the database name component of the object qualifier must be the name of the current database. happens if you use wrong casing in db name in connection string

you should be able now to start sonar without any problem.

gian maria

sql Database

Published at DZone with permission of Ricci Gian Maria, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Trending

  • Replacing Apache Hive, Elasticsearch, and PostgreSQL With Apache Doris
  • Mastering Go-Templates in Ansible With Jinja2
  • Step Into Serverless Computing
  • How to Implement Istio in Multicloud and Multicluster

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com

Let's be friends: