FIX: Access violation when a stored procedure is dropped before you execute END TRY section in SQL Server

Gäller för: SQL Server 2012 DeveloperSQL Server 2012 EnterpriseSQL Server 2012 Enterprise Core


Consider the following scenario:

• You have a stored procedure that contains a TRY…CATCH construct in Microsoft SQL Server.
• The stored procedure includes WITH RESULT SETS clause and is executed by the sp_prepare or sp_execute method.
• Before you execute END TRY section, the stored procedure is dropped. This causes a 2812 error that resembles "Could not find stored procedure <SP_Name>".

In this situation, the SQL Server crashes and generates an access violation (AV) that may eventually lead to the server shutdown. Additionally, a dump file is generated in the SQL Server error log folder.


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.


Learn about the terminology that Microsoft uses to describe software updates.