June 16, 2015 at 9:42 am
I need to make a sql login name also become a database user with the same name.
How do I make the login name also become a database user with the same name AND be mapped correctly to each other.
Thanks in advance
June 16, 2015 at 9:54 am
rpk7309 (6/16/2015)
I need to make a sql login name also become a database user with the same name.How do I make the login name also become a database user with the same name AND be mapped correctly to each other.
Thanks in advance
You need to create a database user for the login:
use [dbname];
create user [username] for login [loginname] with default_schema = dbo;
--now grant whatever database permissions are appropriate to [username]
June 16, 2015 at 11:54 am
Create LOGIN [ClarkKent] WITH PASSWORD='NotTheRealPassword'
USE [WHATEVER]
Create USER [ClarkKent] FOR LOGIN [ClarkKent]
Lowell
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply