尝试在SQL Server 2008上安装sonarqube时出错

时间:2014-07-07 21:50:24

标签: sql-server sql-server-2008 sonarqube

当我尝试安装sonarqube数据库时,我遇到了一些错误,并且没有创建数据库

    ActiveRecord::JDBCError: The driver encountered an unknown error: unable to choose type for timestamp from:
    ["datetime2", "datetime"]
            initialize at C:/sonarqube/web/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/jdbc/connection.rb:66
           initialize at C:/sonarqube/web/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/jdbc/adapter.rb:31
      jdbc_connection at C:/sonarqube/web/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/jdbc/connection_methods.rb:6
                 send at org/jruby/RubyKernel.java:2227
       new_connection at C:/sonarqube/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:223
    checkout_new_connection at C:/sonarqube/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:245
    checkout at C:/sonarqube/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:188
                 loop at org/jruby/RubyKernel.java:1519
             checkout at C:/sonarqube/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:184
      mon_synchronize at jar:file:/C:/sonarqube/web/WEB-INF/lib/jruby-complete-1.7.9.jar!/META-INF/jruby.home/lib/ruby/1.8/monitor.rb:191
             checkout at C:/sonarqube/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:183
           connection at C:/sonarqube/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:98
  retrieve_connection at C:/sonarqube/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:326
  retrieve_connection at C:/sonarqube/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/connection_specification.rb:123
           connection at C:/sonarqube/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/connection_specification.rb:115
           initialize at C:/sonarqube/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:440
                   up at C:/sonarqube/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:401
              migrate at C:/sonarqube/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:383
    upgrade_and_start at C:/sonarqube/web/WEB-INF/config/../lib/database_version.rb:62
      automatic_setup at C:/sonarqube/web/WEB-INF/config/../lib/database_version.rb:74
               (root) at C:/sonarqube/web/WEB-INF/config/environment.rb:239
                 load at org/jruby/RubyKernel.java:1094
               (root) at file:/C:/sonarqube/web/WEB-INF/lib/jruby-rack-1.1.13.2.jar!/jruby/rack/rails/environment2.rb:1
     load_environment at file:/C:/sonarqube/web/WEB-INF/lib/jruby-rack-1.1.13.2.jar!/jruby/rack/rails/environment2.rb:25
     load_environment at file:/C:/sonarqube/web/WEB-INF/lib/jruby-rack-1.1.13.2.jar!/jruby/rack/rails_booter.rb:79

我正在阅读并看起来数据库驱动程序无法正常工作

有关如何使用SQL Server的任何线索?

2 个答案:

答案 0 :(得分:0)

数据库的区域设置可能存在问题。在我的例子中,它帮助将sonarqube数据库用户的语言设置为"英语"。请参阅here

答案 1 :(得分:0)

经过几次尝试,我将SQL驱动程序(sqljdbc4.jar)直接从Microsoft更改为一个,看起来我以前的驱动程序是第三方修改过的。

http://www.microsoft.com/en-us/download/confirmation.aspx?id=21599这是jdbc的原始mssql驱动程序。

http://www.sezok.de/sonar/sonar.html本指南也很有用。

更改驱动程序后,一切正常