November 4, 2008 at 12:49 am
select * from sysobjects WHERE object_id = OBJECT_ID(N'[dbo].SP_anything]') ... is used to find a particular SP in one database at a time.....but i need to find the SP in all the databases atone ,...because we have so many databases in our server....
November 4, 2008 at 1:44 am
select * From master.sys.All_objects where type = 'p' etc
November 4, 2008 at 3:27 am
Hi AnzioBake ,
Thank you for the quick reply ...but it is not working (checked in the sql server 2005)........Can u check it once. (or) is there any other query to do this......
pls help me out
November 4, 2008 at 4:23 am
A bit more work but nothing major
November 4, 2008 at 10:42 pm
thank u 🙂
November 5, 2008 at 8:22 am
A bit shorter version of the code by Anzio
sp_MSforeachdb 'if ''?'' NOT IN (''tempdb'',''master'',''model'',''msdb'')
SELECT ''?'',Name Collate SQL_Latin1_General_CP1_CI_AS From [?].sys.all_Objects where type = ''p''
AND [Name] NOT LIKE ''sp_%'' -- excludes system proc
'
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply