What is the minimum permission required to execute a stored procedure
in DBAdd the login as a user in the database and then use
GRANT EXECUTE ON procname TO username
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"SQL novice" <balacr@.gmail.com> wrote in message
news:1129793471.910029.122070@.g43g2000cwa.googlegroups.com...
> What is the minimum permission required to execute a stored procedure
> in DB
>|||Execute rights.
GRANT EXECUTE ON <objectname> to <Username>
Refer to the BOL.
HTH, Suessmeyer.|||Thanks for your answers.
But can I give permission to all the stored procedures some other way?|||You will have to write a small script that does it for you.
--
HTH,
SriSamp
Email: srisamp@.gmail.com
Blog: http://blogs.sqlxml.org/srinivassampath
URL: http://www32.brinkster.com/srisamp
"SQL novice" <balacr@.gmail.com> wrote in message
news:1129798105.010965.108580@.z14g2000cwz.googlegroups.com...
> Thanks for your answers.
> But can I give permission to all the stored procedures some other way?
>|||And the script is:
============
You can loop through a cursor and execute the commands:
http://www.codeproject.com/database/T-SQL.asp
or you execute this scripts and execute the output in QA:
DECLARE @.GroupORRole VARCHAR(500)
SET @.GroupORRole = 'Bob'
SELECT 'GRANT EXECUTE ON ' + ROUTINE_NAME + ' TO ' + @.GroupORRole +
CHAR(10) + CHAR(13) + 'GO' + CHAR(10) + CHAR(13)
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_TYPE = 'PROCEDURE' --for all Procedures
HTH; Jens Suessmeyer.|||Try
SELECT 'GRANT EXECUTE ON '+ROUTINE_NAME+' TO John'
FROM INFORMATION_SCHEMA.ROUTINES
WHERE OBJECTPROPERTY(OBJECT_ID(ROUTINE_SCHEMA+
'.'+ROUTINE_NAME),
'IsMsShipped')=0
"SQL novice" <balacr@.gmail.com> wrote in message
news:1129798105.010965.108580@.z14g2000cwz.googlegroups.com...
> Thanks for your answers.
> But can I give permission to all the stored procedures some other way?
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment