SQL Server 2012 crashes with an access violation when you use the TRY…CATCH construct for bulk copy


Consider the following scenario:
  • You perform a bulk copy operation in SQL Server 2012.
  • The operation triggers a call to a common language runtime (CLR) function.
  • The CLR function executes a Transact-SQL statement that contains a TRY…CATCH construct.

In this scenario, SQL Server 2012 crashes and generates an access violation. Additionally, a dump file is generated in the SQL Server error log.


Update information

This issue is fixed in the following cumulative updates of SQL Server:
Cumulative Update 5 for SQL Server 2012 Service Pack 3
Cumulative Update 4 for SQL Server 2016

Recommendation: Install the latest cumulative update for SQL Server


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.

Article ID: 3184099 - Last Review: Jan 18, 2017 - Revision: 3

Microsoft SQL Server 2012 Developer, Microsoft SQL Server 2012 Enterprise, Microsoft SQL Server 2012 Enterprise Core, Microsoft SQL Server 2012 Standard