Inspired by RedGate's upcoming SQL Instant Clone, I'm using virtual disks to store my test database and gain fast clones via differencing disks. I created a 30 GB VHD and restored a 18 GB database from a full backup using WITH NORECOVERY to be able to later restore a differential backup on top. I then created a child differencing VHD and restored a 1 GB differential backup. I expected the differencing VHD to grow to 1 GB after the restore, but instead it grew to 15 GB. Why is this?

  • A VHD is the virtual file use by Hyper-V for the OS (or data). Have you set its size to X? Is the OS on the same VHD? – Julien Vavasseur Mar 10 '16 at 21:34
  • @JulienVavasseur The root vhd is 30GB, fixed-size. – Bruno Martinez Mar 11 '16 at 14:13
  • 1
    What is the child vhd size when you restore the diff backup with NORECOVERY? Believe you will find it is closer to the original uncompressed diff size, and what you are seeing when you recover, SQL touching pages not part of the diff in the roll forward phase (which are in 8k pages), and thus essentially your full data base size – Andrew Loree Mar 12 '16 at 3:49
  • @AndrewLoree Good point. I didn't knew about the roll forward phase. Restoring the differential with NORECOVERY already grew the differencing VHD 15 GB, and recovering the db afterwards was very fast, so I think there weren't transactions to apply. – Bruno Martinez Mar 14 '16 at 18:51

Your Answer

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

Browse other questions tagged or ask your own question.