Shrink Log file /w Mirror
Currently have SharePoint Farm using a mirrored SQL Server, but unable the shrink the LOG Files after a LOG Backup. Setting recovery mode to simple is not an option since mirroring is enabled; so what would be require to make .ldf file smaller while SharePoint is running?Thanks in advance.
February 22nd, 2010 8:13pm
Hi,Which SQL version you have ?Try to use the following from SQL Management StudioUSE DatabaseNameGODBCC SHRINKFILE(<TransactionLogName>, 1)BACKUP LOG <DatabaseName> WITH TRUNCATE_ONLYDBCC SHRINKFILE(<TransactionLogName>, 1)GO
Best Regards, Ammar MCT http://ahmed-ammar.blogspot.com Posting is provided "AS IS" with no warranties, and confers no rights.
Free Windows Admin Tool Kit Click here and download it now
February 22nd, 2010 8:16pm
Using SQL 2008, and the Transaction log file has 98% Available Free Space, the issue is the SHRINKFILE does not make the file smaller; SQL Mirroring (synchronous) is enabled, so should TRUNCATE_ONLY ever be used?
February 22nd, 2010 10:26pm
Hi,TRUNCATE_ONLY is no longer supported with SQL 2008try to backup the log file only, then use Shrink log file , do this 2 or 3 timesalso check this http://technet.microsoft.com/en-us/library/ms178037.aspxBest Regards,
Ammar MCT
http://ahmed-ammar.blogspot.com
Posting is provided "AS IS" with no warranties, and confers no rights.
Free Windows Admin Tool Kit Click here and download it now
February 22nd, 2010 10:46pm
When attempting to shrink, the message Cannot shrink log file, because the logical log file located at the end of the file is in use. This would indicate that it will be neccessary to take SharePoint offline (no transactions) so that the LOG backup can begin the transaction logging at the beginning of the file and eliminate any VLF fragmentation. Then, be sure LOG File cannot grow and Log backups run before exceeding LOG file size the best bet. http://technet.microsoft.com/en-us/magazine/2009.02.logging.aspxAny ideas on doing this online would be helpful.
February 23rd, 2010 3:36am
The most helpful post:http://www.simple-talk.com/sql/database-administration/monitoring-sql-server-virtual-log-file-fragmentation/Although the message Cannot shrink log file occurs; the file does resize. Prior to resize Log File had 389 VLFs; after 62 VLFs and much smaller file.It is not neccessary to go offline, but best to run when transaction are lowest; this afternoon no joy; this evening smaller file.Now to make part of a maintanence plan.
Free Windows Admin Tool Kit Click here and download it now
February 23rd, 2010 6:09am


