Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Restoring the backed up files 2

Status
Not open for further replies.

Faheem786

Programmer
Joined
Sep 5, 2001
Messages
30
Location
HK
Hi there,

I have an identical database on two different host servers (load balance servers) which I would like to combine as one table locally for creating some report.

The databases are exactly the same but the data are different.

I got the backup files of both the databases. Now I would like combine both the databases into one. I have the same database on my local sql server.I know how to retsore one backup file at a time by going into the sql server enterprise maneger. But when I restore the second file the first set of data gets deleted.

Is there any way so that I can just append the data instead of overwriting the old one?

Thanks
Faheem
 
You cannot append data using RESTORE. You must restore the 2nd database with a different name and then append the data to the 1st database. You can do that with SQL insert statements or use the Import/Export Wizard to copy the data. Terry L. Broadbent - DBA
SQL Server Page:
If you want to get the best answer for your question read faq183-874.
 
Hi Terry,

Thanks for your answer. But how could I import from the backup file using import export wizard. How I will select that backup file in data source??

Pls help me..

Thanks again
Faheem
 
You cannot select the backup file for import or export. You must restore the databases and then import the data from the 2nd database into the 1st database or vice-versa. Terry L. Broadbent - DBA
SQL Server Page:
If you want to get the best answer for your question read faq183-874.
 
Faheem,

Did you look at BCP - depending on the size of your tables this might be a faster way of doiing the job.

Use BCP to download both tabels to flatfiles from their original databases. Create a new table and load both flatfiles into it using BCP again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top