When I start Sonar (StartSonar.bat), I get the following error in the log file.
当我启动Sonar(StartSonar.bat)时,我在日志文件中收到以下错误。
Wrong column type in SONAR.dbo.rules for column description.
Found: ntext, expected: nvarchar(max)SONAR.dbo.rules中的列类型错误,用于列描述。找到:ntext,预期:nvarchar(max)
Looking at the column in SQL Server Management Studio it is nvarchar(max)
查看SQL Server Management Studio中的列,它是nvarchar(max)
I'm running:
- DB: SQL Server 2005
- OS: Windows 7 64 bit
- Sonar: 2.11
DB:SQL Server 2005
操作系统:Windows 7 64位
Tried these drivers:
尝试过这些驱动程序:
- sqljdbc-1.2.2828.100.jar
- sqljdbc4.jar (Microsoft SQL Server JDBC Driver 2.0)
- sqljdbc4.jar (Microsoft SQL Server JDBC Driver 3.0)
- sqljdbc4.jar (Microsoft SQL Server JDBC Driver 4.0)
sqljdbc4.jar(Microsoft SQL Server JDBC驱动程序2.0)
sqljdbc4.jar(Microsoft SQL Server JDBC驱动程序3.0)
sqljdbc4.jar(Microsoft SQL Server JDBC驱动程序4.0)
My MSSQL Properties:
我的MSSQL属性:
- sonar.jdbc.url: jdbc:sqlserver://localhost;databaseName=SONAR;
- sonar.jdbc.driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
- sonar.jdbc.validationQuery: select 1
- sonar.jdbc.dialect: mssql
sonar.jdbc.validationQuery:选择1
I'm using a user name and password (SQL Authentication) to connect the DB
我正在使用用户名和密码(SQL身份验证)来连接数据库
Note to self: When trying to connect to MSSQL remember to Enable TCP/IP. This is found in the SQL Sever Configuration Manager;SQL Server 2005 Network Configuration;Protocols for MSSQLSERVER;TCP/IP
自我注意:尝试连接到MSSQL时请记住启用TCP / IP。这可以在SQL Sever配置管理器; SQL Server 2005网络配置; MSSQLSERVER的协议; TCP / IP中找到
I thought it might be a driver issue, but I'm not sure
我认为这可能是一个驱动程序问题,但我不确定
Anyone else seen this?
有人看过这个吗?
1 个解决方案
#1
3
I wasn't able to solve this via the sqljdbc drivers so I took some advise from another post and fell back to the jTDS driver http://jtds.sourceforge.net/index.html
我无法通过sqljdbc驱动程序解决这个问题,所以我从另一篇文章中得到了一些建议并回到了jTDS驱动程序http://jtds.sourceforge.net/index.html
The post I used was Sonar MsSql Database Issue
我使用的帖子是Sonar MsSql Database Issue
My Setup:
- Sonar 2.11 unzipped to C:\Sonar\sonar-2.11
声纳2.11解压缩到C:\ Sonar \ sonar-2.11
The steps I made (paraphrased)
我做的步骤(转述)
- Download jTDS drivers from jTDS Drivers Unzip it somewhere, I suggest C:\jDST
- Add the DLL to the system path. (C:\jDST\jtds-1.2.5-dist\x64\SSO)
- Copy the jar file (C:\jDST\jtds-1.2.5-dist\jtds-1.2.5.jar) to the extensions folder (C:\Sonar\sonar-2.11\extensions\jdbc-driver\mssql)
-
Update the sonar.properties
更新sonar.properties
- sonar.jdbc.url: jdbc:jtds:sqlserver://localhost:1433/SONAR
- sonar.jdbc.driverClassName: net.sourceforge.jtds.jdbc.Driver
- sonar.jdbc.validationQuery: select 1
- sonar.jdbc.dialect: mssql
sonar.jdbc.validationQuery:选择1
从jTDS驱动程序下载jTDS驱动程序在某处解压缩,我建议C:\ jDST
将DLL添加到系统路径。 (C:\ jDST \ JTDS-1.2.5-DIST \ 64 \ SSO)
将jar文件(C:\ jDST \ jtds-1.2.5-dist \ jtds-1.2.5.jar)复制到extensions文件夹(C:\ Sonar \ sonar-2.11 \ extensions \ jdbc-driver \ mssql)
Note: in case you connect to the named instance, this must be specified explicitly in the connection URL: jdbc:jtds:sqlserver://localhost/SONAR;instance=SQLEXPRESS
注意:如果连接到命名实例,必须在连接URL中明确指定:jdbc:jtds:sqlserver:// localhost / SONAR; instance = SQLEXPRESS
Run the bat file StartSonar.bat (C:\Sonar\sonar-2.11\bin\windows-x86-64\StartSonar.bat)
运行bat文件StartSonar.bat(C:\ Sonar \ sonar-2.11 \ bin \ windows-x86-64 \ StartSonar.bat)
Check your logs and go to the site http:// localhost:9000
检查日志并转到站点http:// localhost:9000
#1
3
I wasn't able to solve this via the sqljdbc drivers so I took some advise from another post and fell back to the jTDS driver http://jtds.sourceforge.net/index.html
我无法通过sqljdbc驱动程序解决这个问题,所以我从另一篇文章中得到了一些建议并回到了jTDS驱动程序http://jtds.sourceforge.net/index.html
The post I used was Sonar MsSql Database Issue
我使用的帖子是Sonar MsSql Database Issue
My Setup:
- Sonar 2.11 unzipped to C:\Sonar\sonar-2.11
声纳2.11解压缩到C:\ Sonar \ sonar-2.11
The steps I made (paraphrased)
我做的步骤(转述)
- Download jTDS drivers from jTDS Drivers Unzip it somewhere, I suggest C:\jDST
- Add the DLL to the system path. (C:\jDST\jtds-1.2.5-dist\x64\SSO)
- Copy the jar file (C:\jDST\jtds-1.2.5-dist\jtds-1.2.5.jar) to the extensions folder (C:\Sonar\sonar-2.11\extensions\jdbc-driver\mssql)
-
Update the sonar.properties
更新sonar.properties
- sonar.jdbc.url: jdbc:jtds:sqlserver://localhost:1433/SONAR
- sonar.jdbc.driverClassName: net.sourceforge.jtds.jdbc.Driver
- sonar.jdbc.validationQuery: select 1
- sonar.jdbc.dialect: mssql
sonar.jdbc.validationQuery:选择1
从jTDS驱动程序下载jTDS驱动程序在某处解压缩,我建议C:\ jDST
将DLL添加到系统路径。 (C:\ jDST \ JTDS-1.2.5-DIST \ 64 \ SSO)
将jar文件(C:\ jDST \ jtds-1.2.5-dist \ jtds-1.2.5.jar)复制到extensions文件夹(C:\ Sonar \ sonar-2.11 \ extensions \ jdbc-driver \ mssql)
Note: in case you connect to the named instance, this must be specified explicitly in the connection URL: jdbc:jtds:sqlserver://localhost/SONAR;instance=SQLEXPRESS
注意:如果连接到命名实例,必须在连接URL中明确指定:jdbc:jtds:sqlserver:// localhost / SONAR; instance = SQLEXPRESS
Run the bat file StartSonar.bat (C:\Sonar\sonar-2.11\bin\windows-x86-64\StartSonar.bat)
运行bat文件StartSonar.bat(C:\ Sonar \ sonar-2.11 \ bin \ windows-x86-64 \ StartSonar.bat)
Check your logs and go to the site http:// localhost:9000
检查日志并转到站点http:// localhost:9000