Symptoms
Consider the following scenario:
-
You enable change tracking on a database in Microsoft SQL Server 2012.
-
You run a query that uses the system change tracking function CHANGE_TRACKING_CURRENT_VERSION().
-
SQL Server attempts to use a parallel query execution plan to execute the query.
In this scenario, an access violation occurs, and you may receive the following error message:
Msg 0, Level 11, State 0, Line 0
A severe error occurred on the current command. The results, if any, should be discarded.
Cause
The issue occurs because the CHANGE_TRACKING_CURRENT_VERSION() function cannot be executed correctly in parallel.
Resolution
The issue was first fixed in the following cumulative update of SQL Server.
Cumulative Update 6 for SQL Server 2012 SP1 /en-us/help/2874879
Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. Check out the latest cumulative updates for SQL Server:
Status
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Workaround
To work around the issue, use the OPTION (MAXDOP 1) hint in the query.