Search code examples
sql-serverazureclouddacazure-database-mysql

Error SQL71624: The permission 'CONNECT' is not valid for the target object 'guest' in Microsoft Azure SQL Database v12


I have a SQL database created and I am trying to deploy/move that database to the Azure Cloud by using the Deploy Database to SQL Azure Wizard in SQL Server Management Studio. But I have ran into an error after trying to deploy it. I am using the SQL Authentication to log in with my credentials. I also tried installing the Data Migration Application.

The error is: TITLE: Microsoft SQL Server Management Studio

One or more unsupported elements were found in the schema used as part of a data package. Error SQL71624: The permission 'CONNECT' is not valid for the target object 'guest' in Microsoft Azure SQL Database v12. (Microsoft.SqlServer.Dac)


BUTTONS:

OK

I don't understand what this error means and also I don't understand why this error is happening. I looked on the internet for possible solutions but could not find any information. Please help me.


Solution

  • Azure Sql Database and regular SQL Server aren't entirely compatible.

    One of the things that is enabled on regular SQL Server is the guest login. This login allows connection to instance, with a default database of master. Once connected, the user can switch to a different database (use [thedatabase]) if they have the authority to do so.

    But in SQL Azure, you connect directly to a single database, and can't switch databases on the connection. So the guest account has no function.

    On your source instance (the one you want to migrate), you can revoke this ability so that the wizard won't try to migrate it. Execute revoke connect from guest on your on premise instance.