I have a question about login id and user id.
If I create a new login id, the new login id must not use the existing user
id in the database? in other word, it is not possible to associate the login
id to the exsiting user id in the database? We must create new user id for
the login id creation?
The following statement will create a new user id NETDOMAIN\John?
sp_grantdbaccess 'NETDOMAIN\John'
Reason
======
From SQL online book:
name_in_db must not already exist in the current database
Is the name for the account in the database. name_in_db is an OUTPUT
variable with a data type of sysname, and a default of NULL. If not
specified, login is used. If specified as an OUTPUT variable with a value of
current database