how to fix Error SQL71501: Error validating element [dbo].[int ]: Column: [@tWebCheckins].[TenantID] has an unresolved reference to Built-in Type [dbo].[int ]. Error SQL71501: Error validating element [dbo].[int ]: Column: [@tAttendance].[TenantID] has an

Ashraf Khan 40 Reputation points
2024-05-21T04:12:51.41+00:00

Error SQL71501: Error validating element [dbo].[int ]: Column: [@tWebCheckins].[TenantID] has an unresolved reference to Built-in Type [dbo].[int ].

Error SQL71501: Error validating element [dbo].[int ]: Column: [@tAttendance].[TenantID] has an unresolved reference to Built-in Type [dbo].[int ].

i tried a lot but unable to solve the above issue while exporting the data tier application for migrating to azure

Azure SQL Database
SQL Server | Other
{count} votes

3 answers

Sort by: Most helpful
  1. Alberto Morillo 34,671 Reputation points MVP Volunteer Moderator
    2024-05-21T05:19:20.8833333+00:00

    If you are doing an export of a database attached to a SQL Server instance, please perform an assessment of the database using Microsoft Data Migration Assistant, resolve de inconsistencies by executing the recommendations the tool gives you, and then you will be able to export the database. Use that tool also to migrate to Azure SQL as explained here. That tools gives you the easiest way to migrate to Azure SQL. You exclude objects with incompatibilities from the migration.

    You can also use this article to skip the validation.


  2. Olaf Helper 47,436 Reputation points
    2024-05-22T05:00:34.2233333+00:00

    [dbo].[int ]:

    Do I really see a space behind "int"?


  3. SSingh-MSFT 16,371 Reputation points Moderator
    2024-05-22T07:56:49.5866667+00:00

    Hi @Ashraf Khan,

    Welcome to Microsoft Q&A forum.

    As I understand, you are getting error when migrating sql database to azure database while exporting data tier application like bacpac file.

    I assume you are following the same process as mentioned here in the documentation:

    https://learn.microsoft.com/en-us/sql/relational-databases/data-tier-applications/export-a-data-tier-application?view=sql-server-ver16

    and getting below error:

    Error validating element [dbo].[int ]: Column: [@tWebCheckins].[TenantID] has an unresolved reference to Built-in Type [dbo].[int ].

    Could you please check below things:

    1). Make sure if you are having a View like:

    ...FROM [Database].[dbo].[Table]

    then replace it with

    ...FROM[Table]

    Since you may be importing the bacpac into a different database name so the reference to [Database] might not be valid.

    2). If there are Stored Procedures, use Table name itself than using Table alias.

    3). Check source and target schema names for example in your case they look different:

    [@tWebCheckins].[TenantID] and [@tAttendance].[TenantID].

    4). Try latest version of SSMS to perform migration.

    Let us know if any of the above helped.

    If not, share your observations.

    Thanks

    0 comments No comments

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.