2

In my Azure SQL server, I see the SQL login that allows me to connect to the server. However, when I look at the Users defined for my database on that server, I don't see a user account with the same name (which I would expect). How am I able to access my database (which I am able to do), without a database user account?

asked May 27, 2017 at 21:02
2
  • Is that SQL login is the admin account? Commented May 27, 2017 at 22:52
  • It could be. It was the account that was created when I created the database. Commented May 27, 2017 at 23:45

1 Answer 1

3

Your login is mapped to different database user, most probably to dbo . You can check this by executing:

SELECT CURRENT_USER

You can also compare the output from following views (and find matching SIDs to figure out login to user mapping):

SELECT * FROM sys.sql_logins -- you need to execute this on master azure db
SELECT * FROM sys.database_principals -- you need to execute this on the database of interest
answered May 28, 2017 at 9:36

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.