Home | Site Map | Cisco How ToNet How To | Wireless |Search | Forums | Services | Donations | Careers | About Us | Contact Us|

Can't export SQL bacpac file

Network Sharing , TCP/IP, Internet, Wireless, Exchange, IIS, ISA and Print

Can't export SQL bacpac file

Postby blin » Fri Feb 09, 2018 4:06 pm

Situation: The client is running SQL Express 2014 (64-Bit) – (ver 12.0.5207). When he try to export database to bacpac file by following this post: How to move an existing database to Azure SQL Database? He get this error:

TITLE: Microsoft SQL Server Management Studio

One or more unsupported elements were found in the schema used as part of a data package.

Error SQL71564: Error validating element [chicagotech]: The element [chicagotech] has been orphaned from its login and cannot be deployed.

Error SQL71501: Error validating element [dbo].[vOpenJobs]: View: [dbo].[vOpenJobs] has an unresolved reference to object [dbo].[tblServiceTaskOutstanding].

Error SQL71562: Error validating element [dbo].[ms_sp_LogTrim]: Procedure: [dbo].[ms_sp_LogTrim] has an unresolved reference to object [master].[].[sp_executesql].[@Rows]. External references are not supported when creating a package from this platform.
How to Configure and Troubleshoot Cisco
http://www.howtocisco.com

Tablet and Smartphone Setup Guide
http://www.quicksetupguide.com
blin
Site Admin
 
Posts: 3686
Joined: Wed Dec 31, 1969 7:00 pm
Location: Chicago, USA

Re: Can't export SQL bacpac file

Postby blin » Fri Feb 09, 2018 4:08 pm

Regarding to the error 71564

It means that there is a user in your databases that does not has login. Please refer to the article ‘Troubleshoot Orphaned Users (SQL Server)’ to fix this issue.

https://docs.microsoft.com/en-us/sql/sq ... sql-server

Regarding to the error 71562

DACFx must block Export when object definitions (views, procedures, etc.) contain external references, as Azure SQL Database does not allow cross-database external references. This includes blocking Export for databases with three-part references to themselves – if these references were successfully Exported, Importing the resulting BACPAC to a database with a different name will always fail, as the three-part name references would no longer be self-referencing.

Please refer to the article ‘Windows Azure Import/Export Service and External References’

https://blogs.msdn.microsoft.com/ssdt/2 ... references
How to Configure and Troubleshoot Cisco
http://www.howtocisco.com

Tablet and Smartphone Setup Guide
http://www.quicksetupguide.com
blin
Site Admin
 
Posts: 3686
Joined: Wed Dec 31, 1969 7:00 pm
Location: Chicago, USA

Re: Can't export SQL bacpac file

Postby blin » Fri Feb 09, 2018 4:09 pm

You are right. We found one Stored Procedure using an invalid reference and also a tool we have that relies on the masterDB features. We removed those and we were able to create the bacpac file. I am trying to restore it to the Azure server now.
How to Configure and Troubleshoot Cisco
http://www.howtocisco.com

Tablet and Smartphone Setup Guide
http://www.quicksetupguide.com
blin
Site Admin
 
Posts: 3686
Joined: Wed Dec 31, 1969 7:00 pm
Location: Chicago, USA


Return to Networking

Your Ad Here

Who is online

Users browsing this forum: No registered users and 4 guests