I had 2 problems with the MUServer DB. And i fix them:
1. SQLSTATE:42000, Diagnosis:[Microsoft][ODBC_SQL Server Driver][SQL Server]Could not find procedure 'WZ_PeriodItemSelect'.
This is the fix. Run this in New querty if you use sql2005.
Code:
CREATE Procedure WZ_PeriodItemSelect
@UserGuid int,
@CharacterName varchar(10)
AS
BEGIN
DECLARE @ErrorCode int
DECLARE @ItemInfoCount int
DECLARE @PeriodIndex int
DECLARE @ExpireDate smalldatetime
DECLARE @UsedInfo tinyint
SET @PeriodIndex = 0
SET @ErrorCode = 0
SET @ItemInfoCount = 0
SET @UsedInfo = 0
SET NOCOUNT ON
DECLARE CUR CURSOR FOR SELECT [PeriodIndex], [ExpireDate], [UsedInfo] FROM T_PeriodItem_Info WHERE UserGuid = @UserGuid AND CharacterName = @CharacterName AND UsedInfo = 1 FOR UPDATE
OPEN CUR
FETCH NEXT FROM CUR INTO @PeriodIndex, @ExpireDate, @UsedInfo
WHILE( @@fetch_status <> -1 )
BEGIN
IF( @@fetch_status <> -2 )
BEGIN
IF( @ExpireDate < GetDate() )
BEGIN
UPDATE T_PeriodItem_Info SET UsedInfo = 0 WHERE PeriodIndex = @PeriodIndex
END
END
FETCH NEXT FROM CUR INTO @PeriodIndex, @ExpireDate, @UsedInfo
END
SELECT *, DATEDIFF( minute, BuyDate, GETDATE() ) AS UsedMinutes, DATEDIFF( minute, GETDATE(), ExpireDate ) AS LeftMinutes FROM T_PeriodItem_Info where UserGuid = @UserGuid AND CharacterName = @CharacterName AND UsedInfo = 1
IF( @@Error <> 0 )
BEGIN
SET @ErrorCode = -1
END
CLOSE CUR
DEALLOCATE CUR
SET NOCOUNT OFF
END
GO
And after that you may get this error:
2. SQLSTATE:42S02, DIagnosis:[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'T_Perioditem_Info'
Run this in new querty:
Code:
CREATE TABLE [T_Perioditem_Info] (
[PeriodIndex] [int] IDENTITY (1, 1) NOT NULL ,
[UserGuid] [int] NOT NULL ,
[CharacterName] [char] (10) NOT NULL ,
[ItemCode] [int] NOT NULL ,
[EffectType1] [tinyint] NOT NULL ,
[EffectType2] [tinyint] NULL ,
[UsedTime] [int] NOT NULL CONSTRAINT [DF_T_Perioditem_Info_UsedTime] DEFAULT (0),
[LeftTime] [int] NOT NULL ,
[BuyDate] [smalldatetime] NOT NULL ,
[ExpireDate] [smalldatetime] NOT NULL ,
[UsedInfo] [tinyint] NOT NULL CONSTRAINT [DF_T_Perioditem_Info_UsedInfo] DEFAULT (0),
[OptionType] [tinyint] NOT NULL CONSTRAINT [DF_T_Perioditem_Info_OptionType] DEFAULT (2)
) ON [PRIMARY]
GO
No more sql errors.
For this i didint find a fix:
And what about that errors:
[log time] UPDATE character set clvl ... ... ... ..
error : copy 248
[log time] UPDATE character set clvl ... ... ... ..
error : copy 1440
error : copy 844
error : copy 48
etc.