Restore the mdf from a BAK to multiple drives possible?

  • Hello - I have 2 BAK files to restore to 2 drives (1 for the mdf, 1 for the logs)

    I'm running out of room for the mdfs and can't restore both databases.

    Is it possible to restore the mdf of one of the databases to 2 different drives?

    For example, both databases together need 105 GB and I have a 100 GB drive. Is there any way to restore and have 5GB sit on another drive?

    I could not find an example of this or see the option in the GUI.

    I don't have the option of changing the backup process. I receive the BAK files from another agency that won't modify their procedures.

    Thanks

    Dave

  • I've never heard of splitting a single file across two drives, but you can certainly restore the individual files to drives that aren't where they originally lived. Here's an example of restoring test_db from a backup file to different drives:

    RESTORE DATABASE [test_db]

    FROM DISK = N'X:\path\backup_file.bak' WITH FILE = 1,

    MOVE N'original_data' TO N'E:\data\test_db.mdf',

    MOVE N'original_log' TO N'F:\logs\test_db.ldf', NOUNLOAD, STATS = 10;

    HTH

  • You can't do it as part of the restore. You could do it after it was restored, but it would involve some serious effort though.

    Maybe you could instead restore one of the mdf files to the log drive, if you have some extra space on it?

    SQL DBA,SQL Server MVP(07, 08, 09) A socialist is someone who will give you the shirt off *someone else's* back.

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

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