0

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.

2 Answers 2

2

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?

2
  • 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, 2010 at 9:53
  • But you do not ;) you can rename the restored database ;)
    – TomTom
    Oct 22, 2010 at 13:21
0

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!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .