【问题标题】:Unable to connect SonarQube with SQL server无法将 SonarQube 与 SQL 服务器连接
【发布时间】:2019-05-01 13:15:51
【问题描述】:

我正在使用 sonarQube 并想连接到 sql server db。我运行了以下命令:

 sonar-scanner -D sonar.projectKey=MyProject -D sonar.sources=. -D sonar.jdbc.url=jdbc:sqlserver:localhost;databaseName=sonar;integratedSecurity=true

但我遇到以下错误:-

databaseName=sonar : The term 'databaseName=sonar' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify 
that the path is correct and try again.
At line:1 char:241
+ ... -D sonar.jdbc.url=jdbc:sqlserver:localhost;databaseName=sonar;integra ...
+                                                ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (databaseName=sonar:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

【问题讨论】:

    标签: sonarqube mssql-jdbc


    【解决方案1】:

    不要在 'define' (-D) 参数后放置空格:

    sonar-scanner -Dsonar.projectKey=MyProject -Dsonar.sources=. -Dsonar.jdbc.url=jdbc:sqlserver:localhost;databaseName=sonar;integratedSecurity=true
    

    【讨论】:

      猜你喜欢
      • 2016-10-10
      • 2018-03-02
      • 2021-03-07
      • 2018-05-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-09-22
      相关资源
      最近更新 更多