For SQL Server 2000, by definition, any stored procedure that exists in 
the master database and begins with "sp_" is globally accessible.  From 
Books Online:
System Stored Procedures
Many of your administrative activities in Microsoft� SQL Server? 2000 are 
performed through a special kind of procedure known as a system stored procedure. 
System stored procedures are created and stored in the master database and have the 
sp_ prefix. System stored procedures can be executed from any database 
without having to qualify the stored procedure name fully using the 
database name master.
It is strongly recommended that you do not create any stored procedures 
using sp_ as a prefix. SQL Server always looks for a stored procedure beginning 
with sp_ in this order: 
1.      The stored procedure in the master database.

2.      The stored procedure based on any qualifiers provided (database name or 
owner).

3.      The stored procedure using dbo as the owner, if one is not specified. 
Therefore, although the user-created stored procedure prefixed with sp_ may exist in 
the current database, the master database is always checked first, even if the stored 
procedure is 
qualified with the database name.

Important  If any user-created stored procedure has the same name as a system 
stored procedure, the user-created stored procedure will never be 
executed.





[EMAIL PROTECTED]
04/03/2003 02:27 PM
Please respond to sql

 
        To:     SQL <[EMAIL PROTECTED]>
        cc: 
        Subject:        Global SP


Is there a way in SQL 2k to write a stored procedure in one place (master 
for
example) and have it accessible in any other location?

Michael Dinowitz
Master of the House of Fusion
http://www.houseoffusion.com


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=6
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=6
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

                        

Reply via email to