473,395 Members | 1,386 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Compare and Restore Tables


I have a database with 44 user tables that had some data deleted. I have
a 2 month old backup of the .mdf and .ldf files I can reatach to the
Server (not the proper sql backup wizard method).

Is there a way I can compare the data that is in the old database to the
new and pull in the records from the old that don't exist in new
database?

Thanks,
Steve
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #1
1 1136
Hi

Using the INFORMATION_SCHEMA views you can write a script that uses the PKs
for each table to insert into the new table that does not already exist in
the table already.

John
"Steve Bishop" <st****@viper.com> wrote in message
news:40**********************@news.newsgroups.ws.. .

I have a database with 44 user tables that had some data deleted. I have
a 2 month old backup of the .mdf and .ldf files I can reatach to the
Server (not the proper sql backup wizard method).

Is there a way I can compare the data that is in the old database to the
new and pull in the records from the old that don't exist in new
database?

Thanks,
Steve
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Reuben Pearse | last post by:
Hi all, I've just converted the tables in a big database (approx 27 million records) from MyISAM to InnoDB. When I was using MyISAM I backed up the database by stopping MySQL and then copying...
2
by: M A Srinivas | last post by:
Hello all, I have the following requirement (SQL 2000, SP2) 1. Need to restore production database(A) to another database (B) on another server (No direct connection) 2. In the restored...
1
by: Rajesh Kapur | last post by:
Hello, We are on MySQL 4.0.21 on linux. We use InnoDB tables and foreign key constraints extensively. The mysqldump backs up the database tables in alphabetical order with foreign key...
2
by: si.downes | last post by:
Using SQL Server 2000 SP3 I'm developing a data warehouse where data will be archived off to a filegroup, this filegroup backed up and the tables in this filegroup truncated to free up space on...
2
by: Damir Wilder | last post by:
Hello! Is it at all possible (on DB2 V7.2, AIX) to restore a single table from a full table backup? The RESTORE DB command doesn't have this functionality - at least not according to the DB2...
1
by: Kent.Brooke | last post by:
When a backup is taken from server a and then redirected restore is done on server b, the tables and data is fine however db2advis says "explain & advise tables not created for user x properly"....
3
by: hikums | last post by:
Source/Production system: AIX 5.2, DB2 8.2 I have a full backup of sample db taken on 05/01/2006(logs included in backups) I have a tablespace backup of userspace1 taken on 05/03/2006(logs...
4
by: lesperancer | last post by:
it looks like this will save many versions of a relationship window, but based on the fact that the same tables are displayed in the relationship window and it will restore versions of what was...
6
by: javelin | last post by:
I'm having difficulty searching for an answer to this challenge. Can someone give me a clue on the right keywords to use to find a discussion on this subject? All of the ones I saw appear to touch...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.