Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 DB restore

Author  Topic 

dolphin123
Yak Posting Veteran

84 Posts

Posted - 2013-01-16 : 11:47:21
Hi,

A backup I am trying to restore has 1 mdf file and 85 ndf files.
The server I am trying to restore doesn't have enough space in the default location.

I can use the following to change the path. Do I have to use 85 move lines to create the script or is there way I can specify one place for all ndf files?

Thanks for your help!



restore database DB
from disk='D:\Folder\DBBACK_0917.bak'
WITH MOVE 'BBACK_Data' TO 'D:\MSSQL\DATA\BBACK.mdf',
MOVE 'BBACK_Log' TO 'D:\MSSQL\DATA\BBACK_1.ldf',
replace, recovery, stats=5, maxtransfersize=1048576

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2013-01-16 : 21:38:49
You can dynamically point it to same drive.
Go to Top of Page
   

- Advertisement -