8

I know how to use SQLpackage.exe. I can export from SQL Azure and create a bacpac. I can also Import to SQL Server via SQLPackage.exe.

I want to export or import without the users in the database. The users are preventing the normal import to fail.

Error importing database :could not import package.

Error SQL72014 Cannot grant, deny or remove permissions to or from special roles enter image description here

I can't delete the users before I export, or exclude them from the import.

Currently we have to backup the database, restore it on SQLAzure, delete the use on this second database, then create a bacpac from the restored database.

How do I get around this? can I use IgnoreUserSettingsObjects with my sqlpackage ? I tried using the parameters but it fails

asked Apr 18, 2017 at 14:00
2
  • Did you try /P:IgnorePermissions switch? I know in visual studio SSDT you can create a solution and you can delete individual objects from you solution (not in the source) before you deploy. Of course you can only create .dacpac file and do the data separately. Commented Apr 18, 2017 at 14:13
  • Thanks, Just tried /P:IgnorePermissions now, but did not work unfortunately. Commented Apr 18, 2017 at 14:23

1 Answer 1

0

I was having a similar problem, but I coudn't find a way to generate the .bacpac without users, there is a workarround if you need the copy in the same suscription, the Microsoft Suport Team guide us is doing a COPY directly from the Azure Portal and it worked for me.

answered Mar 24, 2023 at 17:25
1
  • 1
    Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center. Commented Mar 24, 2023 at 19:33

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.