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?

  • Is that SQL login is the admin account? – SqlWorldWide May 27 '17 at 22:52
  • It could be. It was the account that was created when I created the database. – Randy Minder May 27 '17 at 23:45
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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.