How can we help you today? How can we help you today?

Feature Request - Release unused space on Restore

Description
The backup process should have an option to release unused space on a restore. Separate options may be useful for data and log files.

For a data file, where the restore finds an empty page, the next available data page should be restored in its place. The end result would appear as though a SHRINKFILE had been performed and all unused space truncated.

The cluster index would obviously need updating to show the new locations of the data pages. For non-cluster indexes, it may be more practical to rebuild them (or leave them as definitions only) than attempt to update the RIDS.

For a log file, the restore restore only the in-use logical log files.

The time required to complete this type of restore is not important.

Justification:
It can be very inconvenient (or impossible!) to find spare disk space for a restore when it is known that the DB being restored contains large amounts of free space. This can be particularly true when restoring the DB to a different server or to another name on the original server.
EdVassie
0

Comments

1 comment

  • alecl
    This sounds like an excellent idea, but I have a feeling it requires Microsoft to make it possible as RedGate just hooks into their backup API. I would add a feedback on connect. Link it if you do and I and others will vote it it.

    http://connect.microsoft.com/SQLServer/Feedback
    alecl
    0

Add comment

Please sign in to leave a comment.