0

我正在尝试使用 SQL Server 2008 设置 Sonar 3.6 和/或 3.6.2。用于测试准备从 MySql 到 SQL Server 的转换。运行时我没有收到任何错误:

sonar.sh console

控制台输出:

Running sonar...
wrapper  | --> Wrapper Started as Console
wrapper  | Launching a JVM...
jvm 1    | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1    |   Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.
jvm 1    |
jvm 1    | 2013-07-31 11:41:12.374:INFO:oejs.Server:jetty-7.6.11.v20130520
jvm 1    | JRuby limited openssl loaded. http://jruby.org/openssl
jvm 1    | gem install jruby-openssl for full support.
jvm 1    | 2013-07-31 11:41:43.963:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/,file:/alm/sonar-3.6.2/war/sonar-server/},file:/alm/sonar-3.6.2/war/sonar-server
jvm 1    | 2013-07-31 11:41:44.034:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:29000

我在远程服务器上运行我的数据库。不过,这应该不是问题。

我可以使用 DBVisualizer 使用相同的凭据访问服务器,所以我想它应该通过声纳。

我正在使用的驱动程序是与声纳捆绑的驱动程序。

当我尝试访问服务器时,我得到的错误是基于 Web 的。

We're sorry, but something went wrong.

Please try back in a few minutes and contact support if the problem persists.

<%= link_to "Go back to the homepage", home_path %>

当我使用 h2 嵌入式数据库时,我可以毫无问题地访问它,所以我推断这很可能是我的数据库设置的问题。

---------------------------------------------------------
# WEB SETTINGS - STANDALONE MODE ONLY
# These settings are ignored when the war file is deployed to a Java EE server.
#---------------------------------------------------------
# Listen host/port and context path (for example / or /sonar). Default values are  0.0.0.0:9000/.
sonar.web.host:                           localhost
sonar.web.port:                           9500
sonar.web.context:                        /sonar

# Log HTTP requests. Deactivated by default.
#sonar.web.jettyRequestLogs: ../../logs/jetty-yyyy_mm_dd.request.log
#sonar.web.jetty.threads.min:              5
#sonar.web.jetty.threads.max:              50

#-----------------------------------------------------------------------
# DATABASE
#
# IMPORTANT : the embedded database H2 is used by default.
# It is recommended for tests only. Please use an external database
# for production environment (MySQL, Oracle, Postgresql, SQLServer)
#
#-----------------------------------------------------------------------

#----- Credentials
# Permissions to create tables and indexes must be granted to JDBC user.
# The schema must be created first.
sonar.jdbc.username:                       sonar
sonar.jdbc.password:                       sonar

#----- Embedded database H2
# Note : it does not accept connections from remote hosts, so the
# sonar server and the maven plugin must be executed on the same host.

# Comment the following line to deactivate the default embedded database.
#sonar.jdbc.url:                            jdbc:h2:tcp://localhost:19092/sonar
#sonar.jdbc.driverClassName:                org.h2.Driver

# directory containing H2 database files. By default it's the /data directory in the sonar installation.
#sonar.embeddedDatabase.dataDir:/alm/sonar/apache-tomcat-7.0.41/data
# H2 embedded database server listening port, defaults to 9092
#sonar.embeddedDatabase.port:               19092
...
... 
#----- Microsoft SQLServer
# The Jtds open source driver is available in extensions/jdbc-driver/mssql. More details on http://jtds.sourceforge.net
sonar.jdbc.url                             
jdbc:jtds:sqlserver://(REMOTE IP ADDRESS);instance=MSSQLSERVER;databaseName=SONAR;selectMethod=cursor;

# Optional properties
sonar.jdbc.driverClassName:                net.sourceforge.jtds.jdbc.Driver

我拥有的声纳用户名拥有 SONAR 数据库的所有权限。

我可能遗漏了一些小东西,感谢您的帮助。

4

1 回答 1

1

解决了它:

问题是我需要创建一个声纳模式,并将声纳用户与声纳数据库相关联。

我还确保声纳用户拥有创建数据库所需的权限。完美启动。

于 2013-07-31T17:54:12.697 回答