SQL Server Database Project & unresolved references (linked server) RRS feed

  • Question

  • Hello 

    I want to create a SQL Server Database project using i can easily manage all the database objects in one project file and also do schema compare to Dev to Production and deploy. 

    In order to accomplish what i want, i created a SQL Server Database project and imported the database i have on the server (SQL Server 2012). I got all the objects (Tables, Functions, Procedures etc.). I could compare the dev database to production and i was able to deploy the changes to production as well. All this works well. Only issue is with the linked server and references.

    I have a linked server and i see messages as "

    SQL71562: Procedure: [dbo].[usp_ABC] has an unresolved reference to object [LinkedServerName].[Database].[CollectionList].[Table]."

    I have AS400 as linked server.

    Can some one tell me how i can resolve these messages?



    Wednesday, July 10, 2013 6:34 PM

All replies

  • You can remove the Procedure: [dbo].[usp_ABC] and build it. or use the dummy linked server on the dev env with the same name

    Thanks and Regards, Prajesh Please use Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful.

    • Proposed as answer by Prajesh Monday, July 22, 2013 7:05 PM
    Monday, July 22, 2013 6:21 PM
  • I have same issue as original poster, but of course with different linked server and objects.  When I added the DB schema from the linked server's database to my project (even though I will never build nor deploy that other server's DB from my project), I am still getting the unresolved references.  Exactly what steps do I need to take to have the build resolve these to local definition (but then not affect production linkages when later deployed)???  Thanks!
    Monday, July 22, 2013 7:03 PM
  • Create another database project with the shapes of your linked server objects.  Then create a reference from your original database project to this one.  You'll have to use SQLCMD variables in your original scripts when referencing your linked server types.
    Friday, October 4, 2013 4:31 PM