February 2, 2007 at 3:54 am
Hi,
I need to restore a db sent to me on DVD, restore filelistonly shows the log file to be 180gb and I don't have a drive here large enough to restore it to. I realise I can get the sending company to resize the log and do another backup but unfortunately time and geographical restraints are a problem. Is there anyway to do a partial restore of the database file only? I've looked at partial restore using the primary filelist but it doesn't want to restore to a database that is not the same as the original, by that I mean they both have the same tables etc., but have come from different sources.
Any help or pointers much appreciated
Thanks
Mike
February 2, 2007 at 10:17 am
Yeah, partial restore only works if the database has multiple filegroups. You can restore part of a database by only restoring certain filegroups.
I'm pretty sure that you can't restore a database backup without restoing the t-log as it existed when backed up. Hassle that it is, I think you're going to have to get the company to send you a new backup with a smaller log or, if they can detach the database and send you a copy, you could attach it and have it create a new, smaller t-log.
Greg
Greg
February 2, 2007 at 4:20 pm
If you have the space in the network where you can reach by using UNC name then
use trace flag 1807 then
restore the db using the UNC path then shrink the log file and copy log to local then detach the db and attach it locally...
MohammedU
Microsoft SQL Server MVP
February 5, 2007 at 3:53 am
Can he not use, (cant access BOL at the mo), sp_restoresinglefileonly or sp_attachesinglefileonly something like that - it will allow you to attach the database without having the log file available.
February 5, 2007 at 7:17 am
I think that still requires the space for the log to be created.
February 5, 2007 at 7:31 am
Will this not build a new log file - when doing so it will try to set the size of the logfile to the size of the original logifile...?
February 5, 2007 at 2:27 pm
sp_attach_single_file_db will work if he has a copy of the detached database, but all he has is a backup file. Thus my previous suggestion that he ask for a copy of the detached database.
Greg
Greg
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply