bacpac restore Issue to Azure DB:Error importing database:Data cannot be imported into target because it contains one or more user objects. Import should be performed against a new, empty database.

Dan J. Meyer 0 Reputation points
2023-07-20T18:49:00.8566667+00:00

Receiving error below when restoring a DB to Azure

*** Error importing database:Data cannot be imported into target because it contains one or more user objects. Import should be performed against a new, empty database.

Warning SQL0: A project which specifies SQL Server 2019 as the target platform may experience compatibility issues with Microsoft Azure SQL Database v12.

Error SQL0: Data cannot be imported into target because it contains one or more user objects. Import should be performed against a new, empty database.

Azure Database Migration service
{count} votes

1 answer

Sort by: Most helpful
  1. Vahid Ghafarpour 20,480 Reputation points
    2023-07-21T06:18:46.9633333+00:00

    Open the BACPAC file and review its contents to ensure it includes only the schema and data of the source database. It should not include user objects like users, roles, logins, or any other objects tied to specific users or logins.

    0 comments No comments