all groups > sql server programming > march 2004 >
You're in the

sql server programming

group:

New User error...


New User error... Chris Marsh
3/24/2004 9:59:20 PM
sql server programming:
I am getting error 15007 when trying to create a new user. Why? This is a
silly error, I know the user doesn't because I am trying to add them but
this is the error I get when trying to add any user to the database. What
the heck am I doing wrong?

Thanks in advance!

Chris

Re: New User error... Dan Guzman
3/24/2004 10:37:45 PM
Before you add a user to a database, you need to first add the login. For
example:

--SQL authentication
EXEC sp_addlogin 'MyLogin', 'Mypassword'
USE MyDatabase
EXEC sp_adduser 'MyLogin'

--Windows authentication
EXEC sp_grantlogin 'MyDomain\Mylogin'
USE MyDatabase
EXEC sp_grantdbaccess 'MyDomain\Mylogin'

--
Hope this helps.

Dan Guzman
SQL Server MVP

[quoted text, click to view]

Re: New User error... Chris Marsh
3/25/2004 8:20:32 AM
thank you -
[quoted text, click to view]

AddThis Social Bookmark Button