Knowledge - Details


Can't open sproc from SSMS
Date Added: 6/30/2017

When you try to Modify an existing stored procedure in Microsoft SQL Server Management Studio, you may get the error Syntax error in TextHeader of StoredProcedure, and it will not allow you to view the sproc. You may think the sproc is lost forever, but there is an easy workaround to get access to its code again:

Replace xxxxxxxxxxxxx with your sproc name:

sp_helptext N'xxxxxxxxxxxxx'

When you run that command, it will give you the sproc text. From there, you can hopefully fix the script and update it to fix the error.



Back to List