What is the use of data in .ldf(log) file after restoring a full backup. I am planning to shrink the log files after restoring the full backup in my dev server.

Is there any side effect for this ?

  • Are you going to put your db in simple mode afterwards? – Stijn Wynants Feb 7 '18 at 8:40
  • The log file stores information about changes made in SQL Server. It has major role to play when restoring full backup because a full backup may include few amount of transaction log and if that is missed recovery is not possible. You may shrink log file after restoring and this will not lead to any data loss but DONT make it a habit. – Shanky Feb 7 '18 at 9:22
  • @StijnWynants - No it will be FULL same as my Live server. – Pரதீப் Feb 7 '18 at 10:32
  • @Shanky - The server in which am restoring is only for development, at any case there will not be a need to recover data. – Pரதீப் Feb 7 '18 at 10:33

Is there any side effect for this ?

No, not really. The worst thing that could happen is the log file grows again, given this is a dev server that's not a problem. Worst case is the log takes up all available space and your db goes into read-only... which is easily rectifiable and downtime is fine as it's a dev server.

Shrink away.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.