Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - need help restoring a deleted thread
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

need help restoring a deleted thread

 Post Reply Post Reply
Author
iSec View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 February 2005
Status: Offline
Points: 1140
Post Options Post Options   Thanks (0) Thanks(0)   Quote iSec Quote  Post ReplyReply Direct Link To This Post Topic: need help restoring a deleted thread
    Posted: 09 September 2007 at 2:30am
MS SQL Server database,
I have a backup of the database that was done last night...
One moderator mistakenly deleted one of the most popular topics on my forum, and its her own topic..(fortunately)

I created a test database and imported the backup that was done last night on that test db... now I need to know how to get that one topic moved from the test database to the actual database.

The deleted thread is still in the backup, is there any query that I can run to get this back or is this impossible to accomplish? 

Edited by Info_Tech - 09 September 2007 at 2:37am
"When it gets dark enough, you can see the stars"
-Charles A. Beard
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: 09 September 2007 at 11:52am
this is possiable.

you need to

1. create a conection to both DB's
2. get the topic details from the topic table loaded into a array or an open connection
3. get the topic threads from the threads table with the Topic_ID of above Topic
4. use the insert SQL command to copy all aspects of the topic (topic table details) of that ID into a new topic into the latest/live DB.
5. requery the latest DB to get the new topic ID thats been created in the topic table.
6. use that ID and insert the posts/threads from the old threads table into the new Database threads table using the topic ID value as the ID that was collected/created in step 5.

im not sure if the post cout is changed when deleted or not.; but that will get the topic back into the live Database. Its not an easy job but you can/could use Enterprise manager or SQL Express manager studio
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.