Sql Query to Get the Text of all the stored procedure and Views


Sql Query to Get the Text of all the stored procedure and Views with out using sp_helptext

Query to get the Text of all the Stored Procedures


SELECT Text AS StoredProcedureTexts
FROM SysComments
WHERE ID
IN
(
SELECT Id
FROM SysObjects
WHERE XType = 'P'
}


Query to get the Text of all the Views


SELECT Text AS ViewTexts
FROM SysComments
WHERE ID
IN
(
SELECT Id
FROM SysObjects
WHERE XType = 'V'
}


Comments

Author: Pal (Parthiv) Patel31 Aug 2010 Member Level: Gold   Points : 1

-----------1111111111-------------------
hey
this one is awesome code snippet
keep it up
put good codes and earn money and points
------------!!!!!!!!!!-------------------



  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: