Azure / SQL Server / Azure DB / Add Logins, Users, Permissions

After we created our SQL Server and Azure DB now we need to connect to our Azure DB using SSMS.

First of all, we need to add firewall rule to be able to access our Azure SQL Server from our location.

Click on yours Azure SQL Server on Azure portal, and choose Firewall / Virtual Networks.

 

Then just add your firewall rule and IP Address, or IP range if you want.

After firewall rules have been added, users can connect to a Azure SQL Database using administrator accounts, or as an database owner or database users (If they already exist).

First you need to login to the SQL Database using administrator account

SQL Database > Properties

 

To be able to create new login on Azure Logical SQL Server you need to use your Azure Admin account.

Use  SQL user with administrator permissions and connect to the master database (This is  default database).

 

 

To be able to do create new database user for that login you must be connected as an admin to the database where you want to create that user.

On Azure SQL you cannot set the default DB for the login, so master database will always be default database. So instead of default you need to choose your database name.

 

Now, we can try to connect to that db using SSMS specifying default DB for that user.

 

 

 

 

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *