Post Pacific

Post Pacific (https://postpacific.loc-online.com/index.php)
-   Темы без сохранившегося раздела (https://postpacific.loc-online.com/forumdisplay.php?f=10001)
-   -   [share/sql] clean up account db (https://postpacific.loc-online.com/showthread.php?t=5598)

srh 31.08.2006 03:59

[share/sql] clean up account db
 
i never see here, if exists sorry.
this script delete newerused accounts from lin2db:
Code:

begin tran
delete from user_auth    where exists(select 1 from user_account where user_account.last_login is null and user_account.account=user_auth.account)
delete from user_account    where    user_account.last_login is null
commit

backup your db before use any script :)

aralyon 31.08.2006 16:41

It is incomplete, you have to delete record from ssn and user_info as well.
Code:

begin tran
delete from ssn where [name] in (select account from user_account where last_login is null);
delete from user_auth where account in (select account from user_account where last_login is null);
delete from user_info where account in (select account from user_account where last_login is null);
delete from user_account where last_login is null;
commit


kgptzac 31.08.2006 17:07

thx for sharing :D

rodier 31.08.2006 17:29

its not complete even with aralyon addendum..
u need to delete useless chars +skills +items too ;-D

aralyon 31.08.2006 21:01

Quote:

Originally Posted by rodier (Post 66124)
its not complete even with aralyon addendum..
u need to delete useless chars +skills +items too ;-D

Really? In universe I live, there is usually no chars on an account which was never used. Please read whole statement.

Stavr 11.09.2006 15:57

Region and Clan BBS
 
sorry - wrong topic... i'm almost dreaming

demon 11.09.2006 18:41

asd asd asd

Drag 17.09.2006 05:48

Quote:

Msg 468, Level 16, State 9, Line 2
Cannot resolve the collation conflict between "Chinese_PRC_CI_AS" and "Korean_Wansung_CI_AS" in the equal to operation.
Msg 468, Level 16, State 9, Line 4
Cannot resolve the collation conflict between "Chinese_PRC_CI_AS" and "Korean_Wansung_CI_AS" in the equal to operation.
Whoot?
I need to check all tables with collation ? :| Dunno wtf ^^

hater 17.09.2006 05:54

Who ca give SQL for wipe all chars?

Drag 17.09.2006 06:13

wipe all chars?
DELETE FROM user_data
etc xD
or just make new DB

Stay on topic xD
I need help with that error... ^^"

hater 17.09.2006 10:54

Quote:

DELETE FROM user_data
mm, and what about user skills, items etc?

Phantom2005 17.09.2006 15:30

just delete database lin2world.. then run lin2world sql scripts again.


All times are GMT. The time now is 16:19.