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

  • 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'