Views : 17.462.162


Jogue Gratis para sempre Mu Online Nacional, servidor dedicado Brasileiro!
Autor: allan
Corrigir Users Online
470 Views
Coments:

Saiba como Corrigir Usuarios Online em Site de Mu, e outros.

• Contas Presas 
• Online no Server e Offline no Site
• Error na tabela Memb_stat

 

 


***
1 -  Deletar manualmente a tabela 'Memb_Stat' inclusa na database MuOnline.

 

2 - Execute a Query abaixo para excluir as Procedures 'WZ_CONNECT_MEMB & WZ_DISCONNECT_MEMB'

 

USE [MuOnline]
GO

 

/****** Object: StoredProcedure [dbo].[WZ_CONNECT_MEMB] Script Date: 08/15/2012 09:36:51 ******/
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[WZ_CONNECT_MEMB]') AND type in (N'P', N'PC'))

DROP PROCEDURE [dbo].[WZ_CONNECT_MEMB]
GO

USE [MuOnline]
GO

/****** Object: StoredProcedure [dbo].[WZ_DISCONNECT_MEMB] Script Date: 08/15/2012 09:38:27 ******/
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[WZ_DISCONNECT_MEMB]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[WZ_DISCONNECT_MEMB]
GO

 

3 - Execute a Query abaixo para Incluir Nova Procedure  'WZ_CONNECT_MEMB'

CREATE PROCEDURE WZ_CONNECT_MEMB
@uid varchar(20),
@server varchar(20),
@uip varchar(20)
AS
Begin

BEGIN TRANSACTION
SET NOCOUNT ON
IF EXISTS ( SELECT memb___id FROM MEMB_STAT WITH (READUNCOMMITTED)
WHERE memb___id = @uid )
Begin
UPDATE MEMB_STAT
SET ip = @uip , connectstat = 1 , servername = @server , ConnectTM = (getdate())
WHERE memb___id = @uid
End

ELSE
Begin
INSERT INTO MEMB_STAT ( memb___id,ip,connectstat,servername) valueS (
@uid,
@uip,
1,
@server
)
End

 
IF(@@Error <> 0 )
ROLLBACK TRANSACTION
ELSE
COMMIT TRANSACTION
SET NOCOUNT OFF
End
GO

SET QUOTED_IDENTIFIER OFF
GO

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_NULLS OFF
GO
 
 
 

4 - Execute a Query abaixo para Incluir Nova Procedure  'WZ_DISCONNECT_MEMB'

CREATE PROCEDURE WZ_DISCONNECT_MEMB
@uid varchar(20)
AS

Begin
BEGIN TRANSACTION
SET NOCOUNT ON
IF EXISTS ( SELECT memb___id FROM MEMB_STAT WITH (READUNCOMMITTED)
WHERE memb___id = @uid )
Begin

UPDATE MEMB_STAT
SET DisConnectTM = (getdate()), connectstat = 0 WHERE memb___id = @uid
End

ELSE
Begin
INSERT INTO MEMB_STAT ( memb___id,DisConnectTM,connectstat) valueS (
@uid,
(getdate()),
0
)
End
IF(@@Error <> 0 )
ROLLBACK TRANSACTION
ELSE
COMMIT TRANSACTION
SET NOCOUNT OFF
End
GO

SET QUOTED_IDENTIFIER OFF
GO

SET ANSI_NULLS ON
GO

 
 
 

4 - Execute a Query abaixo para Incluir Tabela   'MEMB_STAT'

CREATE TABLE [dbo].[MEMB_STAT] (
[memb___id] [nvarchar] (10)   NULL ,
[ConnectStat] [tinyint] NULL ,
[serverName] [nvarchar] (20)  NULL ,
[iP] [nvarchar] (15)  NULL ,
[ConnectTM] [smalldatetime] NULL ,
[DisConnectTM] [smalldatetime] NULL
) ON [PRIMARY]
GO

Pronto, Solucionado qualquer tipo de conflito envolvendo informações de usuarios conectados. 

1/52/53/54/55/5
Jogue Gratis - Mu Americas 2020 Season 15