Print All Objects(View, Sproc, Function) of Database in SQL Server

Written by Sotra on March 3, 2009 – 3:20 pm

In SQL Server, it has many system store procedures that are so interesting. It is really easy for developers to view script from  sproc, view, and function by SQL server tool.

However, some of them want to know how to write script to print objects to text.

In this example you will see i will print all functions from one database by using sp_HelpText.

sp_helptext

when you see this error “The query has exceeded the maximum number of result sets that can be displayed in the results grid. Only the first 100 result sets are displayed in the grid.

because you are using results to grid, so please change to results to text or results to file.

Tags:
Posted under SQL Server |

One Comment to “Print All Objects(View, Sproc, Function) of Database in SQL Server”


  1. I Shed Thirty Póunds in Only a Month Says:

    Hi, cool post. I have been thinking about this issue,so thanks for writing. I’ll likely be coming back to your posts. Keep up the good posts

Leave a Comment