Link to home
Start Free TrialLog in
Avatar of AXISHK
AXISHK

asked on

Grant read access to SQL Management Server

How to grant a user to have read access to all object in a MS SQL 2008 R2, including the stored procedure created by other ?

Tks
SOLUTION
Avatar of Haris Dulic
Haris Dulic
Flag of Austria image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You can give to an user the db_datareader role permission but this is only to read data (table and views). For stored procedure and functions you need to grant execute permission for each created object.
Avatar of AXISHK
AXISHK

ASKER

Can we use TSQL to loop through all the user defined SQL Procedure and grant it to a user ? There are over a hundred of procedures ...

Tks
use  GRANT EXECUTE ON SCHEMA::dbo TO USER
Avatar of AXISHK

ASKER

Tks, in case only need to explicitly grant few stored procedure to a user. How to achieve it ?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AXISHK

ASKER

Tks