Download sonar from http://www.sonarsource.org/downloads/ and extract it to Your program folder (<sonar>) |
Open the MSSQL-Administrator and create a database called "SONAR" |
Edit the file <sonar>/conf/sonar.properties Insert the database user and its password:
sonar.jdbc.username: <user> As Sonar comes with Derby support comment or delete everything concerning Derby:
# Comment the following lines to deactivate the default embedded database.
Uncomment and insert the data for the connection to the MSSQL-database:
#----- Microsoft SQLServer
Set the value of SQL-dialect to mssql further downwards in the file:
# Values are : mysql, mssql, derby, oracle, postgresql
Save the file <sonar>/conf/sonar.properties |
Go to the directory: <sonar>/extensions/jdbc-driver/mssql Delete the existing driver: jtds-1.2.4.jar Download and unzip the file sqljdbc_3.0.1301.101_enu.exe or sqljdbc_3.0.1301.101_enu.tar.gz from http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a737000d-68d0-4531-b65d-da0f2a735707 Copy the file sqljdbc4.jar from the unzipped data into the driver directory of Sonar (<sonar>/extensions/jdbc-driver/mssql). |
Now start Sonar for the first time by double clicking <sonar>/bin/windows-x86-32/StartSonar.bat The database will be created but you will expierence some errors. So stop Sonar again. |
Open the MSSQL-Administrator and change the settings of following rows from nvarchar to ntext: SONAR.dbo.properties.text_value (ntext) SONAR.dbo.snapshot_sources.data(ntext) |
Now start Sonar again; it should run without errors. |
You can install Sonar as a NT-Service by double clicking <sonar>/bin/windows-x86-32/InstallNTService.bat If the service will not run without errors, navigate to the NTService Administration, stop Sonar and let it run with an account that owns a temp directory. (see: http://docs.codehaus.org/display/SONAR/Frequently+Asked+Questions#FrequentlyAskedQuestions-Failedtostarton64bitWindows7) |