Message=A severe error occurred on the current command. The results, if any, should be discarded.

Sudhakar Paraniselvan 0 Reputation points
2026-02-03T06:06:13.4133333+00:00

Hi,

There is an Failure in my Azure Datafacttory for a particular table with the below error message.

Failure happened on 'Source' side. ErrorCode=UserErrorWriteFailedFileOperation,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=The file operation is failed, upload file failed at path: '****'.,Source=Microsoft.DataTransfer.Common,''Type=Microsoft.Data.SqlClient.SqlException,Message=A severe error occurred on the current command. The results, if any, should be discarded.,Source=Framework Microsoft SqlClient Data Provider,'

SQL Server | Other
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Q&A Assist
    2026-02-03T06:06:25.98+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The error message you are encountering, "A severe error occurred on the current command. The results, if any, should be discarded," typically indicates a critical issue with the SQL command being executed. This can happen for a variety of reasons, including:

    1. Network Issues: Temporary network problems can cause commands to fail.
    2. Resource Limitations: The SQL Server might be under heavy load or running out of resources (like memory or disk space).
    3. Corruption: There may be corruption in the database or the specific table being accessed.
    4. Timeouts: The command may be timing out due to long-running operations.

    To troubleshoot this issue, consider the following steps:

    • Check SQL Server Logs: Look for more detailed error messages in the SQL Server error logs.
    • Review Resource Usage: Monitor the server's CPU, memory, and disk I/O to ensure it is not overloaded.
    • Test the Command: Try running the command directly in SQL Server Management Studio (SSMS) to see if it reproduces the error.
    • Check for Updates: Ensure that your SQL Server and Data Factory are updated to the latest versions, as updates may contain fixes for known issues.

    If the problem persists, you may want to contact Microsoft support for further assistance.

    0 comments No comments

  2. Lakshmi Narayana Garikapati 675 Reputation points Microsoft External Staff Moderator
    2026-02-03T11:41:16.9533333+00:00

    Hi Sudhakar Paraniselvan,

    Thanks for sharing the error details. Based on the message:

    Failure happened on 'Source' side. ErrorCode=UserErrorWriteFailedFileOperation

    Message=The file operation is failed, upload file failed at path:

    SqlException: A severe error occurred on the current command. The results, if any, should be discarded.

    This indicates the issue originates from the SQL Server source rather than the destination. A few common causes to check:

    • SQL Server health: Run DBCC CHECKDB to confirm database integrity. Review SQL error logs for resource pressure or corruption warnings. Try executing the same query manually in SSMS to see if it fails outside Data Factory.
    • Integration Runtime stability: Ensure the self-hosted IR has consistent connectivity to both SQL Server and the target storage. Check IR logs for network interruptions or resource exhaustion.
    • Destination path validation: Confirm the container/folder exists, permissions are correct, and quotas are not exceeded.
    • Pipeline configuration: If the dataset is large, consider enabling partitioning or reducing batch size. Schema mismatches can also trigger failures.

    Next steps you can try:

    1. Test with a smaller dataset from the same table to isolate whether the issue is data volume related.
    2. Attempt writing to a different destination path to rule out storage issues.

    Hope This Help!

    Thanks,

    Lakshmi.

    0 comments No comments

  3. Erland Sommarskog 131.9K Reputation points MVP Volunteer Moderator
    2026-02-03T22:15:54.5+00:00

    The error message suggests one of two:

    1. A severe error occurred in SQL Server which caused the connection to be closed. Such bugs are typically tokens of bugs in SQL Server.
    2. A severe error occurred in the client API. Such errors are often due to SQL Server sending malformed TDS to the client.

    You can see the distinction between these two if you look at the Severity property in your error handler. It's typically 20 if the error occurred in SQL Server and 11 if it was in the client API.

    Assuming that it is an SQL Server error, and this is something else than Azure SQL Database (that is, on-prem, SQL Server in an Azure VM or Azure SQL Managed instance), you can check the SQL Server errorlog, where you are likely to find a stack dump. Not that you will be able to do much with it - that requires access to the source code.

    Running DBCC on the database, as Lakshmi suggested, is not a bad idea, as the root cause may be corruption.

    But if DBCC comes out clean, you are best of opening a support case. This is difficult to solve on your own.

    What does "SELECT @@version" return, by the way?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.