Home Forums SQL Server 2005 Administering Script all Stored procs for all databases on a server RE: Script all Stored procs for all databases on a server
ramadesai108
SSChampion
Points: 10609
More actions
December 9, 2010 at 12:06 pm
#1260724
Made a mistake. The last one did not work. What works is the following, but I also need database name with it. ANY IDEAS???
EXECUTE sp_msforeachdb 'select s.*, p.*
from ?.sys.sql_modules s
inner join ?.sys.procedures p
on s.object_id = p.object_id'