Re: Stored Procedures in the Master Database

From: Kalen Delaney (replies_at_public_newsgroups.com)
Date: 09/19/03


Date: Fri, 19 Sep 2003 09:04:09 -0700


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: Stored Procedures in the Master Database
    ... I tried qualifying the grant ... >If you are indeed in the master database when you run ... >> I have a stored procedure that I want to make available ... >> When I try to execute the stored procedure from another ...
    (microsoft.public.sqlserver.security)
  • Stored Proc wont compile in master
    ... compile in the master database. ... I get the following error message ... This stored procedure takes the above parameters and sends an e-mail. ... -- Replace MailServerName by the name or IP of your SMTP Server. ...
    (microsoft.public.sqlserver.programming)
  • Re: Microsoft JDBC Driver XA Problem
    ... MS SQL Server 2000 installation but with start type 'manual'. ... XA recovery, you have to add the EXEC permission to PUBLIC for the stored procedure xp_jdbc_recover in the master database. ...
    (microsoft.public.sqlserver.jdbcdriver)
  • Re: SSMS 2005 - Value does not fall within the expected range. (SqlMgm
    ... name as the Database Role the securables are shown. ... -- SCHEMA Restrictions ... GRANT CREATE PROCEDURE TO; ... -- Defined for each stored procedure need by Role. ...
    (microsoft.public.sqlserver.tools)
  • Stored Proc wont compile in master
    ... At a guess I would say your master database has a binary ... sensitive collation. ... >must be unique within a query batch or stored procedure. ... @iMsg, 'Configuration.Fields.Update', null ...
    (microsoft.public.sqlserver.programming)