Wednesday, March 21, 2012

How to create an object without being the owner of the schema

Hi

I have a schema called Accounts owned by fred

User bob has create procedure permission as follows:

grant create procedure to bob

bob would like to create a procedure in schema Accounts.

When he issues create proc Accounts.sp_proc.... it fails with:

Msg 2760, Level 16, State 1, Procedure sp_proc, Line 3
The specified schema name "Accounts" either does not exist or you do not have permission to use it.

What permission do I need to grant bob in order to allow this?

Thanks

The answer is in Books Online; look for the Permissions section in the CREATE PROCEDURE article:

http://msdn2.microsoft.com/en-us/library/ms187926(SQL.90).aspx

Thanks
Laurentiu

|||

Thanks Laurentiu, I couldn't see the wood for the trees.

In case anyone else is interested I needed to run:

GRANT ALTER ON SCHEMA::Accounts TO bob

sql

No comments:

Post a Comment