05 September,2024 by Tom Collins
Question : Executing the following Database shrinkfile actibity and getting the error message
use myDatabase
DBCC SHRINKFILE (N'myDatabase_log' , 0, TRUNCATEONLY)
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.
Answer: Check if there are any other Backup jobs running on the same database which could be interfering with the command you are attempting to execute . A typical scenario is where another Backup Job could be executing and is for some reason failing.
A good clue about the nature of the issue is the error message text - Backup, file manipulation operations (such as ALTER DATABASE ADD FILE) and encryption changes on a database must be serialized.
In that situation , identify the other process - which is either a Backup, filemanipulation or encryption change and KILL IT. A good tool to use is sp_WhoIsActive utility for SQL Server troubleshooting.
Then execute the DBCC SHRINKFILE (N'myDatabase_log' , 0, TRUNCATEONLY)
This is only a preview. Your comment has not yet been posted.
As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.
Having trouble reading this image? View an alternate.
Posted by: |