I’m perverted in the sense that I hate exploring code and database structures in a tree view and I’d much prefer using something like the Powershell for that. Most of the stuff I need to do in SQL is exploring, i.e. looking at what columns does a table have or what does a particular stored procedure do.
Looking at table columns is as easy as ls’ing the columns directory of a table, but how would I get the contents of a stored procedure?
If you want to run this on Sql Server 2008 then here is a Cmdlet that will help you with it.
If you are using Sql Server 2005 then here is a page with a script to help you with this.
[EDIT] You may use the SP sp_helptext to see the contents of the required stored procedure.