SQL71561: View: XXXXXXX has an unresolved reference to object [$(DBName)].[dbo].[table].

Satya Praveen Velicheti 6 Reputation points
2022-08-04T20:04:31.01+00:00

Hi,
My Database project build is failing with SQL71561 error. In my view I need to refer a table in another database, so for that created a dacpac of that other database and then started referencing it using $(DBName) variable. It is throwing errors for that reference. Tried different ways but couldn't find a resolution for it. Using VS 2019.

SQL Server | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. YufeiShao-msft 7,146 Reputation points
    2022-08-08T06:19:33.547+00:00

    Hi @Satya Praveen Velicheti ,

    Please try to clear out the 'Database variable' field in the dialog, and go to the project properties and uncheck 'Enable extended Transact-SQL verfication for common objects' allowed the project to build succeddfully

    https://stackoverflow.com/questions/12161392/using-ssdt-how-do-i-resolve-sql71561-errors-when-i-have-a-view-that-references

    https://social.msdn.microsoft.com/Forums/en-US/06f79a4a-812c-46b4-872c-c0bf51755163/sql71561-computed-column-has-an-unresolved-reference-to-object-even-though-reference-exists?forum=ssdt

    -------------

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.