I have a sql server 2012 configured with always on replication, the WSS_Logging_log is about 400GB and SharePoint_Config_log is over 600GB and is slowing down performance and space is almost over.

I have tried the normal shrink scripts out there, but the file size remains the same and only shows this message: "The log for database 'SharePoint_Config' cannot be shrunk until all secondaries have moved past the point where the log was added..

(1 row(s) affected) DBCC execution completed. If DBCC printed error messages, contact your system administrator."

this is the configuration: Sharepoint server 2013 with two database server running sql server 2012 with always on configured

Can anyone please help.

  • did you take the backup of the log files? another option is break the replica and then take the backup and shrink it. read from here...panigorthi.blogspot.com/2013/11/…
    – Waqas Sarwar MVP
    Oct 8, 2014 at 15:15
  • What is the recovery mode of the databases set to? Should be set to 'Simple'
    – Dovahkiin
    Oct 8, 2014 at 15:30

1 Answer 1


I found the answer, before shrinking the databases they must be removed from the Availability group this the link: http://msdn.microsoft.com/en-us/library/hh231120.aspx, it should be done in both servers and after that use this script to shrink:

USE databasename ; GO -- Truncate the log by changing the database recovery model to SIMPLE. ALTER DATABASE databasename SET RECOVERY SIMPLE; GO -- Shrink the truncated log file to 1 MB. DBCC SHRINKFILE (Sdatabasename_log, 1); GO -- Reset the database recovery model. ALTER DATABASE databasename SET RECOVERY FULL; GO

enjoy it!!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.