I have 60 GB log file(.ldf) file.Can anyone please provide me exact steps to shrink this file?
Asked
Active
Viewed 223 times
0
-
2Why would you want to do that? Read this answer by Aaron Bertrand more info: http://stackoverflow.com/a/18292136/2203084 – Felix Pamittan Feb 25 '15 at 07:36
-
Not so simple (to understand the actual problem). 1) Confirm you need Recovery model: Full and not just SImple. That will solve your future problems. 2) Make sure the backup and truncate log is working, as it may be a problem with your backups. – Anthony Horne Feb 25 '15 at 07:38
-
1I'm sure that by searching for that on Google will also provide you with "Exact Steps" to shirk this file. – Jaques Feb 25 '15 at 08:02
-
@AnthonyHorne:Recovery Model is Full. – Mohan Seth Feb 25 '15 at 08:58
-
If you are not doing transaction log backups (or don't need up-to-the-minute) data, i.e. daily backups will do, then you can make it simple, which will avoid future very large transaction logs. – Anthony Horne Feb 25 '15 at 10:03
-
@AnthonyHorne:i need up-to-the minute data then what should i do? – Mohan Seth Feb 25 '15 at 11:19
-
Then make sure that your backups are happening properly AND if you look at the files to see that there is ample space in the log file ( DBCC SHOWFILESTATS WITH NO_INFOMSGS ;DBCC sqlperf(logspace) WITH NO_INFOMSGS ). Then after the backup (with truncate) is done, then run: DBCC SHRINKFILE (
, – Anthony Horne Feb 25 '15 at 11:41) WITH NO_INFOMSGS