Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to find the source code in stored proc

Status
Not open for further replies.

hok1man

Technical User
Feb 16, 2008
102
0
0
Hi guys,

as title question..
I can execute the stored proc, but I would like to see what the stored proc does.

Thanks guys,
 
sp_helptext can be used to view the code within the proc.

Code:
exec sp_helptext YourProcedure

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

My Blog
 
Hi mrdenny,

yeah.. but it's not nicely read.
some character is all over the place
is there any way to view it nicely?
 
Put the window into text mode. That will format the code in the same that it was formatted when the procedure was created.

You can then copy and paste it into the edit window to get it colorized.

You can also right click on the procedure in the object explorer and select modify from the drop down menu. This will basically get you the same thing with the code in the edit window.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

My Blog
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top