Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Create Login with Select or Execute Permission Expand / Collapse
Author
Message
Posted Monday, April 16, 2007 8:34 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, April 16, 2007 8:26 AM
Points: 2, Visits: 1

Hi All,
I want to create login with following points

1) User can execute only SELECT statements from query analyser , no DML statements

Please help me for same.

Thanking you in advance.

 

Post #358616
Posted Tuesday, April 17, 2007 8:56 AM
SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 9:14 AM
Points: 4,056, Visits: 5,181

1. create a login, preferably one that uses Windows authentication
2. create a database user by granting database access to the login
3. give the user SELECT permission to the objects you want the user to       access or add the user as a member of the db_datareader fixed database role if you want the user to access all tables in a database

You can do all of this in Enterprise Manager or use system stored procedures:
sp_grantlogin, sp_grantdbaccess.

By the way, you'll get more responses if you post in the SECURITY forum rather than this one, which is a testing forum.

Greg



Greg
Post #358978
Posted Wednesday, April 18, 2007 7:12 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Wednesday, December 11, 2013 1:22 PM
Points: 56, Visits: 130
Making the login db_datareader on the desired database would work as well, wouldn't it?
Post #359224
Posted Wednesday, April 18, 2007 10:03 AM
SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 9:14 AM
Points: 4,056, Visits: 5,181

Yeah, if you want the user to be able to read all the user tables in the database.

Greg



Greg
Post #359290
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse