How to shrink SQL database to increase disk space

 USE DatabaseName
GO
DBCC SHRINKFILE(, 1)
BACKUP LOG WITH TRUNCATE_ONLY
DBCC SHRINKFILE(, 1)
GO

In Case of SharePoint server .this problem often observed .to resolve the same ..following query works well for me


USE SharePoint_Config
GO
DBCC SHRINKFILE(SharePoint_Config_log, 1)
BACKUP LOG SharePoint_Config WITH TRUNCATE_ONLY
DBCC SHRINKFILE(SharePoint_Config_log, 1)
GO

Comments

Popular posts from this blog

ContextSwitchDeadlock was detected

Visual Studio setup and deployment projects

Using SvcUtil.exe to generate the proxy class and config file