1

I am trying to import a DB in the Azure Portal. The original DB I exported from was on a different server, but is setup identically to where I am trying to import. I am importing by going to the target server and clicking the import button. I then choose the storage account, container, and bacpac file I would like to import. I check that the database size and type are the same for the import as the bacpac file. I also double check that the collation is the same on the import as it is in the bacpac. I then confirm. It attempts to do the import for about 20 minutes before giving the error message below. I can see the DB is created when I go to the sql server and click the sql databases blade, but the tables inside the DB are empty.

Could not import package.
Warning SQL72012: The object [data_0] exists in the target, but it will not be dropped even though you selected the 'Generate drop statements for objects that are in the target database but that are not in the source' check box.
Warning SQL72012: The object [log] exists in the target, but it will not be dropped even though you selected the 'Generate drop statements for objects that are in the target database but that are not in the source' check box.
Error SQL72014: .Net SqlClie

I have seen some responses in regards to similar issues, but they all seem to be using SSMS. Does anyone have any ideas on how to fix this issue inside the Azure Portal? Also, does anyone know what check box they are talking about? there is no checkbox when I am doing the import setup.

4
  • Can you please add a bit more details on how you are trying to do the import, step by step details would be very helpful to try and guide you on options you need to click. have you exported the original database to a bacpak file or how are you doing the import Commented Dec 18, 2020 at 15:08
  • @user7415753 I added a bit more information. I hope that helps some Commented Dec 18, 2020 at 15:47
  • The first two warnings are probably irrelevant, can you please post the following: actual error message received (after .Net sqlclie) and version of SQL you are exporting from Commented Dec 18, 2020 at 16:08
  • I cannot pull the full error message from anywhere. There version is 12.0.2000.8 Commented Dec 18, 2020 at 17:32

1 Answer 1

2

The warnings you are getting are a bit of a red herring. The issue is with the error you are getting. The line you posted only shows a generic error which should be followed by the actual error after. Try going to the actual database server and check import\export history.

try also importing using powershell which may give you some more details on the error you are getting:

$importStatus = Get-AzSqlDatabaseImportExportStatus -OperationStatusLink $importRequest.OperationStatusLink

[Console]::Write("Importing")
while ($importStatus.Status -eq "InProgress") {
    $importStatus = Get-AzSqlDatabaseImportExportStatus -OperationStatusLink $importRequest.OperationStatusLink
    [Console]::Write(".")
    Start-Sleep -s 10
}

[Console]::WriteLine("")
$importStatus

Without knowing what the error you are getting it's a bit of a stab in the dark trying to guess what the issue is. Giving the version of SQL you are exporting from I can guess this is an on prem database server.

One of the common reasons dacpac files tend to fail when importing is your source database server isn't configured to allow contained databases

If that's the case, you need to go to your source database server (where you are exporting from) and enable that option:

sp_configure 'contained database authentication', 1;  
GO  
RECONFIGURE;  
GO

Once this is run, recreate your dacpac file and try to import that.

As I mentioned, this is a complete stab in the dark as you haven't provided the error you are actually getting

Sign up to request clarification or add additional context in comments.

5 Comments

Thank you. I looked in the export/import history and the error was cutoff there as well. I will try and use powershell to see if I can find more info.
any joy with the above @new_programmer_22?
I have not been able to get an updated error message. I will be trying the reconfiguration process soon. I have gotten side tracked on other tasks so had to stick this on the back burner
When trying to run the command I get a Could not find stored procedure 'sp_configure'. error.
I was able to get things rolling after you suggested the above.

Your Answer

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.