Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Global SP

Author  Topic 

yalgaar
Starting Member

43 Posts

Posted - 2006-02-26 : 09:22:51
Is there a way to write a SP for all database.

e.g. I see that I can use sp_databases SP in all databases.

How do I write my own SP which will be available in all databases?

The SP that I have is in a particular database, I cannot use it in other databases unless I manually write it in that too. Can I avoid this?

Thanks

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-02-26 : 09:39:22
create your stored procedure in master database. prefix with sp_

----------------------------------
'KH'

It is inevitable
Go to Top of Page
   

- Advertisement -