I am trying to restore a big database in SQL Server 2008 R2. The database is about 700GB in size. My SQL Server is installed in C drive which has only 100GB of space left in it. I have the .bak file on the D drive from which I need to restore the database. Is there a way I can restore this database without increasing the space on C drive? (The D drive has 5TB of space and I would want SQL Server to access/place the data from/on D drive)

Any input will be highly appreciated.

2 Answers 2


You can define the path for all data and log files in the second tabenter image description here

  • Thanks a lot for your reply. It seems to work i.e. the database is getting restored right now. Do you think I will face performance issues if I have different databases lying around on various disks on the computer?
    – Patthebug
    Commented Feb 25, 2014 at 4:50
  • If the drive you are restoring it onto is slow, then yes. Otherwise no, no problems at all. My SQL Server is installed on my C: drive and I have data drives D:, E: and G:. Some Dbs I have split over 3 drives to help improve performance.
    – Stuart
    Commented Feb 25, 2014 at 5:37

You can redirect the data files using the move command

USE [master]
FROM  DISK = N'{PathToBakFile}' 
WITH  FILE = 1,  
MOVE N'{DataFileLogicalName}' 
    TO N'{NewPath}',  
MOVE N'{LogFileLogicalName}' 
    TO N'{NewPath}'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.