Is it possible to give other people access to my Azure SQL Database?

IRF 21 Reputation points
2021-07-06T14:54:49.583+00:00

Can I give my friends access to my Azure SQL Database? If yes how can I do that and how can they connect?

Thank you

Azure SQL Database
{count} votes

1 answer

Sort by: Most helpful
  1. Vaibhav Chaudhari 38,736 Reputation points
    2021-07-06T16:54:36.297+00:00

    Yes, create a user and provide him required access. Login to SSMS using admin credentials and execute below query in the DB where access has to be granted.

    With SQL Server name, DB name, user name and password, others can access the DB:

    CREATE USER Tom 
    WITH PASSWORD = 'YourPassword@1', 
    DEFAULT_SCHEMA = dbo; 
    
    -- add user to role(s) in db 
    ALTER ROLE db_datareader ADD MEMBER Tom; 
    

    Please don't forget to Accept Answer and Up-vote if the response helped -- Vaibhav

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.