sp_change_users_login @Action='Report';
With SQL 2005 and beyond that is no the case anymore. It allows you to create a database user without specifically mapping a login to it.
CREATE USER my_user WITHOUT LOGIN
What might you want to use this for? I found this [article][1] that walks through a few examples of using it. I think it is pretty interesting, but also noticed in the comments that it changes how you look for actual orphaned users. The sp_change_users_login BOL article states it is going away in future releases (among other things :). One of the authors comments gives a good query to find actual orphaned users by checking the SID length.
-- Finding users without login
SELECT * FROM sys.database_principals
WHERE
DATALENGTH(sid) > 16 -- users mapped to logins have a 16 bytes SID,
-- users without login have a length of ~28 bytes
AND sid not in (SELECT sid FROM sys.server_principals) -- No login with a matching SID
AND type = 'S' -- Only SQL users
AND principal_id > 4 -- filter system (well-known) principals
go
-- Finding orphaned users
SELECT * FROM sys.database_principals
WHERE
DATALENGTH(sid) <= 16 -- users mapped to logins have a 16 bytes SID,
-- users without login have a length of ~28 bytes
AND sid not in (SELECT sid FROM sys.server_principals) --No login with a matching SID
AND type = 'S' -- Only SQL users
AND principal_id > 4 -- filter system (well-known) principals
go
Was just wondering if anyone has used this yet or is using this feature or ability in SQL 2005+? [1]:
http://blogs.msdn.com/b/raulga/archive/2006/07/03/655587.aspx