SSMS stopped loading my stored procedures after update

Today I installed version 13.0.15800.18 of Microsoft SQL Server Management Studio (SSMS) [2016-09-20, 16.4], and now it refuses to edit my stored procedures. I even tried a slightly older version on my other computer to make sure, and they open just fine there. I get the error:

enter image description here

  • Why does SQL Server query optimizer sometimes overlook obvious clustered primary key?
  • Handling Timeouts inside stored procedures
  • Resolve SSIS Package with Kingswaysoft error: Connection type “DynamicsCRM” is not recognized as a valid connection manager type
  • SQL Server compare results of two queries that should be identical
  • connect to sql server 2012 with node.js
  • How to concatenate multiple rows?
  • Script failed for StoredProcedure ‘xyz’. (Microsoft.SqlServer.Smo)

    Additional information:

    Syntax error in TextHeader of StoredProcedure ‘xyz’. (Microsoft.SqlServer.Smo)

    Some old posts (1, 2, 3) Online talk about this being caused by having nested comments before “ALTER PROCEDURE” (or just generally in the procedure somewhere). In my case, none of my scripts open after this most recent SSMS update. I viewed one of my simpler scripts on another computer with an older version of SSMS, and the only comment in the whole thing is a simple auto-generated comment that reads:

    /****** Object: StoredProcedure [dbo].[xyz] Script Date: 9/21/2016 12:55:48 PM ******/

    Has anyone else run into this problem after the 2016-09-20 update of SSMS, and has anyone got a solution?

    Update 1: lhsoftware‘s tip (below) of using Create To works for opening the procedures. I tried modifying one of the simple procedures to have absolutely no comments at all, and I still get the “script failed” error when trying to Modify it! I even checked this procedure afterward with sp_helptext, and indeed it contains no slashes (/) or stars (*) whatsoever.

    Update 2: Microsoft has officially rescinded the update, with the following message (found here):

    There is a known issue with the SSMS 16.4 release and we have rolled back the download to SSMS 16.3. We will update the download link when the issue has been resolved.

    If you have installed SSMS 16.4 and would like to revert to SSMS 16.3, you must uninstall SSMS 16.4 prior to installing SSMS 16.3.

    Update 3: The bug has been resolved in version 16.4.1 (13.0.15900.1). For me, both Modify and Alter To work again since installing 16.4.1.

  • Connect to MSSQL SERVER 2012 using php 5.2.6 on centos via dblib
  • Insert-update utf8 string sql server + codeigniter
  • How can I add data from DataTable to database table directly?
  • Using the 'Use' command, or equivilant to point to a different server
  • Using Full-Text indexing to crawl binary blobs
  • SQL Server - Find records that have appeared 3 times in last 30 days
  • 6 Solutions collect form web for “SSMS stopped loading my stored procedures after update”

    “Script Stored Procedure As > Create To” will work. And you can manually change it to Alter. jhipp’s suggestion works as well.


    “Script Stored Procedure As > Alter To” will return the same error as “Modify”

    Microsoft SQL team released an update (version 13.0.15900.1) that resolves this issue: (Download SQL Server Management Studio (16.4.1))

    Note that the workaround for version 13.0.15800.18: Tools -> Options -> SQL Server Object Explorer -> Scripting -> Convert user-defined data types to base types = True

    Is adding “EXECUTE AS CALLER” to stored procedures and scalar functions

    Once you install version: 13.0.15800.18 even if you uninstall and install an older version (Previous SQL Server Management Studio Releases) the problem continues

    It’s happening to me as well — it looks to be a common issue with the latest update.

    Somebody logged a bug for MS which has had some activity that you can follow here:

    A current workaround is to update Tools -> Options -> SQL Server Object Explorer -> Scripting -> Convert user-defined data types to base types = True, however this might have some unintended consequences.

    I’m currently using SSMS 2014 in the meantime. Hopefully they get a fix out quickly (though I’m not crossing my fingers).

    Microsoft is aware of the issue and released a quality version public release includes the fix

    Also, instead of Modifying the SP from SSMS, try scripting it as Alter To New Query Window.

    It’s a bug and I hope there will be a fix soon. The workaround I use is: Use the CREATE script option and change the CREATE to ALTER by yourself. Which is suggested here:

    MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.