none
Azure ARM SQL Database Import - user with the same password in master or target server issue

    General discussion

  • Hi guys,

    When we try to create a database using ARM "SQL Database Import" we encounter this error:

    11:02:24 - [ERROR] New-AzureRmResourceGroupDeployment : 11:02:24 AM - Resource 
    11:02:24 - [ERROR] Microsoft.Sql/servers/databases/extensions 'testsqlsrl/testchat/Import' 
    11:02:24 - [ERROR] failed with message 'The ImportExport operation with Request Id 
    11:02:24 - [ERROR] 'ad201276-355e-4407-a3ac-dd28b9045b32' failed due to 'Error encountered during 
    11:02:24 - [ERROR] the service operation. 
    11:02:24 - [ERROR]     Could not import package.
    11:02:24 - [ERROR]         Unable to connect to master or target server 'testchat'. You must 
    11:02:24 - [ERROR] have a user with the same password in master or target server 'testchat'.
    11:02:24 - [ERROR] '.'
    11:02:24 - [ERROR] At D:\...\Deploy-Azu
    11:02:24 - [ERROR] reResourceGroup.ps1:98 char:1
    11:02:24 - [ERROR] + New-AzureRmResourceGroupDeployment -Name ((Get-ChildItem $TemplateFil ...
    11:02:24 - [ERROR] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    11:02:24 - [ERROR]     + CategoryInfo          : NotSpecified: (:) [New-AzureRmResourceGroupDeplo 
    11:02:24 - [ERROR]    yment], Exception
    11:02:24 - [ERROR]     + FullyQualifiedErrorId : Microsoft.Azure.Commands.Resources.NewAzureResou 
    11:02:24 - [ERROR]    rceGroupDeploymentCommand
    11:02:24 - [ERROR] 

    The SQL user and SQL Import user and passwords are the same. 

    The SQL DB Import is very sensitive, works once or twice then when you try to create another import with the same settings, it doesn't.

    Are there any tips we should take into consideration?


    Wednesday, March 16, 2016 2:06 PM

All replies

  • Hi Ovidiu Petrache,

    Since this forum is to discuss the VS IDE, but based on your description, it seems that the issue is related to the Azure.

    Just to make this issue clearly, like this case here:

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/616533e5-eab4-4d6a-82c8-d93f6120dd98/restoreimport-sql-azure-database-issue?forum=ssdsgetstarted

    Whether this issue is related to the Azure SQL database or it is related to the VS SQL Server database project?

    Maybe you could share us the detailed information about this issue, so we could help you find a more appropriate forum or provide useful information.

    Sincerely,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, March 17, 2016 11:58 AM
    Moderator
  • Hi Jack,

    First of, thank you for your response in such a short notice.

    I'm guessing I didn't post exactly where I should of, if so, can you please move the post.

    It's related to the Azure ARM template.

    The issue is related to the "SQL Database Import" Resource.

    I would gladly insert screenshots, but unfortunately my account isn't verified, although I've asked for verification on "Verify your account 33" thread (i can't insert links either..)

    When trying to do the import from a bacpac file, stored in a storage account in Azure, it works the first time, but if I try to re-do it with the same settings, it's throwing exceptions. One such exception is the one above.

    Thursday, March 17, 2016 4:03 PM
  • I experience the same issue when attempting to import a .bacpac file via the SQL Database Import CLI.

    This is the command I am running:

    C:\Program Files\Microsoft SQL Server\130\DAC\bin>SqlPackage.exe /a:Import /sf:Source\file.bacpac /tdn:newdbname /TargetServerName:(instancename)

    I have also tried the 120 directory, replacing 130 above. I have not yet been able to get a solid run. My goal is to build a functional script to get a new .bacpac ready for use each day in SSMS, after the a fresh download each night from Azure SQL. And without having to manually run the import job from within SSMS of course.


    Thursday, March 17, 2016 5:29 PM
  • Hi,

    I would suggest you move to Azure SQL Database forum to get a better help: https://social.msdn.microsoft.com/Forums/azure/en-US/home?forum=ssdsgetstarted

    Regards


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, March 21, 2016 3:31 AM
  • Hi guys,

    I don't think i can move the thread to another location, my account isn't activated.

    But I found an answer to the issue.

    In the Portal (portal.azure.com) Firewall Settings of the SQL Server there is an option called: "Allow access to Azure services". It was off. I activate it and is seems to work.


    Tuesday, March 22, 2016 1:28 PM