January 11, 2011 at 10:56 am
Hello Everyone
I am in the planning stages of overwriting a database with a backup from another environment.
I took the backup by splitting the files because they were too large to copy across the network easily. I split them into 10 different files.
I am wanting to restore the database and allow the restore to overwrite the existing database, of the same name. How can I write the sql statement to do this? I don't believe I have ever had to do a restore this way.
Thanks in advance
Andrew SQLDBA
January 11, 2011 at 11:25 am
How did you split the backup files ?
Can you post your actual backup statement ?
If you used
BACKUP DATABASE AdventureWorks
TO DISK='X:\SQLServerBackups\AdventureWorks1.bak',
DISK='Y:\SQLServerBackups\AdventureWorks2.bak',
DISK='Z:\SQLServerBackups\AdventureWorks3.bak'
I would try this on a test system
RESTORE DATABASE MyDatabase
DISK='X:\SQLServerBackups\AdventureWorks1.bak',
DISK='Y:\SQLServerBackups\AdventureWorks2.bak',
DISK='Z:\SQLServerBackups\AdventureWorks3.bak'
WITH
NORECOVERY;
Keep in mind you can zip/7zip/ another compress tool your bak files to minimize copy network overhead.
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
January 11, 2011 at 12:33 pm
Sorry, that did not work.
Andrew SQLDBA
January 11, 2011 at 1:03 pm
Do you have to write script, can you just add the files in the GUI and do it that way?
'Only he who wanders finds new paths'
January 11, 2011 at 1:50 pm
I cannot add more than on data file that way.
Besides that, I try to not use the GUI
Andrew SQLDBA
January 11, 2011 at 1:50 pm
AndrewSQLDBA (1/11/2011)
Sorry, that did not work.
Can you be a bit more specific? Did it throw an error and if so what error? Something else?
Can you post the backup command that you ran?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 11, 2011 at 2:51 pm
Thank You Gila
I found my mistake
So silly, I am totally embarrassed
Andrew SQLDBA
January 12, 2011 at 12:36 am
A silly mistake happens to all of us every once in a while and with some even more frequent 😉
Please provide the feedback on the backup creation script and the final restore that solved your problem.
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply