本帖最后由 commdos 于 2012-11-10 23:00 编辑
在论坛转换前,如果能清除广告垃圾帖子,将加快转换时间,在删除前请做好数据备份!!,在access中执行相关SQL即可(3楼意见可能会误删活动用户帖子,所以进行了修改。)
1.删除Dv_message中的系统消息:delete from Dv_message where title like '欢迎光临*' 2.清理垃圾帖子数据
删除内容重复的帖子
select topic,count(*) into temp3 from dv_bbs1 where len(topic)>6 group by topic having count(*) >1; select ip into temp4 from dv_bbs1 where topic in (select topic from temp3) order by ip;
delete from temp4 where ip in (select ip from dv_bbs1 where username in (select username from dv_user where lockuser=0 and lastlogin-joindate>15));
delete from dv_bbs1 where ip in (select ip from temp4) ; 删除被锁贴的帖子:
select ip into temp4 from dv_bbs1 where locktopic >0 delete from temp4 where ip in (select ip from dv_bbs1 where username in (select username from dv_user where lockuser=0 and lastlogin-joindate>15));
delete from dv_bbs1 where ip in (select ip from temp4) ; 3.删除log日志:delete from dv_log where 1=1; 4.删除锁定广告用户:delete from dv_user where lockuser=1 5.删除过期只登录过一次的用户: delete from Dv_user where userlogins<2 and joindate < #2012/01/01 0:10:12#
|