sometime i have need to documented my Stored Procedured query often i'm using sp_helptext SPROC_NAME then copy paste the result in notepad and save it. It consume alot of time if u using alot SPROC found another way around using sqlcmd command, something like DECLARE @sql AS NVARCHAR(1000) SET @sql = 'sqlcmd -S (local) -d "DB_NAME" -q "sp_helptext SPROC_NAME" -o 'OUTPUT_FILE' exec master..xp_cmdshell @sql after some tweaking :D, i decided to wrap in SPROC /* =========================================================== Author: eRiCk WiDyA Description: Export SPROC syntax to text file Date: 10 Feb 2010 Usage: exec ExportSPROCToTextFile 'C:\', '[DB NAME]', 'sp_some%' Param: @FilePath : must exists first before run @DatabaseName : use [] @SPROCCriteria : SPROC name that contains those words =========================================================== */ CREATE PROC ExportSPROCToTextFile @FilePath AS NVARCHAR(50), @DatabaseName AS NV...
this is my personal web blog..anything that i do each day hopefully can get in this blog since i only able to write it if i have spare time at the office..(ky g kerja aj ya hahaa)