Where to create procs  
Author Message
tf19





PostPosted: Mon Nov 10 11:09:59 CST 2003 Top

SQL Server Developer >> Where to create procs

Hi all,

Where would be the best place to create store procedures that are used for administration? Like a sp_who with a diferent display? Why? Of course not in master right?

SQL Server306  
 
 
Adam





PostPosted: Mon Nov 10 11:09:59 CST 2003 Top

SQL Server Developer >> Where to create procs I create mine in master.... Can't think of anything wrong with doing that.




> Hi all,
>
> Where would be the best place to create store procedures that are used for
administration? Like a sp_who with a diferent display? Why? Of course not in
master right?


 
 
Kalen





PostPosted: Mon Nov 10 11:26:09 CST 2003 Top

SQL Server Developer >> Where to create procs Hi David

If you want your proc to be used as a system proc, available from any
database, then it needs to be in master. Otherwise, you should not use the
sp_ prefix. SQL Server always looks in master first for any proc starting
with sp_

--
HTH
----------------
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com




> Hi all,
>
> Where would be the best place to create store procedures that are used for
administration? Like a sp_who with a diferent display? Why? Of course not in
master right?


 
 
Louis





PostPosted: Mon Nov 10 14:48:04 CST 2003 Top

SQL Server Developer >> Where to create procs We always create them in master, but change the prefix slightly, like sp__
(two undersores,) or sp_cn_ (company name) to differentiate them from the
ones that Microsoft puts in there.

--
----------------------------------------------------------------------------
-----------

Compass Technology Management

Pro SQL Server 2000 Database Design
http://www.apress.com/book/bookDisplay.html?bID=266

Note: Please reply to the newsgroups only unless you are
interested in consulting services. All other replies will be ignored :)



> Hi all,
>
> Where would be the best place to create store procedures that are used for
administration? Like a sp_who with a diferent display? Why? Of course not in
master right?