DACPAC Build SQL71501 , SQL71502, SQL71562 Errors RRS feed

  • Question

  • We have an existing database that contains three schemas in the one database.  When I import the dacpac into the project and try to build I keep getting the above errors in the output for the build.  I  have been scouring the net to try and find a solution and have tried a lot of them.  This database has around 3000 objects in it (tables, stored procs, functions, UDT's, etc).  I have set references to another DACPAC file, set reference to master and msdb, and now I am trying a refactor option fully qualified names option.  Here is a error as it appears in the build screen:

    [path]WorkFlowTemplate_General_Info.sql (3,13): Error: SQL71501: View [dbo].[WorkflowTemplate_Info] has an unresolved reference to Schema [dbo]

    Here is the create view text

    CREATE View [dbo].[WebSQLViews]






    WHERE type = 'V' and name <> 'WebSQLViews"

    Here is other error example

    C:\code\TMWSystems_Databases\TMW_PROD\TMW_PROD\dbo\Stored Procedures\Procs2\dbo.dx_sp_columns.sql(8,31): Warning:  SQL71502: Procedure: [dbo].[dx_sp_columns] contains an unresolved reference to an object. Either the object does not exist or the reference is ambiguous because it could refer to any of the following objects: [dbo].[syscolumns].[sysobjects]::[id], [dbo].[sysobjects].[id] or [dbo].[sysobjects].[sysobjects]::[id].

    create procedure [dbo].[dx_sp_columns] (@proc_name varchar(255))

    SELECT, AS type, syscolumns.length, syscolumns.isoutparam,
    syscolumns.isnullable, AS proc_name 
    FROM syscolumns INNER JOIN 
    sysobjects ON = LEFT OUTER JOIN 
    systypes ON syscolumns.xtype = systypes.xtype 
    WHERE     ( LIKE @proc_name)
    ORDER BY, syscolumns.colorder 

    C:\code\TMWSystems_Databases\TMW_PROD\TMW_PROD\dbo\Stored Procedures\Procs3\dbo.MetricAddQueuedJob.sql(43,7): Warning:  SQL71562: Procedure: [dbo].[MetricAddQueuedJob] has an unresolved reference to object [MSDB].[dbo].[sp_add_jobstep].

    Here is the code

    EXEC msdb.dbo.sp_add_jobstep @job_id = @job_id
    ,@step_name = 'Step 2'
    ,@subsystem = 'TSQL'
    ,@command = @JobCommand
    ,@database_name = @DatabaseName
    ,@output_file_name = @filename
    ,@flags = 0
    ,@on_success_action = 3

    Tuesday, August 2, 2016 4:32 PM

All replies

  • Have you added the 3 schema in your database project ? Double-check the database references in references section whether you have added Master and Msdb in it.
    Friday, August 5, 2016 4:05 PM