November 21, 2011 at 11:42 am
Hello all,
I've got a question:
I have a very busy sql-server 2008r2, with performance issues, for a unknown reason the waiting tasks are fluctuating very high. I did find that the log file is 99% empty because of the backup every 15 minutes, this is ok. But the disk is almost full.
Since my database is online 24/7, my question is: Can I use shrinkfile online for log and / or data-file or will my database go offline? And if so, for how long?
I thank you for your reply.
Best regards,
Mischa
November 21, 2011 at 12:17 pm
Yes, you can shrink logfiles without the database going offline.
I don't recommend shrinking database files if it can be avoided.
November 21, 2011 at 12:31 pm
Ok, I have done that:
USE [ivs]
GO
DBCC SHRINKFILE (N'IVS_Log' , 5000)
GO
Now I get this result:
DbIdFileIdCurrentSizeMinimumSizeUsedPagesEstimatedPages
2226713280128067132801280
And the error (in messages):
Cannot shrink log file 2 (IVS_Log) because the logical log file located at the end of the file is in use.
Does anyone have any idea how to fix this?
Greetings, Mischa
November 21, 2011 at 12:44 pm
On a other forum, I did get the following solution: Make a log-backup, then shrink, works perfect, even online! Thanks for your help!
Best regards,
Mischa
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply