We all are aware that SharePoint have default DB i.e. configDB and in SQL database every database have a log file to log the operations / transactions. Due to number of users and transactions log file grow much faster than transactional data file.
Due to this server team start complaining and asking me to move or delete this log file.
To resolve this issue we can fix by using two methods-
- Using SQL Server management Studio
- Using SQL Script
SQL Server management Studio
Log on the backend server (SharePoint Database Server) by using admin account to perform task for database.
- Open the SQL Server management studio and connect sharepoint DB server instance
- Check the default properties of sharepoint_config database and log files
Right click the SharePoint_config database click properties and it will open the database properties dialog box and select
- Recovery model full to simple
- And click ok
Right-click on the sharepoint_config database click Task-> Shrink-> Files
Note: If the log file is large in size, it might take some time to shrink it, resulting in the processing taking longer time.
Once shrink process completes, change the recovery model back to full from simple recovery model.
SQL commands to Shrink log file in Database
alter database SharePoint_Config set recovery simple
alter database SharePoint_Config set recovery full
dbcc shrinkfile (N’SharePoint_Config_log’ , 2)