Was: How to back up selected stored procedure using query
I would like to backup 10 out of 200 stores procedures over command line ( In SQL Server Management Studio). Is there an easy way to do it?
Right now I am using the Database->Tasks->Generate Scripts option, that takes me through a series of dialog where I choose the SP that I want to export. I would like to make this process easy, so I don’t have to do it all over again.
Note: By Export I mean just print it on the screen so I can copy it and save it in a text file.
How about using INFORMATION_SCHEMA.Routines ?
EDIT
It sounds like you might want something like this to include the LAST_ALTERED date and Definition in a result set.