Re: Stored Procedures in the Master Database

From: Scott (scott2617_at_hotmail.com)
Date: 09/19/03


Date: Fri, 19 Sep 2003 09:36:55 -0700


I am creating the procedure under the security context of
sa in the master database. I tried qualifying the grant
statement with dbo.proc_name and executing in another
database and it did not work.

>-----Original Message-----
>Who owns the procedure?
>
>If you are indeed in the master database when you run
this GRANT, and the
>procedure is in master, then the reason is probably that
the owner of the
>proc must be specified. If it's not yours, you have to
list the owner:
>
>GRANT EXECUTE ON owner_name.proc_name TO public
>--
>HTH
>----------------
>Kalen Delaney
>SQL Server MVP
>www.SolidQualityLearning.com
>
>
>"Scott" <scott2617@hotmail.com> wrote in message
>news:00c001c37ec3$4c76ea50$a301280a@phx.gbl...
>> I have a stored procedure that I want to make available
to
>> all databases. I am trying to grant permissions with the
>> following command in the master database:
>>
>> GRANT EXECUTE ON storedprocedure TO public
>>
>> When I try to execute the stored procedure from another
>> database I get the error message:
>>
>> Server: Msg 2812, Level 16, State 62, Line 1
>> Could not find stored procedure 'storedprocedure'.
>>
>> Please advise on the correct syntax.
>>
>
>
>.
>



Relevant Pages

  • Re: Logon failed for user ". but only for membership tables in same database that other request wor
    ... I was able to log on to computer b and execute the stored procedure. ... was no error after I corrected the permissions for the user. ... I can access the stored procedure but I can not use membership.validateuser. ... You may use the GRANT statement to grant the EXECUTE permission for a ...
    (microsoft.public.sqlserver.security)
  • Re: Stored Procedures in the Master Database
    ... If you are indeed in the master database when you run this GRANT, ... GRANT EXECUTE ON owner_name.proc_name TO public ... > I have a stored procedure that I want to make available to ...
    (microsoft.public.sqlserver.security)
  • Accessing stored procedure with another role?
    ... I have a stored procedure that looks ... CREATE PROCEDURE UpdateUserRoles ... And I need that some users of the programm can execute ... GRANT Execute ON UpdateUserRoles to User as db_owner ...
    (microsoft.public.sqlserver.security)
  • Re: Stored Procedures in the Master Database
    ... GRANTS must be done in the local database. ... The GRANT or the EXECUTE? ... >>> I have a stored procedure that I want to make available ...
    (microsoft.public.sqlserver.security)
  • Re: SET IDENTITY_INSERT Privileges?
    ... on the stored procedure to get around this. ... stored procedure and the user has execute permissions on the ... How do I grant permission to a SET Statement?? ...
    (microsoft.public.sqlserver.security)