To take a .bacpac backup of a SQL Server database with schema issues, you can use the SQLPackage utility. This utility can export a database schema and data to a BACPAC file, even if there are unresolved references to other databases among other issues. You can then import the BACPAC file into Azure SQL Database or Azure SQL Managed Instance using the Import Data-tier Application Wizard in SQL Server Management Studio or the SQL Server Import and Export Wizard.
Here is an example command to export a database to a BACPAC file using SQLPackage:
sqlpackage.exe /Action:Export /ssn:<serverName> /sdn:<databaseName> /tf:<filePath>
Replace <serverName>
with the name of the SQL Server instance, <databaseName>
with the name of the database, and <filePath>
with the path and file name for the BACPAC file.
References: