How to View SQL Server Object Code Easily with sp_showcode


 

sp_helptext has served SQL Server DBAs for years, but it has its very obvious – and many – limitations: broken lines, missing triggers, no help with encrypted objects, to name just a few. That’s where sp_showcode comes in…

Why DBAs Need Better Code Retrieval

If there’s one thing I did a lot over the years as a SQL Server DBA, it was working with the likes of procedures and views. Straight away with SQL Server I learned to create procedures and, later, other types of objects, such as functions and triggers – objects that have code saved in the database.