? about users

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Brian

    ? about users

    How do I setup a user to access the my sql server database. I do not want
    to give him the admin account login.


  • Erland Sommarskog

    #2
    Re: ? about users

    Brian (brian@work) writes:
    How do I setup a user to access the my sql server database. I do not want
    to give him the admin account login.
    It would certainly help to know more about your database and your server
    and the context it exists in. And what you want the user to do in the
    database.

    But assuming that your user has a Windows login to connect with you would
    do:

    CREATE LOGIN [Domain\Name] FROM WINDOWS;
    go
    USE db;
    go
    CREATE USER [Domain\Name]

    Then you would assign the user the permissions he need. (Which I can't
    detail, because I don't know what he needs.)

    If you are in a workgroup, it's probably better to use an SQL login.

    And, oh, the above syntax is for SQL 2005; another thing you did not detail
    was the SQL Server version.


    --
    Erland Sommarskog, SQL Server MVP, esquel@sommarsk og.se

    Books Online for SQL Server 2005 at

    Books Online for SQL Server 2000 at

    Comment

    Working...