0

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 ?

4
  • Are you going to put your db in simple mode afterwards? Feb 7, 2018 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, 2018 at 9:22
  • @StijnWynants - No it will be FULL same as my Live server. Feb 7, 2018 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. Feb 7, 2018 at 10:33

1 Answer 1

4

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.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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