I have been testing out the SQL Automation Pack v1.1 and found out that it throws the following error when run through the TeamCity plugin:
- Code: Select all
[17:20:03][Validating database state] Error: Synchronization of 'Scripts.state' and
[17:20:03][Validating database state] '<CI-SERVER>.sqlCI_4b8d7896-ceb4-4a59-abb6-a7683b2e9e28'
[17:20:03][Validating database state] failed: Synonym 'Geo!Geo.tbGeoData' refers to an invalid object.
The synonym is referring to an object in another database on the same instance. The CI server doesn't have that DB and the validation fails.
The teamcity account is sysadmin on the SQL Server box which is a 2012 Developer Edition (x64).
Reverting back to the pre-1.1 build runner the validation passes.
I am keen to use the v1.1 because it allows us to validate the CLR assemblies in our packages.
This looks like a bug to me. Can you confirm?
Also a related question that I have bumped into recently that also on the CI server if we try to validate a package that contains a linked server reference in one of the SPs, the validation fails as it tries to resolve the full linked server reference. The reference iirc is a select statement (and not an SP call, might be worth trying it that way)
The build runner in this case is a pre-1.1 runner and is more likely to be a SQL Server problem than a RedGate one.