Re: sql server role (read only accnt for a user)

From: Tom Moreau (tom_at_dont.spam.me.cips.ca)
Date: 09/19/05


Date: Mon, 19 Sep 2005 07:09:22 -0400

Proceed as follows:

1. Add the login to SQL Server, using sp_grantlogin.
2. For the database in question, add the user, using sp_grantdbaccess.
3. Add the user to the db_datareader role, using sp_addrolemember.

-- 
   Tom
----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON   Canada
www.pinpub.com
.
"pleo" <pleo_el@hotmail.com> wrote in message 
news:OAM4$fQvFHA.3452@TK2MSFTNGP14.phx.gbl...
A user just wants to connect current sql database for query. No need to
modify anything or admin. What sql server accnt role should I create for
this user? Can I do that and please provide the steps. Thanks a lot


Relevant Pages

  • Idiomatic Expressions to Operating System Architecture: Transforming Rigids
    ... <Subject: Re: Idiomatic Expressions to Operating ... <endpoint during a single session * DATABASE + by ... <statements is a new feature of SQL Server 2005. ...
    (sci.math)
  • Re: System Administrator Implied Permissions
    ... > sa login, it assigns it the System Administrator fixed ... > Now, given this, why does SQL Server ... in each database is always a member of the public and db_owner roles. ... Other sysadmin role members have the exact same ...
    (microsoft.public.sqlserver.security)
  • Re: No db access after publishing web site
    ... GRANT UPDATE TO ... If I detach and attach this database on a different PC (according that PC ... Cannot open database "pago" requested by the login. ... Are you detaching/attaching the SQL Server Express database correctly ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: cannot login to the db after...
    ... Jasper Smith (SQL Server MVP) ... I have created a new database, "db_1", using the "sa" ... I then created a new login, "sqluser1" and gave ...
    (microsoft.public.sqlserver.security)
  • Re: Cant view merge agent properties (trying again)
    ... In the List of Actions for the Snapshot Agent History I see this repeated: ... every single database listed. ... So, just now, I went to computername\Administrator Login ID (because it's ... On the computer running SQL Server, ...
    (microsoft.public.sqlserver.replication)