TFS 2017 build error
Hi,
I created a build as per the documentation, I added the MSBuild arguments as follows:
During the Deployment of the Shadow database, I received the following error:
Looking at the shadow DB that is created I can see that the user dbo actually maps to the TFSBuild service account, which is rightly creating the database I guess.
However, I'm guessing that the service account does not have access to the linked server TORSQL2GEN. So, I added the build service account to the linked server security, but the result is still the same error.
Your help appreciated.
thanks,
KS
I created a build as per the documentation, I added the MSBuild arguments as follows:
/p:TargetServer="$(TargetServer)" /p:ShadowServer="$(ShadowServer)" /p:TargetDatabase="$(TargetDatabase)" /p:GenerateSqlPackage=True /p:ReportStyle=Simple
During the Deployment of the Shadow database, I received the following error:
MyDBMigrations001_20170104-1148_JohnDoe.sql(0,0): Error : Msg 18456, Level 14, State 1, Server TORSQL2GEN, Line 1 Login failed for user 'NT AUTHORITYANONYMOUS LOGON'
Looking at the shadow DB that is created I can see that the user dbo actually maps to the TFSBuild service account, which is rightly creating the database I guess.
However, I'm guessing that the service account does not have access to the linked server TORSQL2GEN. So, I added the build service account to the linked server security, but the result is still the same error.
Your help appreciated.
thanks,
KS
Comments
An alternative is to use SQL Server Authentication as part of your MSBuild arguments, by passing the ShadowUsername and ShadowPassword properties. For example:
Note that the SQL auth login you use may need to be granted access on the linked server instance as well, using the same SID as on the calling instance.
Product Manager
Redgate Software
Do we have to manually remove the shadow copies after each build/deployment?
thanks,
KS
There isn't a requirement for you to remove the Shadow copies after each build; ReadyRoll will automatically drop and recreate the Shadow database as needed.
However, if you would like the Shadow copy to be removed, you could include a call to drop the database the database after the build. This can be done by adding a command to the Post-build event (which can be found on the Build Events tab in the project designer). For example:
Product Manager
Redgate Software