Shrink DB using Maintenance Plan does not affect the log file size
-
Dear All, I need to reduce the log file size... I've created a maintenance plan for shrinking the DB in my local machine, I've created every thing ok and scheduled it to work daily. and when I right click and then execute, the dialog displays successful process, but when I check the DB Log, it still huge size (about 20 Gb). I do not know why the log file size still huge after shrinking the DB. Any help, plz???
Kind Regards OBarahmeh
-
Dear All, I need to reduce the log file size... I've created a maintenance plan for shrinking the DB in my local machine, I've created every thing ok and scheduled it to work daily. and when I right click and then execute, the dialog displays successful process, but when I check the DB Log, it still huge size (about 20 Gb). I do not know why the log file size still huge after shrinking the DB. Any help, plz???
Kind Regards OBarahmeh
-
Did you try gogole search?[^]
I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post.
Ok, I've found the solution: USE yourDB; GO -- Truncate the log by changing the database recovery model to SIMPLE. ALTER DATABASE yourDB SET RECOVERY SIMPLE; GO -- Shrink the truncated log file to 1 MB. DBCC SHRINKFILE (yourDB_Log, 1); GO -- Reset the database recovery model. ALTER DATABASE yourDB SET RECOVERY FULL; GO
Kind Regards OBarahmeh