Error 3023 severity 16 state 2

Hi,
  • Remove From My Forums
  • Question

  • Hi,

    SQL server 2014

    I have configured backup with SQL Maintenance Plans the following way.

    FULL – every wednesday and saturday 22:00
    DIFFERENTIAL – monday, thuesday, thursday, friday, sunday 22:00
    TRANSACTION LOG – every 3 hours every day

    Each time I have a full backup running I get the error message

    2016-01-13 23:05:41.06 spid19s     Error: 3023, Severity: 16, State: 2.
    2016-01-13 23:05:41.06 spid19s     Backup, file manipulation operations (such as ALTER DATABASE ADD FILE) and encryption changes on a database must be serialized. Reissue the statement after the current backup or file manipulation operation
    is completed.

    I have looked at the page https://support.microsoft.com/en-us/kb/2979636 and the only thing I could think of is that we are running the LOG backup each 3 hours, and since the full backup takes between 10-15 hours it means that the log backup will run 2 times
    within this full schedule, so will this cause the problem ?

    If Yes, which mean I can only run 1 log backup while the full backup is running, do I have to disable log backup for that day then ?

    Thanks for reply


    /Regards Andreas

Answers

  • 1. so what impact has it if i change this to false ?

    2. Just to be clear, there is no problem running 2 log backups of the same database while it is running full backup ? Doesnt the log backup initiate a shrink ?

    1. Auto Shrink is One of the worst feature of SQL Server which in 99% of case causes issue with system. if you turn auto shrink off there is not going to be any perfromance affect. On contrary your performance might increase. When auto shrink kicks on, it
    utilises resources uses logs file and creates logs making system slow.  Read
    this article. I strongly suggest you to change it to false.

    You must be taking backup altogether for all databases and even if that fails for one database whole backup operation would fail. Change it to false and I am sure backup would not fail with this message assuming there is no other shirnk database running

    2. Log backup DOES NOT initiates any shrink all it does is takes backup and marks VLF(which are not required no more) as reusable.


    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it

    My Wiki Articles


    MVP

    • Edited by

      Thursday, January 14, 2016 1:39 PM

    • Proposed as answer by
      TiborKMVP
      Thursday, January 14, 2016 2:48 PM
    • Marked as answer by
      Andreas2012
      Monday, January 18, 2016 9:47 AM

SQL server error 3023 triggers while trying to run a backup, shrink, or alter database command in SQL Server when a backup process is running in the server.

As a part of our Server Management Services, we help our Customers to fix SQL related errors regularly.

Let us today discuss the possible causes and fixes for this error.

What is SQL server error 3023?

As we discussed earlier the error 3023 triggers while trying to run a backup, shrink, or alter database command in the Server. This generally happens when we perform another database backup if the backup is already running for the database.

SQL server error 3023

Let us now look at the common reasons for this error.

What causes SQL server error 3023?

There are some restrictions in the operations that are allowed and not allowed when a database backup process is running. These includes:

1. We can run only one database backup at a time. When a full database backup occurs, differential or incremental backups cannot occur at the same time.
2. Only one log backup can happen at a time. A log backup is allowed when a full database backup is occurring.
3. You cannot add or drop files to a database while a backup is occurring.
4. You cannot shrink files while database backups are happening.
5. There are limited recovery model changes allowed while backups are occurring.

Thus, a breach in any of the above restrictions can trigger the SQL Server error 3023, SQL Server error 3013 and SQL Server error 3041 messages. Let us now look into the steps to fix this error message.

How to fix the SQL server error 3023?

The solution to fix the 3023 error is to examine the schedules of the various database maintenance activities, and then adjust the schedules so that these operations or commands do not conflict with each other.

The first thing to do if we see this error message is to check the SQL Server Agent jobs and wait till that job completes.

We need to check the status of the database in SQL to see if it is in a state such as “Restoring” and if so, allow time for the current operation to complete before attempting another backup.

Alternately we can perform any of the following steps:

* Cancel the pending operation against the database
* Bring the database offline and back online
* Remove the database from the backup selections

Further, SQL Server records the start time and the end time of the backup in the msdb database. We can examine the backup history to determine whether there was a full database backup occurring while an incremental backup was attempted. You can use the following query to help you with this process:

~~
select database_name, type, backup_start_date, backup_finish_date
from msdb.dbo.backupset
order by database_name, type, backup_start_date, backup_finish_date
go
~~

[Need any further assistance in fixing Database errors? – We’re available 24*7]

Conclusion

In short, the SQL server error 3023 occurs while trying to run a backup, shrink, or alter database command in SQL Server when a backup process is running in the server . Today, we saw how our Support Engineers fix this error.

Error: Msg 3023, Level 16, State 2, Line 4
Backup, file manipulation operations
(such as ALTER DATABASE ADD FILE) and encryption changes on a database must be serialized.
Reissue the statement after the current backup or file manipulation operation is completed.

This means that you were trying to run dbcc shrinfile command when some backup operation was running on the database. It can be any backup full,differential and transaction log. It means:  please try running shrikfile command when backup operation has completed. Now you have to find what backup was running at that time. See errrlog or msdb job history you could find more details.

If you refer to BOL

Operations that cannot run during a database or transaction log backup include:

• File management operations such as the ALTER DATABASE statement with either the ADD FILE or REMOVE FILE options.

• Shrink database or shrink file operations. This includes auto-shrink operations.

Conclusion:
Whenever you come across this error, you should check what the processes are in progress in SQL Server. It will give you a hint, why you are unable to take backup. In my case, a scheduled backup was in progress at the same time when I tried to take the backup.

Solution: Find out the conflicting operation and retry your operation after stopping or finishing conflicting operation.

February 12, 2014 by Muhammad Imran

Last weekend, my support engineer and I were at a client site to upgrade SQL Server 2005 to SQL Server 2012. Before proceeding with any activity, we tried to take a backup and got the given below error that I received it later by my support engineers as shown below.

error

Let me explain the error and its solution in details.

Message Number: 3023 

Severity : 16

Error Message: Backup and file manipulation operations (such as ALTER DATABASE ADD FILE) on a database must be serialized. Reissue the statement after the current backup or file manipulation operation is completed.

Resolution:
If you look at the error description, it seems that there is a transaction going on in the background, and due to this reason SQL Server is not allowing us to take a backup or may be the database is corrupt. So we started doing our basic testing and it seems everything is fine. Then why SQL Server is not allowing us to take a backup ?

So, I thought of executing the given below query to check whether any backup or restore operation is in progress and I found that a scheduled backup was already in progress. Ooopss……….. So we waited for a while and took the backup again.

erromessage3023.1.1

Conclusion:
Whenever you come across this error, you should check what the processes are in progress in SQL Server. It will give you a hint, why you are unable to take backup. In my case, a scheduled backup was in progress at the same time when I tried to take the backup.

Posted in Errors, SQL SERVER | Tagged Backup and file manipulation operations, Msg 3023 Level 16 State 1, raresql, SQL, SQL Server, SQL Server 2012 | Leave a Comment

   Ruslanb

25.05.18 — 00:16

Одна из конфигураций на базе SQL при входе начала выдавать следующую ошибку:

Ошибка СУБД:

Microsoft SQL Server Native Client 11.0: The transaction log for database ‘Base_Name’ is full due to ‘LOG_BACKUP’.

HRESULT=80040E14, SQLSrvr: SQLSTATE=42000, state=2, Severity=11, native=9002, line=1

   PR

1 — 25.05.18 — 00:19

Так так, очень интересно. А ты?

   Ruslanb

2 — 25.05.18 — 00:28

(1) Попытался урезать лог транзакций через SQL server, но вышла и там ошибка:

Backup, file manipulation operations (such as ALTER DATABASE ADD FILE) and encryption changes on a database must be serialized. Reissue the statement after the current backup or file manipulation operation is completed. (Microsoft SQL Server, Error: 3023)

   PR

3 — 25.05.18 — 00:33

(2) Очень интересно. Что думаешь делать?

   Ruslanb

4 — 25.05.18 — 00:33

(1) Тоже самое если делать это с помощью запроса:

Msg 3023, Level 16, State 2, Line 2

Backup, file manipulation operations (such as ALTER DATABASE ADD FILE) and encryption changes on a database must be serialized. Reissue the statement after the current backup or file manipulation operation is completed.

Msg 5069, Level 16, State 1, Line 2

ALTER DATABASE statement failed.

Msg 8985, Level 16, State 1, Line 3

Could not locate file ‘acc_main’ for database ‘Base_Name’ in sys.database_files. The file either does not exist, or was dropped.

   Ruslanb

5 — 25.05.18 — 00:34

(3) У Вас есть какие то идеи?

   PR

6 — 25.05.18 — 00:38

(5) Я уж думал не спросишь

Скуль перегружать пробовал?

   Ruslanb

7 — 25.05.18 — 00:43

(6) Перезагружал SQL server agent, но не помогло

   PR

8 — 25.05.18 — 00:45

(7) Причем здесь агент, просто скуль перегружал?

   PR

9 — 25.05.18 — 00:45

У базы стоит модель Full или Simple?

   Ruslanb

10 — 25.05.18 — 00:48

(8) Сейчас попробую. (9) Модль Фулл пытался сделать Симпл, но выдает ошибку которую я написал выше

   Ruslanb

11 — 25.05.18 — 00:59

(8) Кажись заработало! Ввел две команды net stop mssqlserver и net start mssqlserver и база запустилась! Спасибо большое)

   StanislavPrihodko

12 — 25.05.18 — 08:17

Отлично

   Apokalipsec

13 — 25.05.18 — 08:24

база в фулле, шел бекап лога транзакций, ты убил сервер во время этого процесса — четко, могешь.

Теперь попробуй всё таки снять бекап лога транзакций и снять/увеличить ограничение по максимальному размеру лога транзакций.

Если тебе не нужен лог транзакций — переведи базы в simple.

   Apokalipsec

14 — 25.05.18 — 08:27

Роман, а как часто тебя заказчики бьют за советы как в (6) не разбирающимся разработчикам?

   PR

15 — 25.05.18 — 09:57

(14) У меня такого не бывает, я базы сразу в Simple перевожу

Можно привести хоть один пример, где в 1С может пригодиться Full?

   PR

16 — 25.05.18 — 10:00

(14) Про бэкап речь зашла только после (0), а в (0) речь не о бэкапе, а о переполнении  лога

   пипец котенку

17 — 25.05.18 — 10:31

>>Можно привести хоть один пример, где в 1С может пригодиться Full?

ЛОЛ, да везде, где заказчики не готовы терять данные за период от предыдущего полного бэкапа до сбоя.

   PR

18 — 25.05.18 — 11:20

(17) Ты про ситуацию, когда клиент реально готов восстанавливать все максимально полно и ежечасные инкрементные бекапы по необъяснимой причине ему так же не подходят

А я про реальность

И в моей реальности полный бекап плюс ежечасные инкрементные полностью закрывают потребность в бекапах

В этом случае Full только жрет место и все

   пипец котенку

19 — 25.05.18 — 11:32

(18)

>>ежечасные инкрементные бекапы по необъяснимой причине ему так же не подходят

не по необъяснимой, а по причине что он готов потерять макс. 15 минут — именно такой интервал можно ставить для бэкапа лога, для дифф. бэкапа в конце дня у тебя дифф бэкап просто не будет успевать делаться за это время

>>В этом случае Full только жрет место и все

Ты просто не умеешь настраивать бэкап лога. Твои ежечасные диф. бэкапы точно так же жрут место, по сравнению с бэкапами лога.

Насчет инкрементного, как ты говоришь, бэкапа (на самом деле он называется дифференциальный) — у него есть серьезный подводный камень — сделанный админом или сторонними средствами полный бэкап делает невалидной всю цепочку твоих бэкапов.

   пипец котенку

20 — 25.05.18 — 11:34

>>А я про реальность

Ты живешь в какой-то своей реальности, в моей реальности все продакшн базы в фулл модели.

   PR

21 — 25.05.18 — 12:07

(19) В общем, я не понял, в чем проблема полных бекапов + дифференциальных, в случае ручного восстановления этого более чем достаточно

   пипец котенку

22 — 25.05.18 — 12:14

(21) Печенюшка, с таким уровнем понимания тебя нельзя до баз больше 15 Мб допускать, бгг

   Мыш

23 — 25.05.18 — 12:40

(19) > Насчет инкрементного, как ты говоришь, бэкапа (на самом деле он называется дифференциальный) — у него есть серьезный подводный камень — сделанный админом или сторонними средствами полный бэкап делает невалидной всю цепочку твоих бэкапов

COPY ONLY спасает, но кто про него вспоминает )

   PR

24 — 25.05.18 — 13:51

(22) Ой, Миша, дурачок, я и не признал тебя сразу, сорян :))

  

X Leshiy

25 — 25.05.18 — 14:12

(17) >>ЛОЛ, да везде, где заказчики не готовы терять данные за период от предыдущего полного бэкапа до сбоя.

Раз заказчик такой нежный, пусть строит репликацию)))

Понравилась статья? Поделить с друзьями:
  • Error 30182 1011
  • Error 3013 sql
  • Error 30125 1011
  • Error 301 django
  • Error 3008 revoice pro