Issue with views using Change automation build step

We are having an issue using the Build a SQL Source Control Project step in Azure Dev Ops.  The database that we are attempting to build has views and based off the logs, it looks like the views are building before any of the dependent objects.  Has anyone dealt with this and if so what did you do as a work around?

Answers

  • Hi Joshua,

    SCA does contain logic to build the views after the dependencies. The only time I have run into this issue with building is when the dependent objects are not present in the exact database you are building -- either because they were dropped or because they are in a different database that isn't present on the build server. 

    Could that be the case here? The error log should mention the specific object names to track down.

    There are ways to handle it, just depends on exactly where the dependent objects are.

    Kendra
  • FreekFreek Posts: 11 Bronze 1
    Could you check if the tables the views refer to are pre-fixed with the same database name as they are in? I had the same issue and it was solved by removing the database prefix. Otherwise the plugin considers them to be outer references and doesn't search for them in the payload.
  • FergyFergy Posts: 4 New member
    Did anyone reslove this?
    Im am building a Source Control project (tempdb is an empty database)
    It appears to be creating the views first
Sign In or Register to comment.