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
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Restore DB to Multiple Drives

Author  Topic 

homebrew
Posting Yak Master

114 Posts

Posted - 2006-03-13 : 13:18:45
Here's what I'd like to do: I have a big database (DatabaseA) that exists on 1 drive, with the log on another drive. I'd like to restore DatabaseA's backup, but call it DatabaseB so I can retrieve some data from B and copy it to A. I don't have room on any one drive for the whole Database, so I thought I should be able to create DatabaseB, spread across multiple drives, and restore DatabaseA to B and have it use the files on the various drives. I created DatabaseB the way I want it, but can't seem to get the restore to work.

Is this doable ?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-03-13 : 13:43:35
You can move your MDF, LDF, and NDFs to separate drives during the restore process. If you don't currently have any NDFs, then the most you can split is to two drives.

Tara Kizer
aka tduggan
Go to Top of Page

homebrew
Posting Yak Master

114 Posts

Posted - 2006-03-13 : 14:02:18
In the original database 'A', I just have 1 LDF and 1 MDF. That's what the .BAK is created from. I want to restore it do a database 'B' with 1 LDF, and 1 MDF and 5 NDFs.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-03-13 : 14:21:15
You can't do that with the restore command. You'll first have to restore the database to a maximum of 2 drives. You'll then have to create the NDFs and move the data to these.

If you've got some server out there with the required disk space, I'd suggest doing the restore on that one, moving your data around to the multiple drives, backup that database, then restore it onto the server that you want.

Tara Kizer
aka tduggan
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2006-03-14 : 03:24:57
You might also need to Shrink it [i.e. on your spare server] before re-backing up, otherwise the restore on your main server will try to pre-create the files to original size before starting the restore.

Kristen
Go to Top of Page

homebrew
Posting Yak Master

114 Posts

Posted - 2006-03-14 : 07:55:47
Thanks for the replies. I resolved it a different way. I had room on a server for the database, but not for the database & the .BAK file at the same time. I did a restore across the network: .BAK on one server restored to DB on another server, so I could get the tables I needed.
Go to Top of Page
   

- Advertisement -