Monday, March 26, 2012

exec proc premission

Hi
I created a user called development in sql server 2005 and make it a member
of datareader,datewriter and ddladmin role. now I created a proc under that
development account. however when I try to exec that proc, its give a
permission denied error. How come? it was able to create proc, but not
exec, its there something I have to do?
thanksPermission denied on what object? Does the proc manipulate some table,
view or proc that the development user does not have permissions to
manipulate? Are there explicit deny permissions for the development
user on some objects in the DB? Can you post actual code and actual
error messages?
*mike hodgson*
http://sqlnerd.blogspot.com
paulixml wrote:

>Hi
>I created a user called development in sql server 2005 and make it a member
>of datareader,datewriter and ddladmin role. now I created a proc under tha
t
>development account. however when I try to exec that proc, its give a
>permission denied error. How come? it was able to create proc, but not
>exec, its there something I have to do?
>thanks
>
>|||hi
here what I did, I create the prc connected as development,
create proc [dbo].[getpivot1_prc]as
select * from pivot_tmp
then I try to exec it after I create, I get this
Msg 229, Level 14, State 5, Procedure getpivot1_prc, Line 1
EXECUTE permission denied on object 'getpivot1_prc', database 'cap2005',
schema 'dbo'.
thanks
"Mike Hodgson" <e1minst3r@.gmail.com> wrote in message
news:uRc3wnoaGHA.1200@.TK2MSFTNGP03.phx.gbl...
> Permission denied on what object? Does the proc manipulate some table,
> view or proc that the development user does not have permissions to
> manipulate? Are there explicit deny permissions for the development
> user on some objects in the DB? Can you post actual code and actual
> error messages?
> --
> *mike hodgson*
> http://sqlnerd.blogspot.com
>
> paulixml wrote:
>
>|||The db_ddladmin role allowed you to create the proc as a different user
(dbo) but since you explicitly stated the owner of that proc when you
created it, the development user is not the owner and therefore doesn't
have permissions to execute it. And being a memory of db_datareader,
db_datawriter & db_ddladmin does not imply execute permissions on that
new proc.
Either create the proc as development.getpivot1_prc (CREATE PROC
development.getpivot1_prc AS ...), which would make the development user
the owner of the proc and therefore imply execute permissions for the
development user, or explicitly grant execute permissions on that proc
to the development user or a role that that user is a member of (but you
can't change the permissions with the development user because
db_ddladmin does not allow you to run GRANT statements).
Why are you using the development user to create a proc owned by the dbo
user?
*mike hodgson*
http://sqlnerd.blogspot.com
paulixml wrote:

>hi
>here what I did, I create the prc connected as development,
>create proc [dbo].[getpivot1_prc]as
>select * from pivot_tmp
>then I try to exec it after I create, I get this
>Msg 229, Level 14, State 5, Procedure getpivot1_prc, Line 1
>EXECUTE permission denied on object 'getpivot1_prc', database 'cap2005',
>schema 'dbo'.
>thanks
>"Mike Hodgson" <e1minst3r@.gmail.com> wrote in message
>news:uRc3wnoaGHA.1200@.TK2MSFTNGP03.phx.gbl...
>
>
>

No comments:

Post a Comment