this login already has an account under different user name during Build phase
nfp1
Posts: 6 Bronze 1
Successfully created and built SQL Change Automation project. Database has number of users assigned to the roles. Users are mapped to the SQL server type of Logins. Baseline script has these items scripted with existence check before creation of each item. No problems with shadow database verification.
In TFS created new build definition to build Change automation project. Process failed with message:
Validating project 'D:\agent\vsts-agent-win-x64-2.131.0\_work\256\s\MCRCDB_SCA.sqlproj'.
DbBuildTask: ERROR \agent\vsts-agent-win-x64-2.131.0\_work\256\s\Migrations\1.0.0-Baseline\001_20190225-0803_nfp1.sql(0,0): An error occurred while attempting to verify your deployment scripts
Msg 15063, Level 16, State 1, Server DSDV-CHRO-W2K12\QSRV1, Line 8
The login already has an account under a different user name.
RedGate.Versioning.Automation.Shared.Errors.TerminatingException: Schema validation failed
Any ideas?
Tagged:
Comments
thank you for prompt response. This error happens when TFS agent runs the Build. during this stage powershell script invokes Invoke-DatabaseBuild and does Validating project 'D:\agent\vsts-agent-win-x64-2.131.0\_work\256\s\MCRCDB_SCA.sqlproj'. How it validates I have no idea but as result I have DbBuildTask: ERROR \agent\vsts-agent-win-x64-2.131.0\_work\256\s\Migrations\1.0.0-Baseline\001_20190225-0803_nfp1.sql(0,0): An error occurred while attempting to verify your deployment scripts. In Visual studio project get built just fine? I don't know which database DbBuildTask uses. Need some insight here.
Finally, I made it work. But solution maybe not permanent yet. Yes, build task is configured. The build succeeded when I designated the "Shadow" db as a build database and made SQL login from build configuration a dbo in shadow database.
Not sure how long this fix will survive as in DEV and TARGET databases dbo user should be mapped to the our company dedicated account.
Nevertheless, I appreciate your tip it helped me. But if I do not designate database in the build configuration which one is being used for project verification by Agent?
Thank you wayOutwest