无法将SonarQube与SQL Server连接

时间:2019-05-01 13:15:51

标签: sonarqube mssql-jdbc

我正在使用sonarQube并想连接到SQL Server数据库。我运行了以下命令:

 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

1 个答案:

答案 0 :(得分:0)

请勿在'define'(-D)参数后面放置空格:

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