Get all stored procedures from all databases in MS SQL server

If you want to get all definitions for all stored procedures in MSSQL server, you can try this nice statement:

Replace “[def” by the contents of the stored procedure if needed and replace “db” by a filter for the desired database names.

Thanks to (as usual) Stackoverflow.