Query to reduce the size of eMO database in SQL

SHARE

Query to reduce the size of eMO database in SQL


When MDF of SQL database file grow and consume more space in the HDD and the MM Modules/SQL Management studios becomes unresponsive in  most of the times.In my case, emo mdf file size increased to 93 GB due to which the hard disk space was almost occupied by the eMO database file(MDF) file also we can't do any emo operation in the eMO module.

So the following query was executed and the mdf file size was reduced to minimum ie. 1 gb. Pls circulate dis among our friends.
Note:Applicable to SQL Server 2008.
USE eMO
GO
ALTER DATABASE [eMO] SET
RECOVERY SIMPLE WITH NO_WAIT
DBCC SHRINKFILE ([eMO_log], 1)
ALTER DATABASE [eMO] SET
RECOVERY FULL WITH NO_WAIT
GO

SHARE

Author: verified_user

0 Comments:

; //]]>