[Release]CLEAN database + MSSQL cleaning script

09/14/2009 16:40 Zombe#1
My 666th post!


Ok, so I know everyone is expecting the IPbanV2/3 from me as my next release, but I decided I will do this first, because it took me a lot less time.
[Only registered and activated users can see links. Click Here To Register...]
ALL info is deleted, except what is required to run the server with all functions like in the silkbotter's database. Tested by myself, and working.
NOTE: Siege is not added, but you can add it easily with the script. I didn't add siege, because I thought that you will want to set the start time like you want to, yourself.
Restore the backup like with the full-of-chinese-crap silkbotter's database


And the MSSQL query:

Code:
/* -----{Zombe's database cleaning script}----- */

use account;
DELETE FROM C_IP_BAN;
DELETE FROM C_IP_PERMIT;
DELETE FROM C_IP_PWD;
DELETE FROM C_LOGINIPBLOCK_LOG;
DELETE FROM C_SEQUENCE;
DELETE FROM CP_USER_PROFILE;
DELETE FROM MB_USR_IP;
DELETE FROM MB_USR_PUN;
DELETE FROM Tbl_user;
DELETE FROM USER_CONNLOG_KEY;
DELETE FROM USER_PROFILE;
GO
use billing;
DELETE FROM bl_error_log;
DELETE FROM c_sequence;
DELETE FROM dba_online_daily;
DELETE FROM dba_online_daily_notok;
DELETE FROM Tbl_KeepId;
DELETE FROM user_account;
DELETE FROM user_account;
DELETE FROM user_charge_log;
DELETE FROM user_everyday_use_info;
DELETE FROM user_give_log;
DELETE FROM user_use_log;
DELETE FROM user_use_log_bk;
GO
use cash;
DELETE FROM bl_error_log;
DELETE FROM Tbl_Cash_zj;
DELETE FROM user_cash;
DELETE FROM user_charge_log;
DELETE FROM user_use_log;
GO
use character;
DELETE FROM C_EVENT_ITEM_OP
DELETE FROM c_restword;
DELETE FROM char_connlog;
DELETE FROM CHAR_CONNLOG_KEY;
DELETE FROM DEL_USER_CHAR_LIST;
DELETE FROM DEL_USER_CHAR_LIST_SECEDE;
DELETE FROM GM_ITEM_MST;
DELETE FROM GUILD_CHAR_INFO;
DELETE FROM GUILD_INFO
WHERE guild_code NOT LIKE 'MASTERCODE';
DELETE FROM GUILD_INFO_SECEDE;
DELETE FROM GUILD_PEERAGE
WHERE guild_code NOT LIKE 'MASTERCODE';
DELETE FROM MSSNGR_CHAR_LIST;
DELETE FROM SIEGE_INFO;
DELETE FROM SIEGE_RESULT_LOG;
DELETE FROM user_bag
WHERE character_no NOT LIKE 'DEKARON_000001';
DELETE FROM user_bag_copy;
DELETE FROM user_bag_secede;
DELETE FROM user_character
WHERE character_no NOT LIKE 'DEKARON_000001';
DELETE FROM user_character_secede;
DELETE FROM USER_POSTBOX;
DELETE FROM USER_POSTBOX_SECEDE;
DELETE FROM User_Quest_Doing;
DELETE FROM user_quest_doing_secede;
DELETE FROM User_Quest_Done;
DELETE FROM user_quest_done_secede;
DELETE FROM user_skill
WHERE character_no NOT LIKE 'DEKARON_000001';
DELETE FROM user_skill_secede
DELETE FROM user_slot
WHERE character_no NOT LIKE 'DEKARON_000001';
DELETE FROM user_storage;
DELETE FROM user_storage_copy;
DELETE FROM USER_STORE;
DELETE FROM USER_STORE_copy;
DELETE FROM USER_STORE_SECEDE;
DELETE FROM user_suit
WHERE character_no NOT LIKE 'DEKARON_000001';
DELETE FROM user_suit_copy;
DELETE FROM user_suit_secede;
GO
This is so that you wouldn't need to download the database over again, if you have the old one.
NOTE: I am not responsible for the data you lose, when you execute this script. It will delete all your characters, accounts, items and everything else.
09/14/2009 16:49 janvier123#2
Thx maybe i will :)
09/14/2009 16:55 Zombe#3
Oh, crap, I forgot to leave the guild's mastercode... With this you can't create guilds.
1 second, I will reupload it and edit the script... Don't use it yet

EDIT: ok, changed the script and reuploaded the DB so that the mastercode is left.
EDIT2: Ok, now I'm having problems creating a GM char.. don't use this DB. yet.
09/15/2009 09:47 FattyB#4
You are missing a bunch of exceptions. Just use my database cleaner at the end of the thread below...

[Only registered and activated users can see links. Click Here To Register...]
09/15/2009 16:47 Zombe#5
Fixed everything, updated the link, updated the script.
Everything seems to work :)
10/06/2009 08:23 skystar2001#6
THANKS MAN
10/06/2009 09:36 Bigshow107#7
+#6 reported at GMT+3 : 2009 OCT 6 10:35 cause spam not first time you say thanks press thanks if you think your self want to say thanks
12/17/2009 21:32 EliteWarrior#8
Any one tested this and verified working good? Im gonna try this.
12/18/2009 00:31 Decima#9
it works, but if u have siege working in ur current DB, this will break it
12/18/2009 00:55 ҉ THT ҉#10
and it delete the ip banned members
02/15/2010 13:01 razooor#11
dont works for me =/ cause in my DB no Mastercodes like 'DEKARON_000001'.
I use the 1 click server from Silkbotter. Please can anyone send me a Clean Database without any Characters but with all Mastercodes what needed to create Chars?
02/15/2010 19:14 ҉ THT ҉#12
Lol this works with 1 click server,, or just download the clean database
02/15/2010 21:44 razooor#13
if i restore the clean database i dont found any Mastercodes in there... cant create Character

Do i have to delet the LogFiles?
02/16/2010 01:03 ҉ THT ҉#14
No,, maybe you did something wrong with the job steps

But I am sure this works with 1 click server
02/16/2010 03:33 xfactorbowler#15
yes it works on 1click servers.