Last post Jul 18, 2006 08:11 AM by atlantic
Jul 12, 2006 11:13 AM|atlantic|LINK
I have a site running on DNN 3.2.2, the most used module is "forum", it has been a while the site is running and the size of DB is getting bigger and bigger, since I have limitation imposed by my web host so I am wondering if we have a way to remove the
forum posts which are old, say about 6 months old. Since the site targets latest stuff so removing old posts and replies would be fine. Now my question is;
1) Is there any such option for DNN administrator or host to remove old postings to free up space ?
2) If not, how can we do it thru DB directly ? any hints…… I understand there will be whole lot of Foreign Keys here and there so removing entries directly from tables is not as safe unless you have idea of complete schema…..may be someone has made a script
for such task.
Jul 13, 2006 03:49 AM|lemlar|LINK
Jul 18, 2006 08:11 AM|atlantic|LINK
Thanks lemlar, I finally found a workaround.....
1) Run query on table forum_posts where createddate < xdate and parentpost = 0
where xdate is the date from which you want to keep the posts
2) Then call the SP dbo.Forum_PostDelete once for every post_id that you received from query in step # 1
NOTE: please check the exact spellings for field names in table forum_posts