Thanks for your replies. I really appreciate your help, but it still doesn't work. I think I already have been into that table before but to be sure did I execute these SQL snippets again now ...First I created a login like this:USE masterIF NOT EXISTS (SELECT * FROM sys.sql_logins WHERE name = 'devlogin') CREATE LOGIN devlogin WITH PASSWORD = 'abcd1234', DEFAULT_DATABASE = dev
Then I created a schema like thisCREATE SCHEMA dev AUTHORIZATION dbo
And finally I created a user like this:USE devIF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = 'devuser') CREATE USER devuser FOR LOGIN devlogin WITH DEFAULT_SCHEMA = dev
I verified that devuser was added to the dev database and then should this select give one record as a result, shouldn't it?SELECT 1 FROM sys.database_principals WHERE name = 'devuser'
But it didn't. It seems that the information (name) about the user I have created is stored in some other table. I think it is strange if there isn't some sys-table for users also like this user as there is the sys-table for logins.