Creating a user in SQL Server 2000

Tags:
SQL Server 2000
Users
How do I create a user in SQL Server 2000?

Answer Wiki

Thanks. We'll let you know when a new response is added.

Logins are created using the sp_addlogin stored procedure in the master database.

exec sp_addlogin @loginame='NewLoginName',
@passwd='The Password',
@defdb='Default Database Name', --Optional
@deflanguage='Language' --Optional

To grant a user rights into the database you then need to go into that database and use the sp_adduser command.

exec sp_adduser @loginame='NewLoginName',
@name_in_db='NewUserName',
@grpname='A database Group you want to put the user into' --optional

Be sure to read up on the differences between Logins and Users.

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Denny Cherry
    Check out my SQL Server blog "SQL Server with Mr Denny" for more SQL Server information.
    66,010 pointsBadges:
    report
  • parmarthi
    How  we will create user in SQL Server 2000
    10 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following