[help] Sql Script @ Ways To Delete Char..

Newbie Spellweaver
Joined
Apr 15, 2008
Messages
20
Reaction score
0
Hello fellow ragezoners...
I'm a seasoned 'reader' of the forum, but a noob in asking for help. Something has been bugging me for quite a long time & perhaps this time I cud ask all of u a favor.

My server have like 17k user & abt 20k char (since I allowed 3 char per id). The porblem is, as players come & go, how do I delete the id ALONG WITH THE CHARACTERS. Since from my trial, I found out that even after I deleted the ID, the char database still remains & clogs the server.

I deleted abt 2k of IDs & their char by reffering to GMCharEdit. As crazy as it may sound, I decided I need help, so...please everyone. Thx in advance.
 
@cruzades or Vision can i ask script for auto deletion of inactive accounts with trigger so i won't do it manually :D

Open your RanUser>Table>UserInfo.dbo>Trigger

Rightclick Trigger>Select New Trigger And paste this Script:


Code:
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
 
CREATE TRIGGER [dbo].[autodeletion] ON [dbo].[UserInfo]
after update
as
BEGIN
 
DELETE FROM [UserInfo] WHERE DATEDIFF(day,[UserInfo].LastLoginDate, GETDATE()) >= 30
 
END

http://forum.ragezone.com/showthread.php?t=399081&highlight=inactive+character

Credit To Sir Skyblue
 
Last edited:
Upvote 0
Hmmm...I've tried the instructions...But what I am worried most has HAPPENED.

1. The delete inactive account trigger works perfectly..
Now...my server has only 6k players from the previous 17k.

2. But...the char that belongs to the deleted account is still there. So, I'm left with 6k accounts while no of char count is 20k!!

So, is there a way to remove this dead link?

I'm pretty sure this hasn't been discussed before...
 
Upvote 0
after i execute it this is what i got
View attachment 53475


DELETE FROM [RanGame1].[dbo].[ChaInfo]
WHERE ChaDeleted = 1
****************************

Copy above script If you have already a trigger like example Auto_Reborn. . just Insert that below the BEGIN and execute. . 100% it will work without any errors^_^ goodluck. . .
 
Upvote 0
Hmmm...I've tried the instructions...But what I am worried most has HAPPENED.

1. The delete inactive account trigger works perfectly..
Now...my server has only 6k players from the previous 17k.

2. But...the char that belongs to the deleted account is still there. So, I'm left with 6k accounts while no of char count is 20k!!

So, is there a way to remove this dead link?

I'm pretty sure this hasn't been discussed before...

HMM...sorry for double posting...seems NOBODY notice this problem yet. PLS...work on this...as this will bring us problem in the future..even in ep4.
I NEED A TRIGGER TO DELETE THE CHAR OF DELETED ID. & NO...THE CHAR(S) HAVEN'T BEEN DELETED IN-GAME.
 
Upvote 0
Back