Web Wiz - Green Windows Web Hosting - Celebrating 25 Years!

  New Posts New Posts RSS Feed - Merging two databases
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Merging two databases

 Post Reply Post Reply
Author
AlexDP View Drop Down
Groupie
Groupie


Joined: 19 October 2004
Location: England
Status: Offline
Points: 45
Post Options Post Options   Thanks (0) Thanks(0)   Quote AlexDP Quote  Post ReplyReply Direct Link To This Post Topic: Merging two databases
    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.
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
AlexDP View Drop Down
Groupie
Groupie


Joined: 19 October 2004
Location: England
Status: Offline
Points: 45
Post Options Post Options   Thanks (0) Thanks(0)   Quote AlexDP Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post Posted: 25 July 2005 at 5:01pm
im sure you are able to import into a table without creating new one
Back to Top
JJLatWebWiz View Drop Down
Groupie
Groupie
Avatar

Joined: 02 March 2005
Location: United States
Status: Offline
Points: 136
Post Options Post Options   Thanks (0) Thanks(0)   Quote JJLatWebWiz Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.