SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 grant DROP Procedure, drop fundtion permissions
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

bandi
Flowing Fount of Yak Knowledge

India
2218 Posts

Posted - 07/25/2013 :  07:05:24  Show Profile  Reply with Quote
Hi,

Please provide me the script to grant DROP/ALTER Procedure permissions to a particular role...

--
Chandu

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 07/25/2013 :  07:18:14  Show Profile  Reply with Quote
you can use GRANT function for that

http://msdn.microsoft.com/en-us/library/ms188371.aspx

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 07/25/2013 :  07:24:00  Show Profile  Reply with Quote
the permission required are CONTROL on the procedure for dropping and ALTER PROCEDURE permission for modifying

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

bandi
Flowing Fount of Yak Knowledge

India
2218 Posts

Posted - 07/25/2013 :  07:54:11  Show Profile  Reply with Quote
quote:
Originally posted by visakh16

the permission required are CONTROL on the procedure for dropping and ALTER PROCEDURE permission for modifying


Can you please give me the script...
Shall I use like the below:
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE PROCEDURE, CONTROL, EXECUTE ON DATABASE::DBName TO RoleName;

What are the specific functionalities of CONTROL permission
Note: CONTROL allows the user to create any objects (TABLE, and so on)..
I want only the above permissions and CREATE/ALTER/DROP PROCEDURE/FUNCTION only... How to achieve this...?
--
Chandu

Edited by - bandi on 07/25/2013 08:24:58
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 07/26/2013 :  02:18:20  Show Profile  Reply with Quote
did you try something like?

GRANT ALTER ON OBJECT::yourschema.procedurename TO Rolename;




------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

bandi
Flowing Fount of Yak Knowledge

India
2218 Posts

Posted - 07/29/2013 :  00:26:09  Show Profile  Reply with Quote
quote:
Originally posted by visakh16

did you try something like?

GRANT ALTER ON OBJECT::yourschema.procedurename TO Rolename;



Sorry for the late reply....
With the above method we have to give ALTER permission to each procedure ( I think looks like the manual process).
For my production database we are about to set limited privileges to database user... How can we grant permission to future procedures...?

One more thing is I'm not able to CREATE new PROCEDURE even though given CREATE PROCEDURE privilege to user... In this case the following error arises:
Msg 2760, Level 16, State 1, Procedure testProc, Line 3
The specified schema name "dbo" either does not exist or you do not have permission to use it.

If I grant permission on schema "dbo", then we can able to do any DDL operation on the database... ( Actually it shouldn't allow for my DB)..
can you please suggest any alternative methods..?

--
Chandu

Edited by - bandi on 07/29/2013 01:07:13
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000