SQL Server Performance

Restore a database from a backup with more files than the target database

Discussion in 'SQL Server 2008 General DBA Questions' started by AMOURGH, Jul 21, 2009.

  1. AMOURGH Member

    Hi sql-server-performance,

    I have a dabase TesDatabase that have :

    *** 2 filesGroups:pRIMARY and FG1 and FG2.

    *** the Log file :TestDatabase_log(.ldf).

    ***Three data files:TestDatabse of Primary,File1 of FG1,File2 of FG2.

    i created a database TesDatabaseCopy:with the sql server defaults:

    1-filegroup PRIMARY with its data file:TesDatabaseCopy(logical)==>TesDatabaseCopy.mdf. Log files :TesDatabaseCopy_log==>TesDatabaseCopy_log.ldf.

    i backuped TestDatabase to DISK='C:TestDatabase.bak'

    Oki,now i want to restore the TestDataBaseCopy from this backup.
    is it possible to do this directly ?
    or i should do a partial backup(of the primay file group) and after the other filesgroup added one after one?

    or i should pass throu offline==>detach==>Copy==>Attach==>Online?


  2. Luis Martin Moderator

    If I follow you, you can restore over TestDataBaseCopy with overwrite and, may be, change some physicals names.

Share This Page