SQL Server 2019 DB Backups to Network Fail with Event ID 3041

RPC2020 11 Reputation points
2020-09-14T18:34:11.893+00:00

In SQL Server 2019 specifically, I can't backup to network shares and receive event ID 3041, 3624, and 17066. Per those messages, I've ran DBCC CHECKDB and all databases are fine. I can backup to the local drive without issue. I am running the SQL Server Agent with all the defaults and it logs on as "NT SERVICE\SQLSERVERAGENT". On the remote share, share permissions are everyone=full control, and I have verified that the computer account in question has full control of the share. I know that it can read and write to the directories as I see it logging on successfully in the event viewer and if the backup folders don't exist, it creates the folder structure and the owner is the computer account in question. I've worked with multiple versions of SQL and backed up to network shares before, so I'm fairly certain I have configured everything correctly and so I'm starting to lean towards this is a bug.

A system assertion check has failed. Check the SQL Server error log for details. Typically, an assertion failure is caused by a software bug or data corruption. To check for database corruption, consider running DBCC CHECKDB. If you agreed to send dumps to Microsoft during setup, a mini dump will be sent to Microsoft. An update might be available from Microsoft in the latest Service Pack or in a Hotfix from Technical Support.  

SQL Server Assertion: File: <mediaWrite.cpp>, line=603 Failed Assertion = '(m_pWriteBuffer->GetCurrentSize ()% GetBlockSize ()) == 0'. This error may be timing-related. If the error persists after rerunning the statement, use DBCC CHECKDB to check the database for structural integrity, or restart the server to ensure in-memory data structures are not corrupted.  

24487-serverpermissions.jpg

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,494 questions
{count} votes

4 answers

Sort by: Most helpful
  1. Peter Babic 21 Reputation points
    2020-09-14T19:11:00.117+00:00

    What is the size of DB? If it is too big can you try with smaller size DB?


  2. Erland Sommarskog 120.2K Reputation points MVP
    2020-09-14T21:47:58.97+00:00

    An assertion error indicates a bug in the product. They have a check for a condition which is supposed to true at that point and if it is not, they realise that they have lost ocntrol.

    First check that you are on CU7, the latested cumulative update of SQL Server. If you get the error with CU7, open a case with Microsoft.

    (It could be that the operation you are trying should fail. But it should not fail with that error message. That's a bug.)


  3. Shashank Singh 6,251 Reputation points
    2020-09-15T04:27:43.423+00:00

    Since the checkdb went fine and also you are able to backup on local storage attached I would say that the network storage has some problem look at the 2nd error message.

    SQL Server Assertion: File: <mediaWrite.cpp>, line=603 Failed Assertion = '(m_pWriteBuffer->GetCurrentSize ()% GetBlockSize ()) == 0'. This error may be timing-related. If the error persists after rerunning the statement, use DBCC CHECKDB to check the database for structural integrity, or restart the server to ensure in-memory data structures are not corrupted.

    This shows that SQL Server is not able to write data to particular block. I would suggest you to gt in touch with storage team to check about this network shared storage.

    0 comments No comments

  4. RPC2020 11 Reputation points
    2020-12-14T15:26:16.453+00:00

    Just posting an update, it is still happening as of CU8. I have also even tried changing the SQL Server Agent service account to a domain administrator with backup operator privileges, and still the same error.


Your answer

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