KB4040539 - FIX: Error when using sp_execute_external_script stored procedure to insert data and specify @parallel value to 1 in SQL Server 2016

Symptoms

Consider the following scenario:

  • You create a table that contains an identity column.

  • You use the INSERT INTO statement to insert the execute sp_execute_external_script stored procedure to insert data into the table.

  • You specify the @parallel parameter value of the sp_execute_external_script stored procedure as1.

In this scenario, when you run the INSERT INTO statement, the query fails and you receive the following error message:

Msg 213, Level 16, State 7, Line 32
Column name or number of supplied values does not match table definition.

Resolution

This fix is included in Cumulative Update 5 for SQL Server 2016 Service Pack 1.

About SQL Server 2016 builds

Each new build for SQL Server 2016 contains all the hotfixes and security fixes that were included with the previous build. We recommend that you install the latest build for SQL Server 2016.

Workaround

To work around this issue, set the @parallel parameter value of the sp_execute_external_script procedure to 0.

Status

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

References

Learn about the terminology Microsoft uses to describe software updates.

Need more help?

Expand your skills
Explore Training
Get new features first
Join Microsoft Insiders

Was this information helpful?

Thank you for your feedback!

Thank you for your feedback! It sounds like it might be helpful to connect you to one of our Office support agents.

×