You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATE DATABASE permissions are necessary. To create a database a login must be either the server admin login (created when the Azure SQL Database logical server was provisioned), the Microsoft Entra admin of the server, a member of the dbmanager database role in master
The user who you provided is not having the necessary permissions to create database. That may be the reason to get above error.
Steps to avoid this error:
If you are using Entra user to login to SQL server, make sure your Entra user is set as server admin, otherwise set server admin as shown below in SQL server:
If the user is from external provider, add dbmanager role to the user in master db using below command:
ALTER ROLE dbmanager ADD MEMBER <user>;
Then you will be able to deploy the database successfully as shown below:
Deployed database:
Note: Use latest version of SSMS i.e. SSMS v20.2, it will work.
Conclusion:
By following this guide, users can avoid the above error.
@AmareswarapuBhavani
Thank you for bringing this to our attention.
I've delegated this to content author, who will review it and offer their insightful opinions.
Document Enhancement Proposal: Unable to 'Deploy Database to Microsoft Azure SQL Database' from SSMS.
Overview:
Getting below error while deploying on-premises SQL database to Azure SQL database:
Correction Details:
This guide will allow users to:
Handle the above error and will help to get the activity error details.
Steps:
Reason for the error:
According to the MS document
The user who you provided is not having the necessary permissions to create database. That may be the reason to get above error.
Steps to avoid this error:
If you are using Entra user to login to SQL server, make sure your Entra user is set as server admin, otherwise set server admin as shown below in SQL server:
If the user is from external provider, add dbmanager role to the user in master db using below command:
Then you will be able to deploy the database successfully as shown below:
Deployed database:
Note: Use latest version of SSMS i.e. SSMS v20.2, it will work.
Conclusion:
By following this guide, users can avoid the above error.
Reference:
Login failed for user '' Error 18456 On Deploy Database
This Document creation request aims to improve user experience and security by providing clear documentation.
title: Create a single database
author: @WilliamDAssafMSFT
ms.author: @wiassaf
ms.reviewer: @MaThoma, @randolphwest
ms.service: azure-sql-database
ms.subservice: deployment-configuration
The text was updated successfully, but these errors were encountered: