How to create a user in MSDE?

  • Thread starter Thread starter Terry Olsen
  • Start date Start date
T

Terry Olsen

I need to know how to create a user in MSDE. I can't seem to get the
syntax correct. I've tried several different variations such as the
following, but nothing seems to work.

CREATE USER user PASSWORD password
CREATE USER 'user' PASSWORD 'password'
CREATE USER user PASSWORD 'password'
CREATE USER user SET PASSWORD 'password'

Can't seem to find any references on google either. Can anyone help?
 
Terry Olsen said:
I need to know how to create a user in MSDE. I can't seem to get the
syntax correct. I've tried several different variations such as the
following, but nothing seems to work.

CREATE USER user PASSWORD password
CREATE USER 'user' PASSWORD 'password'
CREATE USER user PASSWORD 'password'
CREATE USER user SET PASSWORD 'password'

Can't seem to find any references on google either. Can anyone help?

1. Use "sp_addlogin" to add your login id (must be attached to master
database.

2. Use "sp_grantdbaccess" to grant your new login access to your
database.

3. Use "sp_addrolemember" to grant your new login its permissions.

All explained in "Books OnLine" and can be called from OSQL.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top