Wednesday, 17 October 2018

SharePoint Database Log file is increase. (Shrink the SharePoint database Log file)


SharePoint Log files are Increase more then database file or some time increased more then it, 
Easy way is to reduce the log size using  Shrink the Log file.


-- Set database to simple
ALTER DATABASE WSS_Conten_MyDB
SET RECOVERY SIMPLE; 
GO 


-- 1st parameter is Database Log File name , 2nd parameter is new log Size in MB (100 MB)
DBCC SHRINKFILE (WSS_Conten_MyDB_Log, 100); 
GO 


-- Reset the database recovery model to full
ALTER DATABASE WSS_Conten_MyDB
SET RECOVERY FULL; 
GO