469,148 Members | 1,276 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,148 developers. It's quick & easy.

Adding Execute permissions on Stored Procedures

How can i add Execute permissions on the Stored Procedures under the
created user permission iusing SQLDMO ?

Jul 23 '05 #1
1 3217
hi,
ar********@hotmail.com wrote:
How can i add Execute permissions on the Stored Procedures under the
created user permission iusing SQLDMO ?


Dim oProcedure As SQLDMO.StoredProcedure
Dim oServer As SQLDMO.SQLServer
' connect to the server, etc....

'get a pointer to the procedure..
Set oProcedure = oServer.Databases("Pubs").StoredProcedures("byroya lty")
'grant EXEC permission to an existing user
oProcedure.Grant SQLDMOPriv_Execute, "user_name"

Set oProcedure = Nothing
Set oServer = Nothing

--
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtm http://italy.mvps.org
DbaMgr2k ver 0.10.0 - DbaMgr ver 0.56.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
--------- remove DMO to reply
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by EzekiŽl | last post: by
1 post views Thread by HD | last post: by
8 posts views Thread by Jiggaz | last post: by
7 posts views Thread by JIM.H. | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.