SQL 2005 SP1 restore DB with filegroup

  • Hi,

    Here is the situation

    1. There is a .bkp file (~58GB) that gets backed up every night.

    2. The physical DB file has 4 .ndf files (Filegroup).

    3. I created a DEV environment and copied the .bkp file locally on the DEV server.

    4. I created a new DB and trying to force the restore of the .bkp file.

    5. When monitoring, the DB files (.mdf and .ndf) and log file gets created in the appropriate folders on the server.

    Issue:

    The restore job continue to run for hours and never finishes...The status is 'Executing 0%'. Is there a way to find out what's happening in the background? Do I have to restore the DB a certain way?

    Here is the SQL script that was generated to run the task:

    RESTORE

    DATABASE [ASIdb] FROM DISK = N'G:\asidb.bkp' WITH FILE = 1, NOUNLOAD, REPLACE, STATS = 10

    GO

    Any suggestions are appreciated.

    Thanks

  • Probably you do not have the same disk structure in dev as it is in prod.

    You have to replace your db logical and physical file names for ndfs and ldf and the location for your data files in the script below:

    RESTORE

    DATABASE [ASIdb] FROM DISK = N'G:\asidb.bkp'

    WITH

    FILE = 1, MOVE N'asidb_ndf1' TO N'yourDevLocation\asidb1.ndf',

    MOVE

    N'asidb_ndf2(logical name)' TO N'yourDevLocation\asidb2.ndf',

    MOVE

    N'asidb_ndf3(logical name)' TO N'yourDevLocation\asidb3.ndf',

    MOVE

    N'asidb_ndf4(logical name)' TO N'yourDevLocation\asidb4.ndf',

    MOVE

    N'asidblog(logical name)' TO N'yourDevLocation\asidblog.ldf',

    NOUNLOAD

    , REPLACE, STATS = 10

    GO

  • If you find hard to use the above query then use SSMS to restore the database and force restore over the new db you have created.

    Cheers,
    Sugeshkumar Rajendran
    SQL Server MVP
    http://sugeshkr.blogspot.com

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply