我有一个命令可以将dacpac部署到完美运行的SQL 2016服务器,并在SQL Server本地运行时部署dacpac。当我尝试从TFS版本定义中运行同一命令时,出现以下错误:
2019-02-04T21:56:51.6174396Z ##[section]Starting: Run script to deploy dacpac to SAS_Dev
2019-02-04T21:56:51.6181878Z ==============================================================================
2019-02-04T21:56:51.6182484Z Task : Batch Script
2019-02-04T21:56:51.6182696Z Description : Run a windows cmd or bat script and optionally allow it to change the environment
2019-02-04T21:56:51.6182900Z Version : 1.1.3
2019-02-04T21:56:51.6183094Z Author : Microsoft Corporation
2019-02-04T21:56:51.6183298Z Help : [More Information](https://go.microsoft.com/fwlink/?LinkID=613733)
2019-02-04T21:56:51.6183520Z ==============================================================================
2019-02-04T21:56:51.6321412Z ##[command]"C:\Program Files\Microsoft SQL Server\150\DAC\bin\sqlpackage.exe" /Action:Publish /SourceFile:"E:\DeploymentFiles\SAS.dacpac" /profile:"E:\DeploymentFiles\SAS_Dev.publish.xml"
2019-02-04T21:56:52.6587988Z Publishing to database 'SAS_Dev' on server 'noc-sisintpa01'.
2019-02-04T21:56:52.8295662Z Initializing deployment (Start)
2019-02-04T21:56:53.3879026Z Initializing deployment (Failed)
2019-02-04T21:56:53.4053148Z *** Could not deploy package.
2019-02-04T21:56:53.4053655Z Unable to connect to target server 'noc-sisintpa01'. Please verify the connection information such as the server name, login credentials, and firewall rules for the target server.
2019-02-04T21:56:53.4054053Z Login failed for user 'SF\NOC-SISINTPA01$'.
2019-02-04T21:56:53.4575722Z ##[error]Process completed with exit code 1.
2019-02-04T21:56:53.4614630Z ##[section]Finishing: Run script to deploy dacpac to SAS_Dev
我一辈子都无法弄清楚为什么我的登录名与服务器名相同导致登录失败。关于什么原因的任何想法?我早先进行了这项工作并进行了部署,但是后来我一定不小心调整了一个开始引起此问题的设置。