Welcome to Sign in | Help

Re: Restore one filegroup (out of 2) at some point in the past

  •  08-14-2009, 10:51 AM

    Re: Restore one filegroup (out of 2) at some point in the past

    Am postat pe MS Connect. ID 482717, "Restore filegroup to a certain point back in time".

    Am primit intre timp si doua raspunsuri de la MS, fac copy&paste aici:

    1. De la echipa Sql Server
    "That functionality is not possible in SQL Server.

    In order to have a database that is consistent, all portions of it must be at the same transactional point in time.

    The internal consistency of the database is maintained using Log Sequence Numbers, and there is no way to have multiple LSNs active in a single database.

    It seems that both scenarios could be readily facilitated by creating a simple script to truncate the tables which contain customer specific data, and put the database into a state which is ready to deploy at another customer.  Or better yet, develop a set of pre-configured databases which have never had any customer data in them.

    In Scenario B, there is a real risk in taking a backup from one customer and putting the data on another customer’s machine.  Even when rows are deleted, the data is not zeroed out on the pages, so there is a chance that the second customer could obtain information from the first. 

    SQL Storage Engine PM team :  SQL Server Storage Engine Team blog"

    2. De la support prin programul METRO

    "Unfortunately in the 2 scenarios you described it’s not applicable by restoring filegroup backups. I’d like to explain a little as below:

    Scenario A

    SQL Server will not let you into a database where different data is from different points in time.

    You must use file and filegroup backup and restore operations in conjunction with transaction log backups. After you restore the files, you must restore the transaction log backups that were created since the file backups were created to bring the database to a consistent state.

    File/filegroup backups can be used to restore the database to an earlier point in time. To do this, you must restore a complete set of file backups, and then restore transaction log backups in sequence to reach a target point that is after the end of the most recent restored file backup.

    In fact the main reason for performing selective restores of files or filegroups is to make it possible to spot-recover damage to a database that is too big to restore wholesale. For more details about restoring filegroup backups please reference http://msdn.microsoft.com/en-us/library/ms190710.aspx.

    Scenario B

    File and filegroup backups must be restored to the matching database.

    File and filegroup backups can only be restored to the database to which they belong. You cannot create a new, blank database with the same structure and filenames and then attempt to restore the single file or filegroup backup; you must restore it into the existing database or perform a full database restore in another location.

    Suggested solution

    For scenario A  you can restore the PRIMARY filegroup into a new temp database-to the desired earlier point in time, and then copy the relevant data from this temp database into the production database.

    Or you could simply put the Configuration data in a separate database, then replace the objects in the main database with synonyms, or replicate the configuration data into the main database."


    Florin Cardasim
    Filed under: , ,
View Complete Thread
Powered by Community Server (Commercial Edition), by Telligent Systems