locked
Error validating elements stops migration or bacpac backup RRS feed

  • Question

  • I am having a problem migrating a SQL 2017 database to Azure.  I have used the 'Deploy Database to Microsoft Azure SQL Database' and 'Export Data-tier Application' wizards from the tasks menu in SSMS and get the same result.

    I am trying migrate 4 databases.  One of the databases contains the table ItemMaster, the other 3 have views to access the table since they all use the same data.

    The 3 databases that use the views to access ItemMaster, also have other views that use/reference the ItemMaster view.

    When I try to migrate the data, it complains that the views that access the ItemMaster views can't find the ItemMaster view?  It looks like it is trying to migrate the views that access the ItemMaster view, before it migrates the ItemMaster view and it stops the migration before it even starts?

    Here are the actual errors:

    TITLE: Microsoft SQL Server Management Studio
    ------------------------------

    One or more unsupported elements were found in the schema used as part of a data package.
    Error SQL71501: Error validating element [dbo].[INVHISTORY2]: View: [dbo].[INVHISTORY2] 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].[InvoiceHistory].[ItemMasterR], [dbo].[ItemMasterR].[ITEM_NUM] or [dbo].[ItemMasterR].[ItemMasterR].

    Error SQL71501: Error validating element [dbo].[INVHISTORY2]: View: [dbo].[INVHISTORY2] 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].[InvoiceHistory].[ItemMasterO], [dbo].[ItemMasterO].[ITEM_NUM], [dbo].[ItemMasterO].[ItemMasterO] or [dbo].[ItemMasterR].[ItemMasterO].

    Error SQL71501: Error validating element [dbo].[INVHISTORY2]: View: [dbo].[INVHISTORY2] 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].[InvoiceHistory].[ItemMasterR], [dbo].[ItemMasterO].[ItemMasterR], [dbo].[ItemMasterR].[DESCR] or [dbo].[ItemMasterR].[ItemMasterR].

    Error SQL71501: Error validating element [dbo].[INVHISTORY2]: View: [dbo].[INVHISTORY2] 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].[InvoiceHistory].[ItemMasterO], [dbo].[ItemMasterO].[DESCR], [dbo].[ItemMasterO].[ItemMasterO] or [dbo].[ItemMasterR].[ItemMasterO].


    Tuesday, February 26, 2019 1:22 AM

All replies

  • Hi IBEddie,

     

    According to your description, my understanding is that you want to migrate 4 databases. There is one database with a table and views in other 3 databases all access data from the table. If anything is misunderstood, please tell me.

     

    The export process when object definitions (views, procedures, etc.) contain external references will be blocked, as Azure SQL Database does not allow cross-database external references. Please modify your database schema or remove these external references. It is suggested to assess the database for compatibility before migration by using the Data Migration Assistant (DMA).

     

    For more details, please see:

     

    SQL Server database migration to Azure SQL Database

     

    Best Regards,

    Emily


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com


    Tuesday, February 26, 2019 8:20 AM
  • Does that mean it blocks them only in the export/migration process?  If I were to copy the tables to the databases using views and then migrate them, can I recreate the view once the databases are all in Azure?

    Thanks

    Tuesday, February 26, 2019 9:58 PM
  • Hi IBEddie,

     

    Yes, your understanding is right. After migration, you can recreate these views.

     

    Please refer to the blog: Cross-Database Queries in Azure SQL Database.

     

    Best Regards,

    Emily


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Wednesday, February 27, 2019 8:17 AM