Меню

Ms sql ошибка 3041 серьезность 16 состояние 1

  • Remove From My Forums
  • Question

  • ISSUE: Error: 3041, Severity: 16, State: 1. Check the backup application log

    All was runing fine before that.

    Our transaction log Native backup job suddenly started failing on SQL Server 2005 sp3 with version 9.0.4226.

    ERRORLOG :

    ==============================================================

    20091201 17:05:33.150 Backup       Error: 3041, Severity: 16, State: 1.

    20091201 17:05:33.150 Backup       BACKUP failed to complete the command BACKUP LOG xTract. Check the backup application log for detailed messages.

    ==============================================================

    • Moved by

      Wednesday, December 2, 2009 3:18 AM
      (From:MSDN, TechNet, and Expression Profile Feedback)

    • Changed type
      Naomi N
      Monday, November 28, 2016 5:23 AM
      question

SQL Server 2016 Developer SQL Server 2016 Enterprise SQL Server 2016 Enterprise Core SQL Server 2016 Standard SQL Server 2017 on Windows (all editions) More…Less

Symptoms

When you back up a virtual machine (VM) with non-component based backup, you notice that the SQL Writer Service does not skip backing up Always On basic availability group databases on secondary. Additionally, you may receive the error log and SQL Writer Service trace that resemble the following:

Error log

Error: 3041, Severity: 16, State: 1.
BACKUP failed to complete the command BACKUP DATABASE myDatabase. Check the backup application log for detailed messages.
Error: 3041, Severity: 16, State: 1.
BACKUP failed to complete the command BACKUP DATABASE master. Check the backup application log for detailed messages.
Error: 18210, Severity: 16, State: 1.
BackupVirtualDeviceFile::PrepareToFreeze:  failure on backup device ‘{DeviceId}1′. Operating system error 995(The I/O operation has been aborted because of either a thread exit or an application request.).
Error: 3041, Severity: 16, State: 1.
BACKUP failed to complete the command BACKUP DATABASE model. Check the backup application log for detailed messages.
Error: 18210, Severity: 16, State: 1.
BackupVirtualDeviceFile::PrepareToFreeze:  failure on backup device ‘{DeviceId}2′. Operating system error 995(The I/O operation has been aborted because of either a thread exit or an application request.).
Error: 3041, Severity: 16, State: 1.
BACKUP failed to complete the command BACKUP DATABASE msdb. Check the backup application log for detailed messages.
Error: 18210, Severity: 16, State: 1.
BackupVirtualDeviceFile::PrepareToFreeze:  failure on backup device ‘{DeviceId}3′. Operating system error 995(The I/O operation has been aborted because of either a thread exit or an application request.).

SQL Writer Service log


FilePath: **  SQLWRITER TRACING STARTED — ProcessId: #, ContextId: #
FilePath: **  N.B. NOT INITIALIZED BY THE CONSTRUCTOR
FilePath: **  Current time: #
FilePath: **  Command-line: «CommandLine«
FilePath: **  Product version: ProductVersion
FilePath: DoesInstanceSupportRANUUserInstances: Instance MSSQL13.MSSQLSERVER Edition: Standard Edition

Status

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

Resolution

The issue is fixed in the following cumulative updates for SQL Server:

  • Cumulative Update 16 for SQL Server 2017

  • Cumulative Update 7 for SQL Server 2016 Service Pack 2

About cumulative updates for SQL Server:

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:

  • Latest cumulative update for SQL Server 2017

  • Latest cumulative update for SQL Server 2016

References

Learn about the terminology that
Microsoft uses to describe software updates.

Need more help?

Please, Take a look here:
How to troubleshoot «Msg 3041» in SQL Server

Excerpt from page:

Message 3041 is a generic report about the backup failure. To
understand the cause of the error and resolve it, you must use the SQL
Server Error log entries that occur before the 3041 event entry.
Typically, 3041 is preceded by a detailed error message that states
the real reason for the backup failure. The detailed error messages
are written only to the SQL Server error log and to the client
application. The detailed message is not reported in the Application
log in Windows.

Update (After reading @dezso comment)
I’ve seen the «extra error» reported, but I’m not sure that they are related to the backup error. The backup error is dated at 20:31:06, but the «extra error» are dated at 17:53:27, so the extra error happened about 2 hours and 40 minutes before the actual backup error. And these extra error are related to a logon issue.

I don’t think that a logon issue happening at 17:53:27 could result in a backup failing at 20:31:06. So a think that the backup error, and that the «extra error» are unrelated.

I also don’t think that a generic error happening at 17:53:27 could result in a backup failing at 20:31:06 (unless the DB is really big).
@Arviddk report that «my SQL Server backup keeps failing on a lot of the databases» I think it’s safe to assume that «a lot» mean more than 10 DB.
So I think that if a single backup of a single DB take more than 2 hours and 40 minutes, you cant have 10 or 20 DB like that on a single server… or your server will spend it’s life doing only backup. So I assumed that the single backup take a lot less than 2 hours and 40 minutes, so I think that the backup error and the extra error are not related.

And the last «cachestore flush / ‘Bound Trees'» error reported is dated at 06-11-2012 20:30:11, so it’s something happened after the backup error. Anyway a problem related to the cache shouldn’t result in an error (event if it can slow down something).

Some questions
Some questions that could help identify the issue:

  • How much time does it take a FULL backup to execute?
  • How much time does it take a DIFF backup to execute?
  • Does the error happen only on DIFF backup?
  • Which percentage of backup does fail? (1%? 10% 50%)
  • Maybe you can try to only do FULL backup to check if it’s an issue related to the DIFF backup? (I’ve never done any DIFF backup on SQL Server, I don’t have experience with them)

According to the MS website in the SQL Server log there should be some others error related to the failed backup, but I’m expecting something more near, in time, to the time at which the backup is failing.

Summary: Microsoft SQL Database often gets stuck in nasty errors that can be difficult to resolve. In this article, we’ll focus on SQL database error 3041, what it is, reasons for database error 3041, and how to resolve it.

SQL Server 2017 has been developed with a lot of advanced features over its predecessors. It supports ANSI SQL, which is the standard SQL Language used worldwide. It is also called as MSSQL, and it has various editions like Enterprise, Standard, Workgroup, and Express. SQL Server’s main interface tool is SQL Server Management Studio, and it supports both 32-bit as well as 64-bit environments.

Despite having a rock-solid foundation and an impressive feature set, SQL Server Database often gets stuck in errors, some of which may be difficult to handle even for experienced DBAs. One such error is SQL database error 3041.

SQL Server error 3041 occurs when there is a backup failure. It might happen with the entire database backup or with specific parts of the database. It appears when the database backup is being generated. The error message provides a description of the backup failure in the error log and to the client application.

Error: 3041, Severity: 16, State: 1.
BACKUP failed to complete the command BACKUP DATABASE master. 
Check the backup application log for detailed messages.

To understand the exact cause of the error, you will have to go through the SQL server error log entries which occurred before the 3041 error came up.

[Note]: The detailed error message does not get reported in the Application log.

Reasons behind SQL Server error 3041

Various reasons behind this error are listed below.

  • Running a third-party application to back up SQL Databases can cause this error. Applications like LiteSpeed and Unitrends can cause error 3041 as they use VDI/VSS and VSS writer for backing up the database.
  • This error comes up when the backup path doesn’t exist. For example, D:Backup is the folder location for the backup. If it doesn’t exist there anymore, or you are using an incorrect path, it will result in this error.
  • If the backup file is locked by any other process, then the backup process will fail and result in this error.
  • If there are permission issues with the backup folder, restricting the account with which you are trying to back up the database.
  • If the database log space is not sufficient, it will result in error 3041. The database will remain busy in increasing the log size space, and thus backup task will not be successful.
  • When you have migrated to a newer version of SQL database, this error might come up.

How to solve SQL database error 3041?

As we have seen the reasons behind the error, now let us see how we can resolve this error. You can use the below fixes one by one and see if it resolves the issue.

Fix 1: Take a full native backup

Firstly, take a full native backup of your database using the SQL Server Management Studio. You can also use the Query Analyzer for the same.

Once you have taken the full backup, you need to restart the VSS writer from the third-party applications. Now backup the model database from the third-party applications and the transaction backup log should be successful.

Fix 2: Check the location of the backup path

Ensure that the backup path location that you are using is correct and the folder exists there. Also, make sure that there are no trailing spaces in the folder name, as it can result in mismatch while the backup process is going on.

Fix 3: Check if the backup file is locked

If your backup file is locked by any other process, then you need to close the file. Here are the steps to close the file.

  1. Go to Computer Management.
  2. Navigate to System Tools -> Shared Folders.
  3. Open Files. There you can see the backup files.
  4. Right-click the backup file and click “Close.”

Once the above steps are complete, you can take the backup. If the backup is still not successful, then you will have to stop client scheduler and client acceptor services. Here are the steps to do so.

  1. Go to Computer Management.
  2. Navigate to Services and Applications.
  3. Go to Services -> Client acceptor and scheduler.
  4. Stop services.
  5. Go to the backup folder and then delete the file.
  6. Now start the services again and try taking up the backup.

Fix 4: Grant full control on the backup folder

You need to provide full control on the SQL Server service account as well as the account using which you are trying to take the backups. If the permissions are restricted, you won’t be able to take the backup successfully.

Fix 5: Check database log space

When a backup is performed on the SQL Server database, there is a corresponding entry created in MSDB backup set table. You need to make sure that the log files and data of MSDB is not set to auto-growth. If it set to auto-growth, you need to disable it.

Also, make sure there is a sufficient amount of free space on the disk drive where the MSDB files are generated. After doing so, you can reschedule the backup job.

Fix 6: Check for corruption in the database

The database should be free from any type of corruption. Therefore, check for all the configuration changes you have made, and make sure that you restart the system whenever a new database is added to the server and full back up is taken after restarting the machine.

If you find that there is corruption in the database, the best way to resolve it is by using Stellar Repair for MS SQL. This advanced SQL Database Repair software detects the root cause of database corruption and rectifies it to resolve database corruption. The tool is equipped with an interactive GUI which makes working with it extremely easy.

To Conclude

SQL Database error 3041 can occur anytime when you are trying to take a backup of your database. So, if you run into trouble with this error, you can use the fixes mentioned above to resolve it. So, what are your views on this? Do let us know in the comments section below.

Доброго времени суток!
Имеется сервер с настроенным бэкапом баз в ночное время. До недавнего времени все происходило штатно, по расписанию.
Сегодня ночью бэкап баз создан не был.

Логи MSSQLServer говорят следующее:

2017-05-30 03:40:35.18 spid67 BackupDiskFile::CreateMedia: Backup device ‘X:Microsoft SQL ServerMSSQL10_50.MSSQLSERVERMSSQLBackupBDBD_b ackup_name.bak’ failed to create. Operating system error 5(Отказано в доступе.).
2017-05-30 03:40:35.18 Ошибка: 3041, серьезность: 16, состояние: 1.

Системный журнал приложений говорит тоже самое:

BackupDiskFile::CreateMedia: устройству резервного копирования «Х:Microsoft SQL ServerMSSQL10_50.MSSQLSERVERMSSQLBackupBDBD_b ackup_name.bak» не удалось выполнить create. Ошибка операционной системы 5(Отказано в доступе.).

Никаких изменений ни в систему ни в SQLServer не вносилось. Права доступа не изменялись. Подскажите в какую сторону смотреть, куда копать.

__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь

  • Remove From My Forums
  • Question

  • I have a maintainance plan that takes full backups every day

    but i am not taking any log backup

    i have no errors in the maintainance plan

    but in event viewer i have this error

    LogEntry:      BACKUP failed to complete the command BACKUP LOG Databasename. Check the backup application log for detailed messages.

    Can someone please expalin me why this error

Answers

  • Are your databases in FULL recovery model? Try running this code on one of the databases that already has a FULL database backup

    BACKUP LOG <databaseName>
    TO DISK = 'path to backupdatabase.trn'
    WITH INIT,STATS

    This should throw the relevant error message for you to dig deeper.


    Edwin Sarmiento SQL Server MVP
    Blog |
    Twitter | LinkedIn

    • Marked as answer by

      Thursday, September 27, 2012 3:06 PM

  • Notice that the direction was to examine the Windows Application Log (maybe the SQL Server Error Log would also contain the information) to see exactly what the error was.

    One possibility is that your Maintenance Plan is configured to backup logs, even though there are no FULL recovery model databases.

    Please also note that even in simple recovery mode some portion of the database log will be backed up, in order to provide transactional consistency.  It is possible that some transaction has been open for a long time, producing a large database log.  

    So check any error messages in the Application Log.  Then, share the message here for analysis.

    RLF

    • Edited by
      SQLWork
      Wednesday, September 26, 2012 10:15 PM
      clarify
    • Marked as answer by
      LuckyDba
      Thursday, September 27, 2012 3:05 PM

  • Hi LuckyDba,

    Error: 3041, Severity: 16, State:1 will occur when the backup failed. The more detailed error information is written only to the SQL Server error log and to the client application. And it is not reported in the Application log in Windows.

    So please just go to the error log to see the detailed information and fix the error according to the error log. If you are still confused about it, please try to post the information in the error log  to us.

    Please refer to:
    Troubleshooting the error: http://support.microsoft.com/kb/2646329.

    Regards,
    Amy Peng


    Amy Peng

    TechNet Community Support

    • Marked as answer by
      LuckyDba
      Thursday, September 27, 2012 3:06 PM

  • run xp_readerrorlog to read the sql server error log


    Ramesh Babu Vavilla MCTS,MSBI

    • Marked as answer by
      LuckyDba
      Thursday, September 27, 2012 3:06 PM

  • Remove From My Forums
  • Question

  • I have a maintainance plan that takes full backups every day

    but i am not taking any log backup

    i have no errors in the maintainance plan

    but in event viewer i have this error

    LogEntry:      BACKUP failed to complete the command BACKUP LOG Databasename. Check the backup application log for detailed messages.

    Can someone please expalin me why this error

Answers

  • Are your databases in FULL recovery model? Try running this code on one of the databases that already has a FULL database backup

    BACKUP LOG <databaseName>
    TO DISK = 'path to backupdatabase.trn'
    WITH INIT,STATS

    This should throw the relevant error message for you to dig deeper.


    Edwin Sarmiento SQL Server MVP
    Blog |
    Twitter | LinkedIn

    • Marked as answer by

      Thursday, September 27, 2012 3:06 PM

  • Notice that the direction was to examine the Windows Application Log (maybe the SQL Server Error Log would also contain the information) to see exactly what the error was.

    One possibility is that your Maintenance Plan is configured to backup logs, even though there are no FULL recovery model databases.

    Please also note that even in simple recovery mode some portion of the database log will be backed up, in order to provide transactional consistency.  It is possible that some transaction has been open for a long time, producing a large database log.  

    So check any error messages in the Application Log.  Then, share the message here for analysis.

    RLF

    • Edited by
      SQLWork
      Wednesday, September 26, 2012 10:15 PM
      clarify
    • Marked as answer by
      LuckyDba
      Thursday, September 27, 2012 3:05 PM

  • Hi LuckyDba,

    Error: 3041, Severity: 16, State:1 will occur when the backup failed. The more detailed error information is written only to the SQL Server error log and to the client application. And it is not reported in the Application log in Windows.

    So please just go to the error log to see the detailed information and fix the error according to the error log. If you are still confused about it, please try to post the information in the error log  to us.

    Please refer to:
    Troubleshooting the error: http://support.microsoft.com/kb/2646329.

    Regards,
    Amy Peng


    Amy Peng

    TechNet Community Support

    • Marked as answer by
      LuckyDba
      Thursday, September 27, 2012 3:06 PM

  • run xp_readerrorlog to read the sql server error log


    Ramesh Babu Vavilla MCTS,MSBI

    • Marked as answer by
      LuckyDba
      Thursday, September 27, 2012 3:06 PM

Пожалуйста, посмотрите здесь:
Как устранить неполадки «Msg 3041» в SQL Server

Выдержка из страницы:

Сообщение 3041 представляет собой общий отчет об ошибке резервного копирования. Чтобы понять причину ошибки и устранить ее, необходимо использовать записи журнала ошибок SQL Server, которые появляются перед записью события 3041. Обычно 3041 предшествует подробное сообщение об ошибке, в котором указана реальная причина сбоя резервного копирования. Подробные сообщения об ошибках записываются только в журнал ошибок SQL Server и в клиентское приложение. Подробное сообщение не отображается в журнале приложений в Windows.

Обновление (после прочтения комментария @dezso)
я видел сообщение о «дополнительной ошибке», но я не уверен, что они связаны с ошибкой резервного копирования. Ошибка резервного копирования датирована 20:31:06, но «дополнительная ошибка» датирована 17:53:27, поэтому дополнительная ошибка произошла примерно за 2 часа 40 минут до фактической ошибки резервного копирования. И эти дополнительные ошибки связаны с проблемой входа в систему.

Я не думаю, что проблема входа в систему в 17:53:27 может привести к сбою резервного копирования в 20:31:06. Так что подумайте, что ошибка резервного копирования и что «дополнительная ошибка» не связаны.

Я также не думаю, что общая ошибка, возникающая в 17:53:27, может привести к сбою резервного копирования в 20:31:06 (если БД не очень большая). @Arviddk сообщает, что «моя резервная копия SQL Server продолжает сбой во многих базах данных ». Я думаю, можно с уверенностью предположить, что «много» означает более 10 БД.
Поэтому я думаю, что если на одну резервную копию одной БД уйдет более 2 часов и 40 минут, на одном сервере не может быть 10 или 20 таких БД, иначе ваш сервер потратит всю свою жизнь на резервное копирование. Итак, я предположил, что одно резервное копирование займет намного меньше 2 часов и 40 минут, поэтому я считаю, что ошибка резервного копирования и дополнительная ошибка не связаны.

Последняя ошибка «cachestore flush / ‘Bound Trees'» датирована 06-11-2012 20:30:11, поэтому после ошибки резервного копирования произошла ошибка. В любом случае проблема, связанная с кешем, не должна приводить к ошибке (событие, если оно может что-то замедлить).

Некоторые вопросы

Некоторые вопросы, которые могут помочь определить проблему:

  • Сколько времени требуется для выполнения полной резервной копии?
  • Сколько времени требуется для выполнения резервного копирования DIFF?
  • Ошибка возникает только при резервном копировании DIFF?
  • Какой процент резервного копирования терпит неудачу? (1%? 10% 50%)
  • Может быть, вы можете попробовать сделать только полное резервное копирование, чтобы проверить, если это проблема, связанная с резервным копированием DIFF? (Я никогда не делал никаких резервных копий DIFF на SQL Server, у меня нет опыта с ними)

Согласно веб-сайту MS в журнале SQL Server, должны быть некоторые другие ошибки, связанные с неудачным резервным копированием, но я ожидаю чего-то более близкого, по времени, ко времени, когда резервное копирование завершается неудачно.

0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии

А вот еще интересные материалы:

  • Яшка сломя голову остановился исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного где ошибка
  • Ms sql ошибка 18465
  • Ms sql server проверка базы на ошибки