Comments
4 comments
-
The script does not do anything with logins. However, if does try to create users with matching login names. A login can only be mapped to one user in a database. This makes me wonder if you are trying to verify a deployment script against a target that has a login already mapped. Do you have logins mapped to different user names?
-
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.
-
How have you configured the task for build? Are you entering a database name?
-
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
Add comment
Please sign in to leave a comment.
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:
Any ideas?