CREATE USER [anc] WITHOUT LOGIN WITH DEFAULT_SCHEMA=[anc]
GO
what is the difference between the user and the login.
i am not clear as to y do we create these kind of users??
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Logins are a server wide (instance level) objects. Their correct name is ‘server principals’ (see
sys.server_principals). Server wide privileges are granted to logins, likecreate databaseorview server statepermissions.Users are a database objects, correctly referred to as ‘database principals’ (see
sys.database_principals). They are the recipients of database permissions, likecreate tableorselect.Ordinarily a login is mapped 1-to-1 to a user in each database, via a matching SID, but there are some exception, like all members of the
sysadminfixed server role are always mapped todbo.Users without login are a specific construct for Service Broker remote identities (see Remote Service Bindings) and for code signing. You should never have to create one in any other context, and if you do, you’re likely doing it wrong. Users without login are never meant to be impersonated.