Print Page | Close Window

Merging two databases

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=15977
Printed Date: 13 April 2026 at 1:47pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Merging two databases
Posted By: AlexDP
Subject: Merging two databases
Date Posted: 25 July 2005 at 4:08pm
My forum was recently hacked (brute force password cracker on admin account I think) and all the posts were deleted.

Instead of closing the site I allowed members to continue posting in one new forum (all others were deleted too). As I have a backup (there is a gap between backup and hack time though) I want to restore the old posts and keep the new ones.

I assumed I could just add the new ones to the backup database but because of the primary key fields it is not working. The primary key is being changed, for example Post ID 9587 is being changed to 8541, therefore all replies will be jumbled up, etc.

The same is happening with members/users, polls etc.

How do I merge the two databases together? All help gratefully received.

I'm using WWF v.7.92 although this is really a databse probelm, using MS Access 2000.


-------------
http://www.pimms-pages.co.uk - Guinea Pigs World
http://www.pimms-pages.co.uk/forums/ - Guinea Pig Forums



Replies:
Posted By: dj air
Date Posted: 25 July 2005 at 4:18pm
try using the import tool

using identity creation, im not to sure on this

i have done this with a SQL database but not access


Posted By: AlexDP
Date Posted: 25 July 2005 at 4:36pm
The Import tool isn't working - it's just creating a new table with the data not adding it to the tables already there.
I can't just copy and paste because of the primary keys. Is there a way I can turn them off, paste the data and then make them primary keys again?


-------------
http://www.pimms-pages.co.uk - Guinea Pigs World
http://www.pimms-pages.co.uk/forums/ - Guinea Pig Forums


Posted By: dj air
Date Posted: 25 July 2005 at 5:01pm
im sure you are able to import into a table without creating new one


Posted By: JJLatWebWiz
Date Posted: 25 July 2005 at 10:58pm

I think you've created a pretty serious problem for yourself.  In my opinion, in a situation like that, you should have shut down the forum until repairs were made.

I haven't used the Access version in several years, but I assume the ID field is auto numbering, so you can just copy and paste from the backup MDB into the production MDB.  The auto-numbered Thread_ID will set new ID numbers for the records being pasted in.  You should keep a record of the ID's that are created during the combining of the data.  If only the tblThreads was emptied, then the links to at least Topic, Forum, and Author should be intact.  However, since you said the users and polls are having the same problem, are we to assume that every last table was blanked out?  If all the tables have been rebuilt from ID zero then there is no way you can do a simple import.  It's not impossible, though it will require a lot of manual adjustments.  Someone with an in-depth understanding of how WWF works and Access expertise will have to do the work.

I think even if someone deleted all the records, the auto ID fields would continue from where they left off, so it seems that something else might have happened like someone completely replaced the MDB file.  But that would have required you to set up the forum configurations again.  Did you have to do that?

In any case, if you suspect that someone acquired your Admin password, you need to figure out how to prevent that.  Using the web interface to perform a brute force attack against a 160-bit encrypted password would be highly impractical.  Such an attack would be far more plausable (though still not a trivial task) if the attacker was in possession of the hash and salt, but even then a hacker would be wasting his time to try break the password since there are easier ways to acquire admin rights in WWF once in control of the raw data.  You have to take every precaution and use every "best practice" to guard the MDB.  Make sure your host (FastHosts?) has configured the location of the MDB file so it is outside and inaccessible from the wwwroot.  It should not be in a virtual folder.  Make sure you don't have any domain user accounts with access to the folder wherein the MDB is stored.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net