Problem running a build step in TeamCity

Hello,

we are configuring a Build Task in TeamCity to integrate with Sql Source Control.

We are using Sql Source Control 3.6.6.178 Standard Edition

When the Build task is executed w get the following error
Step 1/1: Build (Red Gate SQL CI Build) (2s)
[17:35:53][Step 1/1] Starting: C:\TeamCity\buildAgent\plugins\sqlci-teamcity-agent\assets\sqlCI.exe build /temporaryDatabaseServer=srvName,1234 /scriptsFolder=. /packageId=ForTest /packageVersion=2
[17:35:53][Step 1/1] in directory: C:\TeamCity\buildAgent\work\268c606942066354
[17:35:53][Step 1/1] sqlCI.exe -- Red Gate's SQL Continuous Integration v2.0.0.162
[17:35:53][Step 1/1]
[17:35:53][Step 1/1] Creating scratch database sqlCI_40a858c8-c61f-4080-a432-4a100ef784a9 (1s)
[17:35:53][Creating scratch database sqlCI_40a858c8-c61f-4080-a432-4a100ef784a9] STARTING: Creating scratch database sqlCI_40a858c8-c61f-4080-a432-4a100ef784a9
[17:35:54][Creating scratch database sqlCI_40a858c8-c61f-4080-a432-4a100ef784a9] FINISHED WITH ERROR: Creating scratch database sqlCI_40a858c8-c61f-4080-a432-4a100ef784a9
[17:35:54][Step 1/1] sqlCI error occurred: RedGate.Deploy.SqlServerDbPackage.Shared.Exceptions.InvalidSqlException: Cannot find the principal 'sa', because it does not exist or you do not have permission.

The build task is configured to use Windows Authentication and the User that is running the Team City Agent has all the permission.

Do you have any thoughts about what could be the problem? Why the 'sa' is used?

Thanks
Tagged:

Answers

  • Hi Riccardo,

    That's probably happening because you have a user on that DB with sa as a login.

    In this case the workaround would be to use the Temporary Server option and specify a suitable SQL Server instance to build the DB.

    You seem to be using old versions of our products (that version of SQL CI was released in June 2014), so you might have to upgrade before being able to do this.

    Thank you,
    Sergio
    Product Support Engineer
    Redgate Software Ltd
    Please see our Help Center for detailed guides on how to use our tools
Sign In or Register to comment.