Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Restore a single topic?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Restore a single topic?

 Post Reply Post Reply
Author
RadioActiveLamb View Drop Down
Groupie
Groupie


Joined: 29 December 2005
Location: United States
Status: Offline
Points: 171
Post Options Post Options   Thanks (0) Thanks(0)   Quote RadioActiveLamb Quote  Post ReplyReply Direct Link To This Post Topic: Restore a single topic?
    Posted: 28 January 2008 at 4:38am
One of my other admins accidentally deleted a topic. One that was about 30 pages long and ran for three years. It is very important information. This data was deleted three days ago.
 
Is it possible to restore a single thread? The back-end is MS SQL Express 2005. I have some backups, but I'm unsure how to restore the ONE thread.
 
Any help is greatly appreciated.
Back to Top
MadDog View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 01 January 2002
Status: Offline
Points: 3008
Post Options Post Options   Thanks (0) Thanks(0)   Quote MadDog Quote  Post ReplyReply Direct Link To This Post Posted: 28 January 2008 at 5:18am
There is no way to restore it unless you really know MSSQL.

Long story short, you have to use the backup database, find the topic you want, find the threads from the topic, create SQL code for each record, go to the current database, and run the SQL code to insert all the missing information.
Back to Top
Nick-V View Drop Down
Senior Member
Senior Member


Joined: 26 October 2002
Location: United Kingdom
Status: Offline
Points: 319
Post Options Post Options   Thanks (0) Thanks(0)   Quote Nick-V Quote  Post ReplyReply Direct Link To This Post Posted: 28 January 2008 at 5:21am
I suspect you could link MS Access to the two databases and copy the relevant topic and its threads between them.
Back to Top
RadioActiveLamb View Drop Down
Groupie
Groupie


Joined: 29 December 2005
Location: United States
Status: Offline
Points: 171
Post Options Post Options   Thanks (0) Thanks(0)   Quote RadioActiveLamb Quote  Post ReplyReply Direct Link To This Post Posted: 28 January 2008 at 5:33am
Originally posted by MadDog MadDog wrote:

use the backup database, find the topic you want, find the threads from the topic, create SQL code for each record, go to the current database, and run the SQL code to insert all the missing information.
 
I'm certainly no SQL expert. I maintain them in the way of backups, routine maintenance and optimization. I've never dealt with the data itself. I have programmers for that Tongue
 
I think I understand what you're saying though. However, I start with the "Topic" record, but I'm not able to edit the Topic_ID, being a key field. Any clues there?
Back to Top
Nick-V View Drop Down
Senior Member
Senior Member


Joined: 26 October 2002
Location: United Kingdom
Status: Offline
Points: 319
Post Options Post Options   Thanks (0) Thanks(0)   Quote Nick-V Quote  Post ReplyReply Direct Link To This Post Posted: 28 January 2008 at 5:44am

If you can set up a topic record and the auto-generated ID is different then simply import the relevant thread records with the topicID field changed to whatever it is in the receiving database.

If you do this you'll need to look at the email-notify table too.
Back to Top
RadioActiveLamb View Drop Down
Groupie
Groupie


Joined: 29 December 2005
Location: United States
Status: Offline
Points: 171
Post Options Post Options   Thanks (0) Thanks(0)   Quote RadioActiveLamb Quote  Post ReplyReply Direct Link To This Post Posted: 28 January 2008 at 5:50am
That's a good idea. However, before I proceed, I'd like to maintain the same topic number if possible. They aren't re-used, and there are a lot of links to various posts within the topic. I think I'll also run into a problem restoring threads, since the "Thread_ID" is also a read-only field.
 
It wouldn't be an issue to take the forum down while restoring the data, if that's the reason I can't edit the index fields.
Back to Top
RadioActiveLamb View Drop Down
Groupie
Groupie


Joined: 29 December 2005
Location: United States
Status: Offline
Points: 171
Post Options Post Options   Thanks (0) Thanks(0)   Quote RadioActiveLamb Quote  Post ReplyReply Direct Link To This Post Posted: 28 January 2008 at 5:51am
Btw, Nick - Thanks for your help Thumbs%20Up
Back to Top
Nick-V View Drop Down
Senior Member
Senior Member


Joined: 26 October 2002
Location: United Kingdom
Status: Offline
Points: 319
Post Options Post Options   Thanks (0) Thanks(0)   Quote Nick-V Quote  Post ReplyReply Direct Link To This Post Posted: 28 January 2008 at 5:58am
In the normal addition of records the ID is auto-created. There is some way to over-ride this for imports but I can't remember how - check DTS packages. Its not about bringing the database down. A new ID doesn't matter if you change the child records.
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.