How fix DC/ROLLBACK problem?

01/18/2011 21:08 kacanga#1
hi all,
anyone know how fix the deadlock problem?

here one of the error i meet on PS_DBAGENT_Sytem log

err=-1, [Microsoft][ODBC SQL Server Driver][SQL Server]Transaction (Process ID 109) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction., SQL STATE: 40001, NATIVE ERROR: 1205 (0x4B5)

2009-08-23 11:57:37 ::SaveCharacter 1421 CharName ret=1, qerr=-1, {?=call usp_Save_Char_Info_E(1421,31, 0,18, 11,14,10,7,10,253, 2741,675,1028, 19,315, 7074031,217044, 781.740906,8.335684,1629.112549, 0,200,0,0,0, 0,0,0,0, 0,0)}

I hope someone can help me,thanks to all.
01/19/2011 13:44 zargon05#2
It says that your server was trying to access a DB which was being accessed by another program and hence was not able to. Do you get this error all the time?
01/19/2011 20:14 kacanga#3
yes I usually get this error :(
01/21/2011 15:36 zargon05#4
I found this somewhere else but it should guide you
[Only registered and activated users can see links. Click Here To Register...]
02/04/2017 21:23 zirvesunucum#5
How to fix this problem ?

usp_Save_Char_ApplySkill_Add_E Procedure Here:

Code:
USE [PS_GameData]
GO
/****** Object:  StoredProcedure [dbo].[usp_Save_Char_ApplySkill_Add_E]    Script Date: 02/04/2017 23:54:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO


ALTER Proc [dbo].[usp_Save_Char_ApplySkill_Add_E]
  [MENTION=395373]Chari[/MENTION]D int,  [MENTION=563598]Skilli[/MENTION]D smallint,  [MENTION=1658622]skilll[/MENTION]evel tinyint,  [MENTION=595758]left[/MENTION]ResetTime smallint

AS

SET NOCOUNT ON

INSERT INTO CharApplySkills(CharID,Skillid,SkillLevel,LeftResetTime) VALUES  [MENTION=395373]Chari[/MENTION]D  [MENTION=563598]Skilli[/MENTION]d  [MENTION=1658622]skilll[/MENTION]evel  [MENTION=595758]left[/MENTION]ResetTime)

IF(@@ERROR = 0)
BEGIN
	RETURN 1
END
ELSE
BEGIN
	RETURN -1
END

SET NOCOUNT OFF
usp_Save_Char_ApplySkill_Add_E2 Procedure Here:

Code:

USE [PS_GameData]
GO
/****** Object:  StoredProcedure [dbo].[usp_Save_Char_ApplySkill_Add_E2]    Script Date: 02/04/2017 23:54:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO





ALTER Proc [dbo].[usp_Save_Char_ApplySkill_Add_E2]
  [MENTION=395373]Chari[/MENTION]D int,  [MENTION=563598]Skilli[/MENTION]D smallint,  [MENTION=1658622]skilll[/MENTION]evel tinyint,  [MENTION=595758]left[/MENTION]ResetTime int

AS

SET NOCOUNT ON

INSERT INTO CharApplySkills(CharID,Skillid,SkillLevel,LeftResetTime) VALUES  [MENTION=395373]Chari[/MENTION]D  [MENTION=563598]Skilli[/MENTION]d  [MENTION=1658622]skilll[/MENTION]evel  [MENTION=595758]left[/MENTION]ResetTime)

IF(@@ERROR = 0)
BEGIN
	RETURN 1
END
ELSE
BEGIN
	RETURN -1
END

SET NOCOUNT OFF

PS_GAME LOG :

Code:
2017-02-04 21:36:53 PS_GAME__system log start (Game01) [GERMANY]

2017-02-04 21:36:53 RandomOption Error : ItemID=24070, byServer=2, Wis=0

2017-02-04 21:36:53 RandomOption Error : ItemID=24111, byServer=2, Wis=0

2017-02-04 21:36:53 RandomOption Error : ItemID=24112, byServer=2, Wis=0

2017-02-04 21:36:53 RandomOption Error : ItemID=24118, byServer=2, Wis=0

2017-02-04 21:36:53 RandomOption Error : ItemID=24119, byServer=2, Wis=0

2017-02-04 21:36:53 RandomOption Error : ItemID=24125, byServer=2, Wis=0

2017-02-04 21:36:53 RandomOption Error : ItemID=24126, byServer=2, Wis=0

2017-02-04 21:36:53 RandomOption Error : ItemID=24154, byServer=2, Wis=0

2017-02-04 21:36:53 RandomOption Error : ItemID=24240, byServer=2, Wis=0

2017-02-04 21:36:53 RandomOption Error : ItemID=24249, byServer=2, Wis=0

2017-02-04 21:36:53 RandomOption Error : ItemID=24250, byServer=2, Wis=0

2017-02-04 21:36:53 RandomOption Error : ItemID=24251, byServer=2, Wis=0

2017-02-04 21:36:53 RandomOption Error : ItemID=24252, byServer=2, Wis=0

2017-02-04 21:36:53 RandomOption Error : ItemID=24253, byServer=2, Wis=0

2017-02-04 21:36:53 RandomOption Error : ItemID=24254, byServer=2, Wis=0

2017-02-04 21:36:53 RandomOption Error : ItemID=39070, byServer=2, Wis=0

2017-02-04 21:36:53 RandomOption Error : ItemID=39111, byServer=2, Wis=0

2017-02-04 21:36:53 RandomOption Error : ItemID=39112, byServer=2, Wis=0

2017-02-04 21:36:53 RandomOption Error : ItemID=39118, byServer=2, Wis=0

2017-02-04 21:36:53 RandomOption Error : ItemID=39119, byServer=2, Wis=0

2017-02-04 21:36:53 RandomOption Error : ItemID=39125, byServer=2, Wis=0

2017-02-04 21:36:53 RandomOption Error : ItemID=39126, byServer=2, Wis=0

2017-02-04 21:36:53 RandomOption Error : ItemID=39154, byServer=2, Wis=0

2017-02-04 21:36:53 RandomOption Error : ItemID=39240, byServer=2, Wis=0

2017-02-04 21:36:54 error mob item drop info load error

2017-02-04 21:36:54 error mob item drop info load error

2017-02-04 21:36:54 error mob item drop info load error

2017-02-04 21:36:54 error mob item drop info load error

2017-02-04 21:36:54 error mob item drop info load error

2017-02-04 21:36:54 error mob item drop info load error

2017-02-04 21:36:54 error mob item drop info load error

2017-02-04 21:36:54 error mob item drop info load error

2017-02-04 21:36:54 error mob item drop info load error

2017-02-04 21:36:55 connect mgr 1012

2017-02-04 21:36:55 Server Version : 0

2017-02-04 21:36:55 connect dbagent 1016

2017-02-04 21:36:55 connect gamelog 1032

2017-02-04 21:36:55 Market End -----------------------

2017-02-04 21:36:56 cannot open .\Data\Lua\135.lua: No such file or directory

2017-02-04 21:36:56 cannot open .\Data\Lua\145.lua: No such file or directory

2017-02-04 21:36:56 cannot open .\Data\Lua\144.lua: No such file or directory

2017-02-04 21:36:56 cannot open .\Data\Lua\129.lua: No such file or directory

2017-02-04 21:36:56 cannot open .\Data\Lua\126.lua: No such file or directory

2017-02-04 21:36:56 cannot open .\Data\Lua\141.lua: No such file or directory

2017-02-04 21:36:56 cannot open .\Data\Lua\126.lua: No such file or directory

2017-02-04 21:36:56 Start CWorldSendThread=2252

Module list:

C:\ShaiyaServer\PSM_Client\bin\ps_game.exe, loaded at 0x00400000 - 11/09/14 17:10:08

2017-02-04 21:37:07 <Console input> /nprotectoff

2017-02-04 21:37:07 <Console output> cmd NProtect off ok

2017-02-04 21:53:30 discon client: (104,  1236) T=000:12:00:000, RC=1750,RCS=2, RB=25775,RBS=33, SC=4327,SCS=5, SB=75430,SBS=98

2017-02-04 22:13:32 3 1 SERVICE_CONTROL_STOP

2017-02-04 22:13:32 Call save all waiting...

2017-02-04 22:13:32 1 1 SAgent::Disconnect: (3, 1236)

2017-02-04 22:13:32 1 1 SAgent::Disconnect: (3, 1236)

2017-02-04 22:13:32 1 1 T=000:36:00:000, RC=45,RCS=0, RB=5506,RBS=2, SC=110,SCS=0, SB=1927,SBS=0

2017-02-04 22:13:32 1 1 T=000:36:00:000, RC=12,RCS=0, RB=345,RBS=0, SC=20,SCS=0, SB=257,SBS=0

2017-02-04 22:13:32 1 1 SAgent::Disconnect: (3, 1236)

2017-02-04 22:13:32 1 1 T=000:36:00:000, RC=6,RCS=0, RB=24,RBS=0, SC=12,SCS=0, SB=196,SBS=0

2017-02-04 22:13:32 discon dbagent ((3,1236, 5506,1927)

2017-02-04 22:13:32 discon userlog ((3,1236, 24,196)

2017-02-04 22:13:32 userlog Connection Lost INFO : T=000:36:00:000, RC=6,RCS=0, RB=24,RBS=0, SC=12,SCS=0, SB=196,SBS=0

2017-02-04 22:13:32 dbagent Connection Lost INFO : T=000:36:00:000, RC=45,RCS=0, RB=5506,RBS=2, SC=110,SCS=0, SB=1927,SBS=0

2017-02-04 22:13:32 userlog log server disconnection

2017-02-04 22:13:32 db agent server disconnected...

2017-02-04 22:13:32 call disconnectAll...

2017-02-04 22:13:32 1 1 SAgent::Disconnect: (3, 1236)

2017-02-04 22:13:32 1 1 T=000:36:00:000, RC=6,RCS=0, RB=24,RBS=0, SC=59,SCS=0, SB=6823,SBS=3

2017-02-04 22:13:32 discon mgr ((3,1236, 345,257)

2017-02-04 22:13:32 discon gamelog ((3,1236, 24,6823)

2017-02-04 22:13:32 mgr Connection Lost INFO : T=000:36:00:000, RC=12,RCS=0, RB=345,RBS=0, SC=20,SCS=0, SB=257,SBS=0

2017-02-04 22:13:32 gamelog Connection Lost INFO : T=000:36:00:000, RC=6,RCS=0, RB=24,RBS=0, SC=59,SCS=0, SB=6823,SBS=3

2017-02-04 22:13:32 mgr server disconnection

2017-02-04 22:13:32 game log server disconnection

2017-02-04 22:13:32 server shutdown Connection INFO : T=000:36:00:000, NumC=0,CMin=0,CMax=1,CAvg=0.00, CAva=3,CReq=3,CCnt=3,DCCnt=3, CTimeT=000:14:00:000,CTimeAvg=000:04:00:000, RBT=26074,RBS=11,RBSC=29,SBT=79566,SBS=36,SBSC=89

2017-02-04 22:13:32 PS_GAME__system log end (Game01)

2017-02-04 22:13:32 3 1 SService::ServiceCtrlDispatcher(): service shutdown
PS_DBAGENT LOG:


Code:
2017-02-04 21:36:50 PS_DBAGENT__system log start (DBAgent01)

Module list:

C:\ShaiyaServer\PSM_Client\bin\ps_dbAgent.exe, loaded at 0x00400000 - 11/09/14 16:20:57

2017-02-04 21:36:55 ### Connect[144] : Game[?][0x00F6EB30], Addr=127.0.0.1, DBJobEnd=1

2017-02-04 21:36:55 ### DB_SYSTEM_CONNECT[3964] :Game[1][0x00F6EB30], Name=Game01, Addr=127.0.0.1

2017-02-04 21:53:29 err=-1, [Microsoft][ODBC SQL Server Driver][SQL Server]Must declare the scalar variable    [MENTION=563598]Skilli[/MENTION]d"., SQL STATE: 42000, NATIVE ERROR: 137 (0x89)

2017-02-04 21:53:29 ::SaveCharacter 6 Basaran ret=1, qerr=-1, {?=call Usp_Save_Char_ApplySkill_Add_E2(6,46,1,900)}

2017-02-04 21:53:29 err=-1, [Microsoft][ODBC SQL Server Driver][SQL Server]Must declare the scalar variable    [MENTION=563598]Skilli[/MENTION]d"., SQL STATE: 42000, NATIVE ERROR: 137 (0x89)

2017-02-04 21:53:29 ::SaveCharacter 6 Basaran ret=1, qerr=-1, {?=call Usp_Save_Char_ApplySkill_Add_E2(6,46,1,900)}

2017-02-04 22:13:32 1 1 SAgent::Disconnect: (4, 64)

2017-02-04 22:13:32 1 1 T=000:36:00:000, RC=110,RCS=0, RB=1927,RBS=0, SC=45,SCS=0, SB=5506,SBS=2

2017-02-04 22:13:32 ### Disconnect[3172] : Game[1][0x00F6EB30], Name=Game01, Addr=127.0.0.1, DBJobEnd=0

2017-02-04 22:13:32 ### PostDispatchDB[3172] : DB_DISPATCHER_EXIT Game[1][0x00F6EB30]

2017-02-04 22:13:32 ### OnDispatchDB[584] : => DB_DISPATCHER_EXIT Game[1][0x00F6EB30]

2017-02-04 22:13:32 3 1 SERVICE_CONTROL_STOP

2017-02-04 22:13:32 ### Save[584] : Game[1][0x00F6EB30]

2017-02-04 22:13:32 ### OnDispatchDB[584] : <= DB_DISPATCHER_EXIT Game[1][0x00F6EB30]

2017-02-04 22:13:32 PS_DBAGENT__system log end (DBAgent01)


2017-02-04 22:13:32 3 1 SService::ServiceCtrlDispatcher(): service shutdown
Please help.