May 7, 2024 at 6:53 pm
Hello Everybody,
I have a database on which I try to empty a file and get rid of it. But I get this error:
Cannot move all contents of file "databasename" to other places to complete the emptyfile operation.
DBCC SHRINKFILE: Page 9:7748583 could not be moved because the partition to which it belonged was dropped or is part of a paused resumable index build. Use sys.index_resumable_operations to identify paused resumable index builds.
DBCC execution completed. If DBCC printed error messages, contact your system administrator. (Framework Microsoft SqlClient Data Provider)
------------------------------
For help, click: https://docs.microsoft.com/sql/relational-databases/errors-events/mssqlserver-2555-database-engine-error
------------------------------
Server Name: sqlserver
Error Number: 2555
Severity: 16
State: 2
Line Number: 1
If I run dbcc checkdb I don't get any errors. There's also no resumable index operation left and no partitioned tables in the database. Any help would be appriciated.
May 7, 2024 at 9:53 pm
Not quite the same error you got, but same error number - https://dataginger.com/2012/10/07/msg-2555-level-16-state-1-line-1-error-dbcc-shrinkfile-with-emptyfile-option/
Their solution was to restart the SQL instance and try again. It was likely caused by a query running or a connection that was using that partition. I wonder if you have a similar situation - can't empty the file because something is using it or WAS using it. What I mean by "WAS" is someone dropped an object while you were shrinking so SQL was unable to move the object as it didn't exist anymore.
The above is all just my opinion on what you should do.
As with all advice you find on a random internet forum - you shouldn't blindly follow it. Always test on a test server to see if there is negative side effects before making changes to live!
I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.
May 8, 2024 at 8:58 am
Does sys.index_resumable_operations hold data?
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply