Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a SQL Server 2005 database backup file (.bak), and I want to grab the data of this file and import it to an already existing database. Since the backup file contains database information as well, a simple Restore doesn't seem to work - because it needs the database, from which the backup was made, to be present.

How can I resolve this issue in a quick and easy way? I have access to the 2005 database as well, if I need to create the backup in a different manner.

The two SQL Server instances runs on different machines.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

You can not. Your best bet is to restore to a different database name (doable) then access the data from there. Backups ONLY restore to databases. You can not extract files easily.

You need to restore to a database.

Since the backup file contains database information as well, a simple Restore doesn't seem to work

Why?

share|improve this answer
    
Thanks, I just figured that one out :-) The problem was that I had to have a database with the same name! (As you can see on my post which I posted 35 secs after this ;-)) –  Björn Oct 22 '10 at 9:53
    
But you do not ;) you can rename the restored database ;) –  TomTom Oct 22 '10 at 13:21

OK, I think I was a bit to eager to ask here. Instead of restoring only tables (which seems almost impossible), I created a new database with the same name as the backup:ed one. Then I just choosed restored and under Options I selected Replace existing database and it seems to work fine!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.