Can't use Copy Database from MS SQL Management Studio with Azure AD user


  • Another case to add to the TODO list for either AzureAD or SQL folk where Azure AD accounts break things: from within SQL Management Studio > right-click on db > tasks > copy database ... go through the wizard to try to copy a db to the same instance, get this error: 

    SQL Server Scheduled Job 'CDW_PSSFC07_SQL2016_PSSFC07_SQL2016_0_1' (0xA1C1758CC7011A42BFF516A5FE84511F) - Status: Failed - Invoked on: 2017-03-13 11:11:27 - Message: The job failed.  Unable to determine if the owner (AzureAD\[[YOUR_AD_USERNAME]]) of job CDW_PSSFC07_SQL2016_PSSFC07_SQL2016_0_1 has server access (reason: Could not obtain information about Windows NT group/user 'AzureAD\[[YOUR_AD_USERNAME]])', error code 0x54b. [SQLSTATE 42000] (Error 15404)).



    Monday, March 13, 2017 11:16 AM

All replies

  • Were you able to copy Database from MS SQL Management Studio with Azure AD user before?

    Have you enabled RBAC on Azure AD users?

    Tuesday, March 14, 2017 2:12 PM
  • I've not tried this before. I see it as a general problem about AzureAD users like this
    Tuesday, March 14, 2017 2:33 PM
  • Are you using Azure SQL? Could you provide more information about what you are trying to achieve?
    Monday, March 20, 2017 3:43 PM
  • not using Azure SQL. I was trying to copy a database that I had locally. I was able to work around the problem and achieve it in a different way, it's just annoying that default SQL Management Studio functionality like this doesn't work with AzureAD accounts. Another example is where the database owner is an AzureAD account and you try to execute a procedure that's created with EXECUTE AS OWNER, you get an error and the solution is to change the db owner to sa.
    Wednesday, March 22, 2017 1:14 AM