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 2008 Forums
 Transact-SQL (2008)
 What is the best way to bring in a bak file databa

Author  Topic 

cplusplus
Aged Yak Warrior

567 Posts

Posted - 2012-04-16 : 19:38:14
I already have the database, but is incomplete, i have downloaded the latest database file as a bak file from other server.

which is almost 500 MB size, now want to load that bak file's database to my box. which already has database which is 20 MB in size incomplete.

If i detach this DB from my box and restore it back via 500 MB DB, it is giving error message saying cannot add it as db with same name.

I want to keep the name intact.

Thank you very much fro the helpful info.

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2012-04-17 : 02:12:41
Don't mix detach and restore.
First: backup your incomplete database in case you want to have it back.
Second: restore from the downloaded backup with overwriting the existing database.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

vinu.vijayan
Posting Yak Master

227 Posts

Posted - 2012-04-17 : 02:57:35
Yea. Backup the 20mb Database and then overwrite it with the fresh backup of 500mb

N 28° 33' 11.93148"
E 77° 14' 33.66384"
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-04-17 : 13:35:05
have you done any change to db after last restore?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -