Just the code you want in Query Analyzer
Delete no member Guild ( guild have 1 GM only ) :
Delete guildmember with no guild ( when you edited wrong then make bug )alter table guild nocheck constraint all
alter table guildmember nocheck constraint all
delete from guild
where EXISTS (
SELECT m.G_Name,count(*) as memb from GuildMember m
where guild.g_name=m.G_name
group by m.G_Name
having count(*) <2
)
Top 10 Guild ( as members )alter table guild nocheck constraint all
alter table guildmember nocheck constraint all
delete from guildmember
where NOT EXISTS (
SELECT * from Guild
where guild.g_name=guildmember.G_name
)
SELECT top 10 g.g_name,count(all m.g_name)as thanhvien from Guild as g join Guildmember as m
on g.g_name like m.g_name
group by g.g_Name
having count(*) > 20
order by count(*) DESC
Top 5 guild ( as resets all members in guild )
Top 5 online timeselect top 5 g.g_name,sum(c.resets) as reset from guildmember g join character c
on g.name like c.name
group by g.g_name
order by reset desc
Top average resets (per player in guild ).Edit 10 to value you want . That's value of min member of a guild.select top 10 c.name,resets,s.onlinehours from character c full join memb_stat s
on c.accountid=s.memb___id
where (c.accountid in ( select top 10 memb___id from memb_stat
order by onlinehours desc ))
and (c.name in ( select top 1 c.name from character c where c.accountid=s.memb___id order by resets desc))
order by onlinehours desc
rename accountselect top 5 g.g_name,sum(c.resets)/count(all g.g_name) as reset from guildmember g join character c
on g.name like c.name
group by g.g_name
having count(all g.g_name)>10
order by reset desc
delete account with nomore connect from 2007-06-01select * from accountcharacter
where id='9242085'
update accountcharacter
set id='ha1710'
where id='9242085'
select * from accountcharacter
where id='ha1710'
-----------------------
select * from character
where accountid='9242085'
update character
set accountid='ha1710'
where accountid='9242085'
select * from character
where accountid='ha1710'
----------------------
select * from memb_info
where memb___id='9242085'
update memb_info
set memb___id='ha1710'
where memb___id='9242085'
select * from memb_info
where memb___id='ha1710'
----------------------
select * from memb_stat
where memb___id='9242085'
update memb_stat
set memb___id='ha1710'
where memb___id='9242085'
select * from memb_stat
where memb___id='ha1710'
-----------------------
select * from warehouse
where accountid='9242085'
update warehouse
set accountid='ha1710'
where accountid='9242085'
select * from warehouse
where accountid='ha1710'
delete account that no connect ( blank account ) or longtime no connectdelete from memb_info
where memb___id in (
select memb___id from memb_stat where disconnecttm<'2007-06-01')
delete from accountcharacter
where id in (
select memb___id from memb_stat where disconnecttm<'2007-06-01')
delete from character
where accountid in (
select memb___id from memb_stat where disconnecttm<'2007-06-01')
delete from warehouse
where accountid in (
select memb___id from memb_stat where disconnecttm<'2007-06-01')
Character not in account :delete from memb_info
where memb___id not in (
select memb___id from memb_stat)
delete from accountcharacter
where id not in (
select memb___id from memb_stat)
delete from character
where accountid not in (
select memb___id from memb_stat)
delete from warehouse
where accountid not in (
select memb___id from memb_stat)
delete guild , guildmember that wrong :select accountid,character.name from character where accountid in (
select accountid from character
where name not in (select gameid1 from accountcharacter where id=accountid )
and name not in (select gameid2 from accountcharacter where id=accountid )
and name not in (select gameid3 from accountcharacter where id=accountid )
and name not in (select gameid4 from accountcharacter where id=accountid )
and name not in (select gameid5 from accountcharacter where id=accountid )
)
alter table guild nocheck constraint all
alter table guildmember nocheck constraint all
delete from guild
where g_master not in ( select name from character )
delete from guildmember
where name not in ( select name from character )
delete from guildmember
where G_Name not in ( select G_name from guild )
back up server :
Sorry my bad English . If you think my guide useful , please take a look here to help my problem . Im sadly with it :--trunkating
BACKUP LOG muonline WITH NO_LOG
USE [Muonline]
GO
--shrinking
DBCC SHRINKDATABASE(N'Muonline')
Declare @dateBackup Varchar(100)
Set @dateBackup = 'c:\muonline_' +
Convert(varchar, datepart( year , Getdate() )) + '-'+
Convert( varchar , datepart( month , Getdate() ) ) + '-'+
Convert( varchar, datepart( day , Getdate() ) ) + '.bak'
--saving backup with name and date.
BACKUP DATABASE [Muonline] TO DISK = @dateBackup WITH NOFORMAT, NOINIT, NAME = N'Muonline-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10
GO
I own 1 Muonline server . Last 2 week, my server has been flood . I dont know how the hacker attacked my server . This is a part of joinserver when being attacked :
Quote:
11:48:14a [dasxv] (222.253.205.187) User Login
RecvQ Count : 279
RecvQ Count : 278
RecvQ Count : 277
RecvQ Count : 276
RecvQ Count : 276
RecvQ Count : 275
11:48:18a [flowea] (222.253.205.187) User Login
RecvQ Count : 278
RecvQ Count : 277
RecvQ Count : 276
RecvQ Count : 275
RecvQ Count : 274
RecvQ Count : 273
RecvQ Count : 272
RecvQ Count : 271
RecvQ Count : 270
11:48:22a [contnue] (222.254.31.212) User Login
RecvQ Count : 273
RecvQ Count : 272
RecvQ Count : 271
RecvQ Count : 270
11:48:23a [Pizza] (192.168.1.10) User Login
RecvQ Count : 273
RecvQ Count : 272
RecvQ Count : 271
RecvQ Count : 270
RecvQ Count : 269
RecvQ Count : 268
RecvQ Count : 267
RecvQ Count : 266
11:48:24a [henrr1972] (123.22.113.137) User Login
RecvQ Count : 267
RecvQ Count : 266
RecvQ Count : 265
RecvQ Count : 264
[SubserverVIPR1][192.168.1.10:55903] GameServer Connect
RecvQ Count : 263
RecvQ Count : 262
RecvQ Count : 261
11:48:25a [trav103] (118.68.176.71) User Login
RecvQ Count : 263
As you see , when being flooded , join server notice much error " RecvQ Count" . At this time , all players playing get lag and dis and cant come back into game , just click on subserver bar and nothing happen ( i think because joinserver cant process at this time ) . Then i start to find solutions. I see that when turn off apache server , the flood stop immediately. So this's the first i got . Tried to change another web : mutoolz , muweb 0.8 , ... but all fail . still being flooded . Then i upgrade apacheserver to lasted version included lasted php , change webserver port ,mod_security2, mod_dosevasive for apache server, login box with .htaccess, setup security firewall ( comodo firewall pro , norton , kis , outpost firewall pro ,...) , block all port ( just open 44405 , 55901 , 55903 ) , setup ISA server to mornitor tcp-ucp connect , request , use all anti flood function ( limit TCP-UDP connection , http request per second ) but ALL FAIL . They nonstop flood my server from day to day ( except when i turn off my webserver ) . I tried search google about that but no result , i tried ask many people to help but they dont know what's my Muonline Joinserver :( . I know that my problem not really in Muonline Server Help . But i dont know what should i do now , where can i find help now . All my players going to crazy now , and me too .
If you got this problem too or know what i should do please help . Dont ask me to search anymore . I tried " recvq count" , "recvq" , "muonline recvq count" in google search but no results.
Thanks for reading .


Reply With Quote





