Re: create a global procedure

From: Adam Machanic (amachanic_at_air-worldwide.nospamallowed.com)
Date: 03/19/04


Date: Fri, 19 Mar 2004 11:01:57 -0500

If you don't qualify by owner you will force more scans of the procedure
cache. Turn on Profiler and watch for the SP:CacheMiss event, then qualify
by owner and watch it disappear...

"David Browne" <davidbaxterbrowne no potted meat@hotmail.com> wrote in
message news:uTJRqncDEHA.3408@tk2msftngp13.phx.gbl...
>
> "Aaron Weiker" <msnews.SPAM@aaronweiker.com> wrote in message
> news:uByNKjcDEHA.1604@TK2MSFTNGP11.phx.gbl...
> > joe wrote:
> >
> > > How do i create a procedure in master db which can be recognized in
> every
> > > other dbs.
> >
> >
> > any time a procedure is prefixed with sp_ it is first looked for in the
> > master database. So if you wanted a "global" procedure, just place it
> > there. I always recommend however that you always fully qualify object
> > names. (master.dbo.sp_help as apposed to sp_help)
> >
>
> Hmm. I always recommend that you never fully qualify object names.
>
> In my experience fully qualifing object names inevitably leads to a mess
of
> objects pointing to objects in other databases when you try to move
objects
> around.
>
> Use local names to refer to local objects.
>
> David
>
>