Unable to Export Data Tier in SQL Server When External Views Exists

Viewed 618

I am planning on using SSMS, why I am unable to run Tasks->Export Data Tier Application on a database which has views pointing to another database tables. This is in Azure SQL MI.

Error Message

One or more unsupported elements were found in the schema used as part of a data package.
Error SQL71561: Error validating element [dbo].[vw_ext_customer]: 
View: [dbo].[vw_ext_customer] has an unresolved reference to object
[finance].[dbo].[ext_customer]. External references are not supported when 
creating a package from this platform.

External Table View

CREATE VIEW [dbo].[vw_ext_customer] AS SELECT * FROM finance.dbo.ext_customer
1 Answers

Finally, I am able to generate bacpac using sqlpackage utility instead of SSMS. Trick is not to verify schema model during export. Not sure why SSMS do not have this parameter or am I missing somewhere. Please find my working code below

$ sqlpackage /a:export /ssn:some_server /sdn:databasename /su:username /sp:password /tf:database.bacpac /p:VerifyExtraction=False
Related