question

ChrisGilliam-4055 avatar image
0 Votes"
ChrisGilliam-4055 asked AnuragSharma-MSFT commented

Azure SQL Server import from bacpac leaves enforce foreign key constraints unchecked

Hi,

I use the export data tier application and bacpac files to make a copy of my production database for development purposes. However when I import the bacpac file all the foreign key constraints are set to 'enforce =no" . What is the best way to make a copy of a database with all foreign key restraints still enforced ?

azure-sql-database
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @ChrisGilliam-4055, welcome to Microsoft Q&A forum.

I tried the same using SSMS by generating the bacpac file of Azure SQL Db and then importing in to the on-premise SQL Server and the foreign key constraints were intact. Please check the below screenshot:

127875-image.png

Could you please let us know how are you generating the bacpac and are you importing it in on-premise or Azure SQL Db only?

Also if you want to create a copy in Azure SQL database only, we have the copy option available as mentioned below:

127897-image.png


0 Votes 0 ·
image.png (41.5 KiB)
image.png (53.0 KiB)

Hi @ChrisGilliam-4055, could you please check the previous response and let us know accordingly.

0 Votes 0 ·

0 Answers