Shrink Database Log files (Full recovery mode)
USE Database_name;
GO
– Truncate the log by changing the database recovery model to SIMPLE.
ALTER DATABASE Database_name
SET RECOVERY SIMPLE;
GO
– Shrink the truncated log file.
DBCC SHRINKFILE (Database_name_log);
GO
– Reset the database recovery model.
ALTER DATABASE Database_name
SET RECOVERY FULL;
GO
GO
– Truncate the log by changing the database recovery model to SIMPLE.
ALTER DATABASE Database_name
SET RECOVERY SIMPLE;
GO
– Shrink the truncated log file.
DBCC SHRINKFILE (Database_name_log);
GO
– Reset the database recovery model.
ALTER DATABASE Database_name
SET RECOVERY FULL;
GO
Yorumlar