清空旧用户账号记录数据库脚本,其中数据库RYAccountsDB的dbo模式下的AccountsInfo表中执行删除操作,具体条件为IsAndroid列的值不等于1且UserID列的值不等于1的记录将被删除。换句话说,会删除AccountsInfo表中IsAndroid不为1且UserID不为1的记录。其它的表会清空表中的所有数据,但不会删除表的结构。
脚本内容:
----------------------------------------------------------------↓↓↓用户数据库↓↓↓-------------------------------------------------------------- DELETE RYAccountsDB.dbo.AccountsInfo WHERE IsAndroid<>1 AND UserID!=1 --用户表 GO TRUNCATE TABLE RYAccountsDB.dbo.ConfineContent --用户名限制 GO TRUNCATE TABLE RYAccountsDB.dbo.ConfineAddress --Ip限制 GO TRUNCATE TABLE RYAccountsDB.dbo.ConfineMachine --机器码限制 GO DELETE RYAccountsDB.dbo.IndividualDatum WHERE UserID NOT IN (SELECT UserId FROM RYAccountsDB.dbo.AccountsInfo) --用户详细信息 GO TRUNCATE TABLE RYAccountsDB.dbo.SystemStreamInfo --记录插入推广日志 GO TRUNCATE TABLE RYAccountsDB.dbo.SystemGrantCount --记录同一IP注册次数 GO ----------------------------------------------------------------↓↓RYRecordDB 游戏日志清理↓↓↓-------------------------------------------------------------- TRUNCATE TABLE RYRecordDB.dbo.BarrenGameLog --游戏清理日志 GO TRUNCATE TABLE RYRecordDB.dbo.RecordLottery --未知 GO TRUNCATE TABLE RYRecordDB.dbo.RecordRoomCard --赠送记录 GO TRUNCATE TABLE RYRecordDB.dbo.T_AUFillConfigLog GO ----------------------------------------------------------------↓↓总后台数据↓↓↓-------------------------------------------------------------- TRUNCATE TABLE RYPlatformManagerDB.dbo.SystemSecurity --总后登录日志记录 GO ----------------------------------------------------------------↓↓RYAgentDB 总后台数据↓↓↓-------------------------------------------------------------- TRUNCATE TABLE RYAgentDB.dbo.T_Acc_Agent --代理用户 GO TRUNCATE TABLE RYAgentDB.dbo.T_AgentCountZjbak --代理相关 GO TRUNCATE TABLE RYAgentDB.dbo.T_AgentCount --代理相关 GO TRUNCATE TABLE RYAgentDB.dbo.T_AgentMsg --代理相关 GO TRUNCATE TABLE RYAgentDB.dbo.T_AgentMsgZjbak --代理相关 GO TRUNCATE TABLE RYAgentDB.dbo.T_AgentUnrelUser --代理相关 GO TRUNCATE TABLE RYAgentDB.dbo.T_FARptCountLog --代理相关 GO TRUNCATE TABLE RYAgentDB.dbo.T_FARptCountLogZjbak --代理相关 GO TRUNCATE TABLE RYAgentDB.dbo.T_FillAgentRpt --代理相关 GO TRUNCATE TABLE RYAgentDB.dbo.T_FillAgentRptZjbak --代理相关 GO TRUNCATE TABLE RYAgentDB.dbo.T_OffLineOrder --代理相关 GO TRUNCATE TABLE RYAgentDB.dbo.T_Plm_AgentChangeLog --代理相关 GO TRUNCATE TABLE RYAgentDB.dbo.T_Rec_AgentScoreLog --代理相关 GO ----------------------------------------------------------------↓↓RYTreasureDB总金币1数据↓↓↓-------------------------------------------------------------- TRUNCATE TABLE RYTreasureDB.dbo.GameScoreInfo --金币数据 GO TRUNCATE TABLE RYTreasureDB.dbo.OnLineOrder --在线 GO TRUNCATE TABLE RYRecordDB.dbo.RecordTask GO TRUNCATE TABLE RYRecordDB.dbo.RecordEveryDayData GO TRUNCATE TABLE RYRecordDB.dbo.RecordEveryDayRoomData GO TRUNCATE TABLE RYRecordDB.dbo.RecordGrantTreasure GO TRUNCATE TABLE RYRecordDB.dbo.RecordSignin GO TRUNCATE TABLE RYRecordDB.dbo.RecordSpreadRtnFee GO TRUNCATE TABLE RYTreasureDB.dbo.GlobalAppInfo GO TRUNCATE TABLE RYTreasureDB.dbo.LotteryBetDraw GO TRUNCATE TABLE RYTreasureDB.dbo.PlayerControl GO TRUNCATE TABLE RYTreasureDB.dbo.PlayerControlLog GO TRUNCATE TABLE RYTreasureDB.dbo.RecordDrawInfo GO TRUNCATE TABLE RYTreasureDB.dbo.RecordDrawScore GO TRUNCATE TABLE RYTreasureDB.dbo.RecordInsure GO TRUNCATE TABLE RYTreasureDB.dbo.RecordPresentInfo GO TRUNCATE TABLE RYTreasureDB.dbo.RecordSpreadInfo --游--戏--抽--水 GO TRUNCATE TABLE RYTreasureDB.dbo.ShareDetailInfo GO TRUNCATE TABLE RYTreasureDB.dbo.StreamAgentPayInfo GO TRUNCATE TABLE RYTreasureDB.dbo.StreamPresentInfo GO TRUNCATE TABLE RYTreasureDB.dbo.StreamScoreInfo GO TRUNCATE TABLE RYTreasureDB.dbo.SystemStreamInfo GO TRUNCATE TABLE RYAgentDB.dbo.T_Acc_AgentPackRel GO TRUNCATE TABLE RYAgentDB.dbo.T_AUFillConfig GO TRUNCATE TABLE RYAgentDB.dbo.T_UserApplyYs GO TRUNCATE TABLE RYAgentDB.dbo.T_Acc_AgentDraw GO TRUNCATE TABLE RYAccountsDB.dbo.ApplyOrder GO TRUNCATE TABLE RYNativeWebDB.dbo.PlatformDraw0206 GO TRUNCATE TABLE RYNativeWebDB.dbo.T_PushedNews GO TRUNCATE TABLE RYNativeWebDB.dbo.T_PlatformDraw --体现管理记录
总体来说
以上脚本的作用是清理数据库中的数据,删除符合条件的记录并清空指定表中的所有数据。
发表评论