Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Serious BUG !!!

2 posts in Windows NT Last posting was on 1998-02-19 17:26:30.0Z
Vitaly Lipovetsky Posted on 1998-02-19 16:20:49.0Z
From: "Vitaly Lipovetsky" <vit@fuib.com>
Subject: Serious BUG !!!
Date: Thu, 19 Feb 1998 18:20:49 +0200
Lines: 228
X-Newsreader: Microsoft Outlook Express 4.71.1712.3
X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3
Message-ID: <34ec5adf.0@ifuib>
Newsgroups: sybase.public.sqlserver.nt
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com!ifuib!172.17.3.101
Xref: forums-1-dub sybase.public.sqlserver.nt:5172
Article PK: 1081254

We tried to migrate from MS to ASE 11.5 but receive serious error.
It sp works fine on MS.

After this error process can't be killed and I must to restart Server.

00:00000:00013:1998/02/19 18:10:27.16 kernel SQL Server system exception
(0xc0000005) generated by a storage access violation.
00:00000:00013:1998/02/19 18:10:27.17 kernel pc: 0x7bd09b pcstkwalk +
0x33b(0x175f200, 0x175f624, 0x270f, 0x2, 0x140014)
00:00000:00013:1998/02/19 18:10:27.18 kernel pc: 0x7bca55 ucstkgentrace +
0x135(0x140014, 0x2, 0x270f, 0x0, 0x0)
00:00000:00013:1998/02/19 18:10:27.18 kernel pc: 0x798e00 ucbacktrace +
0x80(0x140014, 0x1, 0xa50, 0x0, 0x175ffb8)
00:00000:00013:1998/02/19 18:10:27.18 kernel pc: 0x79ed69 kiexception +
0x1e9(0x1b, 0x10206, 0x175fa60, 0x23, 0x0)
00:00000:00013:1998/02/19 18:10:27.19 kernel pc: 0x48325d bufpindirty +
0x1d(0x276ee820, 0x2043fb88, 0xeb5, 0x0, 0x0)
00:00000:00013:1998/02/19 18:10:27.19 kernel pc: 0x5acd44 plc__flush +
0x114(0x20ab2310, 0x30000, 0x0, 0x201ce758, 0x20ab9a30)
00:00000:00013:1998/02/19 18:10:27.20 kernel pc: 0x5ac613 xls_preflush +
0xa3(0x201ce758, 0x20000, 0x0, 0x201ce758, 0x1)
00:00000:00013:1998/02/19 18:10:27.20 kernel pc: 0x550d8b finishlog +
0x17b(0x201ce758, 0x1, 0x2043f8a0, 0xd5, 0x1)
00:00000:00013:1998/02/19 18:10:27.20 kernel pc: 0x5524b1 putxact +
0x2d1(0x200105a0, 0x2043f8a0, 0x1, 0x0, 0x0)
00:00000:00013:1998/02/19 18:10:27.21 kernel pc: 0x5b955e s_execute +
0x23ee(0x2043f8a0, 0x20d48000, 0x20cf3440, 0x2043f8a0, 0x1)
00:00000:00013:1998/02/19 18:10:27.21 kernel [Handler pc: 0x4bf150 s_handle
installed by the following function:-]
00:00000:00013:1998/02/19 18:10:27.21 kernel pc: 0x4bc583 sequencer +
0x153(0x20d48000, 0x2043f8a0, 0x20cf33dc, 0x0, 0x5c)
00:00000:00013:1998/02/19 18:10:27.22 kernel [Handler pc: 0x414ec0
hdl_backout installed by the following function:-]
00:00000:00013:1998/02/19 18:10:27.22 kernel pc: 0x5bdd09 execproc +
0x279(0x20cf33dc, 0x20cf3440, 0x1, 0x0, 0x1)
00:00000:00013:1998/02/19 18:10:27.23 kernel [Handler pc: 0x6bcca0
execrpc_handle installed by the following function:-]
00:00000:00013:1998/02/19 18:10:27.23 kernel pc: 0x6bbf14 execrpc +
0xa64(0xe6, 0x0, 0x2, 0x175ff78, 0x45f5e6)
00:00000:00013:1998/02/19 18:10:27.23 kernel pc: 0x58e0ec tdsrecv_rpc +
0x1c(0xe6, 0x2001463c, 0x0, 0x0, 0x0)
00:00000:00013:1998/02/19 18:10:27.24 kernel [Handler pc: 0x414ec0
hdl_backout installed by the following function:-]
00:00000:00013:1998/02/19 18:10:27.24 kernel [Handler pc: 0x500020
ut_handle installed by the following function:-]
00:00000:00013:1998/02/19 18:10:27.24 kernel pc: 0x45f5e6 conn_hdlr +
0x656(0x5, 0x0, 0x2001463c, 0x0, 0x0)
00:00000:00013:1998/02/19 18:10:27.25 kernel pc: 0x7d0d56 kpsuspend +
0xa6(0x2001463c, 0x0, 0x0, 0x2001463c, 0x0)
00:00000:00013:1998/02/19 18:10:27.25 kernel pc: 0x77f04f2c end +
0x77613f2c(0x7d0d10, 0x2001463c, 0x0, 0x0, 0x0)
00:00000:00013:1998/02/19 18:10:27.25 kernel end of stack trace, spid 13,
kpid 1310740, suid 334
00:00000:00013:1998/02/19 18:10:27.25 kernel
************************************
00:00000:00013:1998/02/19 18:10:27.26 kernel SQL causing error :
o.up_slr_make_pay_ch_ret
00:00000:00013:1998/02/19 18:10:27.26 kernel curdb = 11 pstat = 0x10080
lasterror = 0
00:00000:00013:1998/02/19 18:10:27.26 kernel preverror = 0 transtate = 1
00:00000:00013:1998/02/19 18:10:27.26 kernel curcmd = 213 program = Salary
ver.0.81
00:00000:00013:1998/02/19 18:10:27.26 kernel pc: 0x7bd09b pcstkwalk +
0x33b(0x175f0a8, 0x175f4cc, 0x270f, 0x2, 0x140014)
00:00000:00013:1998/02/19 18:10:27.27 kernel pc: 0x7bca55 ucstkgentrace +
0x135(0x140014, 0x2, 0x270f, 0x0, 0x0)
00:00000:00013:1998/02/19 18:10:27.27 kernel pc: 0x798e00 ucbacktrace +
0x80(0x140014, 0x1, 0xc0000005, 0x0, 0x8cc5f0)
00:00000:00013:1998/02/19 18:10:27.28 kernel pc: 0x404196 terminate_process
+ 0x4e6(0x140014, 0xffffffff, 0xa50, 0x0, 0x175ffb8)
00:00000:00013:1998/02/19 18:10:27.28 kernel pc: 0x79eda3 kiexception +
0x223(0x1b, 0x10206, 0x175fa60, 0x23, 0x0)
00:00000:00013:1998/02/19 18:10:27.28 kernel pc: 0x48325d bufpindirty +
0x1d(0x276ee820, 0x2043fb88, 0xeb5, 0x0, 0x0)
00:00000:00013:1998/02/19 18:10:27.29 kernel pc: 0x5acd44 plc__flush +
0x114(0x20ab2310, 0x30000, 0x0, 0x201ce758, 0x20ab9a30)
00:00000:00013:1998/02/19 18:10:27.29 kernel pc: 0x5ac613 xls_preflush +
0xa3(0x201ce758, 0x20000, 0x0, 0x201ce758, 0x1)
00:00000:00013:1998/02/19 18:10:27.30 kernel pc: 0x550d8b finishlog +
0x17b(0x201ce758, 0x1, 0x2043f8a0, 0xd5, 0x1)
00:00000:00013:1998/02/19 18:10:27.30 kernel pc: 0x5524b1 putxact +
0x2d1(0x200105a0, 0x2043f8a0, 0x1, 0x0, 0x0)
00:00000:00013:1998/02/19 18:10:27.30 kernel pc: 0x5b955e s_execute +
0x23ee(0x2043f8a0, 0x20d48000, 0x20cf3440, 0x2043f8a0, 0x1)
00:00000:00013:1998/02/19 18:10:27.31 kernel [Handler pc: 0x4bf150 s_handle
installed by the following function:-]
00:00000:00013:1998/02/19 18:10:27.31 kernel pc: 0x4bc583 sequencer +
0x153(0x20d48000, 0x2043f8a0, 0x20cf33dc, 0x0, 0x5c)
00:00000:00013:1998/02/19 18:10:27.31 kernel [Handler pc: 0x414ec0
hdl_backout installed by the following function:-]
00:00000:00013:1998/02/19 18:10:27.32 kernel pc: 0x5bdd09 execproc +
0x279(0x20cf33dc, 0x20cf3440, 0x1, 0x0, 0x1)
00:00000:00013:1998/02/19 18:10:27.32 kernel [Handler pc: 0x6bcca0
execrpc_handle installed by the following function:-]
00:00000:00013:1998/02/19 18:10:27.33 kernel pc: 0x6bbf14 execrpc +
0xa64(0xe6, 0x0, 0x2, 0x175ff78, 0x45f5e6)
00:00000:00013:1998/02/19 18:10:27.33 kernel pc: 0x58e0ec tdsrecv_rpc +
0x1c(0xe6, 0x2001463c, 0x0, 0x0, 0x0)
00:00000:00013:1998/02/19 18:10:27.33 kernel [Handler pc: 0x414ec0
hdl_backout installed by the following function:-]
00:00000:00013:1998/02/19 18:10:27.34 kernel [Handler pc: 0x500020
ut_handle installed by the following function:-]
00:00000:00013:1998/02/19 18:10:27.34 kernel pc: 0x45f5e6 conn_hdlr +
0x656(0x5, 0x0, 0x2001463c, 0x0, 0x0)
00:00000:00013:1998/02/19 18:10:27.34 kernel pc: 0x7d0d56 kpsuspend +
0xa6(0x2001463c, 0x0, 0x0, 0x2001463c, 0x0)
00:00000:00013:1998/02/19 18:10:27.35 kernel pc: 0x77f04f2c end +
0x77613f2c(0x7d0d10, 0x2001463c, 0x0, 0x0, 0x0)
00:00000:00013:1998/02/19 18:10:27.35 kernel end of stack trace, spid 13,
kpid 1310740, suid 334
00:00000:00010:1998/02/19 18:11:23.40 server Process id 13 killed by
Hostname ÛQü, Host process id 158.
00:00000:00010:1998/02/19 18:11:26.69 server Process id 13 killed by
Hostname ÛQü, Host process id 158.

CREATE PROCEDURE up_slr_make_pay_ch_ret
AS
BEGIN

DECLARE @logname varchar(30)
SELECT @logname=USER
DECLARE @qry_param varchar(255), @cmonth smalldatetime

EXEC up_qry_load 'dqry_salary', 'cmonth', @qry_param OUT
IF RTRIM(@qry_param) IS NULL
BEGIN
RAISERROR 99999 'ïÛÉÂËÁ. ÷×ÅÄÉÔÅ ËÏÒÅËÔÎÏ ÔÅËÕÝÉÊ ÍÅÓÑÃ.'
RETURN
END
SELECT @cmonth=CONVERT(smalldatetime,@qry_param)
SELECT @cmonth=DATEADD(day,1-DATEPART(day,@cmonth),@cmonth)
SELECT @cmonth=CONVERT(smalldatetime, CONVERT(char(11),@cmonth))

CREATE TABLE #not_recalc_employee(employee_id tp_id NOT NULL,
calc_month smalldatetime NOT NULL,
slr_charge_retention tp_id NOT NULL)

CREATE TABLE #make_pay_ch_ret(employee_id tp_id NOT NULL,
cur_month smalldatetime NOT NULL,
calc_month smalldatetime NOT NULL,
slr_charge_retention tp_id NOT NULL,
total_sum decimal(22,2) NOT NULL,
size_ch_ret decimal(22,2) NOT NULL)
BEGIN TRANSACTION

DELETE tb_slr_retention
FROM tb_slr_retention r, tb_slr_sample_employee se
WHERE se.logname=@logname AND
se.employee_id=r.employee_id AND r.cur_month=@cmonth AND
r.flag_calc=1 AND r.slr_charge_retention<0

IF @@ERROR <> 0
BEGIN
ROLLBACK TRANSACTION
RETURN
END

INSERT INTO #not_recalc_employee
SELECT r.employee_id, r.calc_month, r.slr_charge_retention
FROM tb_slr_retention r, tb_slr_sample_employee se
WHERE se.employee_id=r.employee_id AND r.slr_charge_retention<0 AND
se.logname=@logname AND r.cur_month=@cmonth

IF @@ERROR <> 0
BEGIN
ROLLBACK TRANSACTION
RETURN
END

INSERT INTO #make_pay_ch_ret( employee_id, cur_month, calc_month,
slr_charge_retention,
total_sum, size_ch_ret)
SELECT r.employee_id, r.cur_month,
r.calc_month, -r.slr_charge_retention,
r.size_ch_ret, -r.size_ch_ret
FROM tb_slr_retention r, tb_slr_sample_employee se
WHERE se.logname=@logname AND se.employee_id=r.employee_id AND
r.cur_month=@cmonth AND r.slr_charge_retention>0 AND
r.flag_sum=1 AND
NOT EXISTS (SELECT * FROM #not_recalc_employee t
WHERE t.employee_id=se.employee_id AND
t.calc_month=r.calc_month AND
t.slr_charge_retention=-r.slr_charge_retention)

IF @@ERROR <> 0
BEGIN
ROLLBACK TRANSACTION
RETURN
END

INSERT INTO #make_pay_ch_ret( employee_id, cur_month, calc_month,
slr_charge_retention,
total_sum, size_ch_ret)
SELECT c.employee_id, c.cur_month,
c.calc_month, -c.slr_charge_retention,
c.size_ch_ret, c.size_ch_ret
FROM tb_slr_charge c, tb_slr_sample_employee se
WHERE se.logname=@logname AND se.employee_id=c.employee_id AND
c.cur_month=@cmonth AND c.flag_sum=1 AND
NOT EXISTS (SELECT * FROM #not_recalc_employee
WHERE employee_id=se.employee_id AND
calc_month=c.calc_month AND
slr_charge_retention=-c.slr_charge_retention)
IF @@ERROR <> 0
BEGIN
ROLLBACK TRANSACTION
RETURN
END

INSERT INTO tb_slr_retention ( employee_id, cur_month, calc_month,
slr_charge_retention,
total_sum, size_ch_ret)
SELECT employee_id, cur_month, calc_month, slr_charge_retention,
SUM(total_sum),
SUM(size_ch_ret)
FROM #make_pay_ch_ret
GROUP BY employee_id, cur_month, calc_month, slr_charge_retention
IF @@ERROR <> 0
ROLLBACK TRANSACTION
ELSE
COMMIT TRANSACTION

END
GO


Tony Imbierski Posted on 1998-02-19 17:26:30.0Z
Message-ID: <34EC6B46.4B3@sybase.com>
Date: Thu, 19 Feb 1998 17:26:30 +0000
From: Tony Imbierski <tonyi@sybase.com>
Reply-To: tonyi@sybase.com
Organization: Sybase Adaptive Server Engineering
X-Mailer: Mozilla 3.02 (WinNT; I)
MIME-Version: 1.0
To: Vitaly Lipovetsky <vit@fuib.com>
Subject: Re: Serious BUG !!!
References: <34ec5adf.0@ifuib>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Newsgroups: sybase.public.sqlserver.nt
Lines: 283
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.sqlserver.nt:5171
Article PK: 1081253

Hi,

Please raise this as soon as possible with your local Sybase customer
services. Ask them to raise a case, and give them my name. I will test
out your sql code here.

thanks,
tonyi

--
===============================================================
Tony Imbierski
Sybase Adaptive Server Engineering
Enterprise NT Group
---------------------------------------------------------------

===============================================================

Vitaly Lipovetsky wrote:
>
> We tried to migrate from MS to ASE 11.5 but receive serious error.
> It sp works fine on MS.
>
> After this error process can't be killed and I must to restart Server.
>
> 00:00000:00013:1998/02/19 18:10:27.16 kernel SQL Server system exception
> (0xc0000005) generated by a storage access violation.
> 00:00000:00013:1998/02/19 18:10:27.17 kernel pc: 0x7bd09b pcstkwalk +
> 0x33b(0x175f200, 0x175f624, 0x270f, 0x2, 0x140014)
> 00:00000:00013:1998/02/19 18:10:27.18 kernel pc: 0x7bca55 ucstkgentrace +
> 0x135(0x140014, 0x2, 0x270f, 0x0, 0x0)
> 00:00000:00013:1998/02/19 18:10:27.18 kernel pc: 0x798e00 ucbacktrace +
> 0x80(0x140014, 0x1, 0xa50, 0x0, 0x175ffb8)
> 00:00000:00013:1998/02/19 18:10:27.18 kernel pc: 0x79ed69 kiexception +
> 0x1e9(0x1b, 0x10206, 0x175fa60, 0x23, 0x0)
> 00:00000:00013:1998/02/19 18:10:27.19 kernel pc: 0x48325d bufpindirty +
> 0x1d(0x276ee820, 0x2043fb88, 0xeb5, 0x0, 0x0)
> 00:00000:00013:1998/02/19 18:10:27.19 kernel pc: 0x5acd44 plc__flush +
> 0x114(0x20ab2310, 0x30000, 0x0, 0x201ce758, 0x20ab9a30)
> 00:00000:00013:1998/02/19 18:10:27.20 kernel pc: 0x5ac613 xls_preflush +
> 0xa3(0x201ce758, 0x20000, 0x0, 0x201ce758, 0x1)
> 00:00000:00013:1998/02/19 18:10:27.20 kernel pc: 0x550d8b finishlog +
> 0x17b(0x201ce758, 0x1, 0x2043f8a0, 0xd5, 0x1)
> 00:00000:00013:1998/02/19 18:10:27.20 kernel pc: 0x5524b1 putxact +
> 0x2d1(0x200105a0, 0x2043f8a0, 0x1, 0x0, 0x0)
> 00:00000:00013:1998/02/19 18:10:27.21 kernel pc: 0x5b955e s_execute +
> 0x23ee(0x2043f8a0, 0x20d48000, 0x20cf3440, 0x2043f8a0, 0x1)
> 00:00000:00013:1998/02/19 18:10:27.21 kernel [Handler pc: 0x4bf150 s_handle
> installed by the following function:-]
> 00:00000:00013:1998/02/19 18:10:27.21 kernel pc: 0x4bc583 sequencer +
> 0x153(0x20d48000, 0x2043f8a0, 0x20cf33dc, 0x0, 0x5c)
> 00:00000:00013:1998/02/19 18:10:27.22 kernel [Handler pc: 0x414ec0
> hdl_backout installed by the following function:-]
> 00:00000:00013:1998/02/19 18:10:27.22 kernel pc: 0x5bdd09 execproc +
> 0x279(0x20cf33dc, 0x20cf3440, 0x1, 0x0, 0x1)
> 00:00000:00013:1998/02/19 18:10:27.23 kernel [Handler pc: 0x6bcca0
> execrpc_handle installed by the following function:-]
> 00:00000:00013:1998/02/19 18:10:27.23 kernel pc: 0x6bbf14 execrpc +
> 0xa64(0xe6, 0x0, 0x2, 0x175ff78, 0x45f5e6)
> 00:00000:00013:1998/02/19 18:10:27.23 kernel pc: 0x58e0ec tdsrecv_rpc +
> 0x1c(0xe6, 0x2001463c, 0x0, 0x0, 0x0)
> 00:00000:00013:1998/02/19 18:10:27.24 kernel [Handler pc: 0x414ec0
> hdl_backout installed by the following function:-]
> 00:00000:00013:1998/02/19 18:10:27.24 kernel [Handler pc: 0x500020
> ut_handle installed by the following function:-]
> 00:00000:00013:1998/02/19 18:10:27.24 kernel pc: 0x45f5e6 conn_hdlr +
> 0x656(0x5, 0x0, 0x2001463c, 0x0, 0x0)
> 00:00000:00013:1998/02/19 18:10:27.25 kernel pc: 0x7d0d56 kpsuspend +
> 0xa6(0x2001463c, 0x0, 0x0, 0x2001463c, 0x0)
> 00:00000:00013:1998/02/19 18:10:27.25 kernel pc: 0x77f04f2c end +
> 0x77613f2c(0x7d0d10, 0x2001463c, 0x0, 0x0, 0x0)
> 00:00000:00013:1998/02/19 18:10:27.25 kernel end of stack trace, spid 13,
> kpid 1310740, suid 334
> 00:00000:00013:1998/02/19 18:10:27.25 kernel
> ************************************
> 00:00000:00013:1998/02/19 18:10:27.26 kernel SQL causing error :
> o.up_slr_make_pay_ch_ret
> 00:00000:00013:1998/02/19 18:10:27.26 kernel curdb = 11 pstat = 0x10080
> lasterror = 0
> 00:00000:00013:1998/02/19 18:10:27.26 kernel preverror = 0 transtate = 1
> 00:00000:00013:1998/02/19 18:10:27.26 kernel curcmd = 213 program = Salary
> ver.0.81
> 00:00000:00013:1998/02/19 18:10:27.26 kernel pc: 0x7bd09b pcstkwalk +
> 0x33b(0x175f0a8, 0x175f4cc, 0x270f, 0x2, 0x140014)
> 00:00000:00013:1998/02/19 18:10:27.27 kernel pc: 0x7bca55 ucstkgentrace +
> 0x135(0x140014, 0x2, 0x270f, 0x0, 0x0)
> 00:00000:00013:1998/02/19 18:10:27.27 kernel pc: 0x798e00 ucbacktrace +
> 0x80(0x140014, 0x1, 0xc0000005, 0x0, 0x8cc5f0)
> 00:00000:00013:1998/02/19 18:10:27.28 kernel pc: 0x404196 terminate_process
> + 0x4e6(0x140014, 0xffffffff, 0xa50, 0x0, 0x175ffb8)
> 00:00000:00013:1998/02/19 18:10:27.28 kernel pc: 0x79eda3 kiexception +
> 0x223(0x1b, 0x10206, 0x175fa60, 0x23, 0x0)
> 00:00000:00013:1998/02/19 18:10:27.28 kernel pc: 0x48325d bufpindirty +
> 0x1d(0x276ee820, 0x2043fb88, 0xeb5, 0x0, 0x0)
> 00:00000:00013:1998/02/19 18:10:27.29 kernel pc: 0x5acd44 plc__flush +
> 0x114(0x20ab2310, 0x30000, 0x0, 0x201ce758, 0x20ab9a30)
> 00:00000:00013:1998/02/19 18:10:27.29 kernel pc: 0x5ac613 xls_preflush +
> 0xa3(0x201ce758, 0x20000, 0x0, 0x201ce758, 0x1)
> 00:00000:00013:1998/02/19 18:10:27.30 kernel pc: 0x550d8b finishlog +
> 0x17b(0x201ce758, 0x1, 0x2043f8a0, 0xd5, 0x1)
> 00:00000:00013:1998/02/19 18:10:27.30 kernel pc: 0x5524b1 putxact +
> 0x2d1(0x200105a0, 0x2043f8a0, 0x1, 0x0, 0x0)
> 00:00000:00013:1998/02/19 18:10:27.30 kernel pc: 0x5b955e s_execute +
> 0x23ee(0x2043f8a0, 0x20d48000, 0x20cf3440, 0x2043f8a0, 0x1)
> 00:00000:00013:1998/02/19 18:10:27.31 kernel [Handler pc: 0x4bf150 s_handle
> installed by the following function:-]
> 00:00000:00013:1998/02/19 18:10:27.31 kernel pc: 0x4bc583 sequencer +
> 0x153(0x20d48000, 0x2043f8a0, 0x20cf33dc, 0x0, 0x5c)
> 00:00000:00013:1998/02/19 18:10:27.31 kernel [Handler pc: 0x414ec0
> hdl_backout installed by the following function:-]
> 00:00000:00013:1998/02/19 18:10:27.32 kernel pc: 0x5bdd09 execproc +
> 0x279(0x20cf33dc, 0x20cf3440, 0x1, 0x0, 0x1)
> 00:00000:00013:1998/02/19 18:10:27.32 kernel [Handler pc: 0x6bcca0
> execrpc_handle installed by the following function:-]
> 00:00000:00013:1998/02/19 18:10:27.33 kernel pc: 0x6bbf14 execrpc +
> 0xa64(0xe6, 0x0, 0x2, 0x175ff78, 0x45f5e6)
> 00:00000:00013:1998/02/19 18:10:27.33 kernel pc: 0x58e0ec tdsrecv_rpc +
> 0x1c(0xe6, 0x2001463c, 0x0, 0x0, 0x0)
> 00:00000:00013:1998/02/19 18:10:27.33 kernel [Handler pc: 0x414ec0
> hdl_backout installed by the following function:-]
> 00:00000:00013:1998/02/19 18:10:27.34 kernel [Handler pc: 0x500020
> ut_handle installed by the following function:-]
> 00:00000:00013:1998/02/19 18:10:27.34 kernel pc: 0x45f5e6 conn_hdlr +
> 0x656(0x5, 0x0, 0x2001463c, 0x0, 0x0)
> 00:00000:00013:1998/02/19 18:10:27.34 kernel pc: 0x7d0d56 kpsuspend +
> 0xa6(0x2001463c, 0x0, 0x0, 0x2001463c, 0x0)
> 00:00000:00013:1998/02/19 18:10:27.35 kernel pc: 0x77f04f2c end +
> 0x77613f2c(0x7d0d10, 0x2001463c, 0x0, 0x0, 0x0)
> 00:00000:00013:1998/02/19 18:10:27.35 kernel end of stack trace, spid 13,
> kpid 1310740, suid 334
> 00:00000:00010:1998/02/19 18:11:23.40 server Process id 13 killed by
> Hostname ÛQü, Host process id 158.
> 00:00000:00010:1998/02/19 18:11:26.69 server Process id 13 killed by
> Hostname ÛQü, Host process id 158.
>
> CREATE PROCEDURE up_slr_make_pay_ch_ret
> AS
> BEGIN
>
> DECLARE @logname varchar(30)
> SELECT @logname=USER
> DECLARE @qry_param varchar(255), @cmonth smalldatetime
>
> EXEC up_qry_load 'dqry_salary', 'cmonth', @qry_param OUT
> IF RTRIM(@qry_param) IS NULL
> BEGIN
> RAISERROR 99999 'ïÛÉÂËÁ. ÷×ÅÄÉÔÅ ËÏÒÅËÔÎÏ ÔÅËÕÝÉÊ ÍÅÓÑÃ.'
> RETURN
> END
> SELECT @cmonth=CONVERT(smalldatetime,@qry_param)
> SELECT @cmonth=DATEADD(day,1-DATEPART(day,@cmonth),@cmonth)
> SELECT @cmonth=CONVERT(smalldatetime, CONVERT(char(11),@cmonth))
>
> CREATE TABLE #not_recalc_employee(employee_id tp_id NOT NULL,
> calc_month smalldatetime NOT NULL,
> slr_charge_retention tp_id NOT NULL)
>
> CREATE TABLE #make_pay_ch_ret(employee_id tp_id NOT NULL,
> cur_month smalldatetime NOT NULL,
> calc_month smalldatetime NOT NULL,
> slr_charge_retention tp_id NOT NULL,
> total_sum decimal(22,2) NOT NULL,
> size_ch_ret decimal(22,2) NOT NULL)
> BEGIN TRANSACTION
>
> DELETE tb_slr_retention
> FROM tb_slr_retention r, tb_slr_sample_employee se
> WHERE se.logname=@logname AND
> se.employee_id=r.employee_id AND r.cur_month=@cmonth AND
> r.flag_calc=1 AND r.slr_charge_retention<0
>
> IF @@ERROR <> 0
> BEGIN
> ROLLBACK TRANSACTION
> RETURN
> END
>
> INSERT INTO #not_recalc_employee
> SELECT r.employee_id, r.calc_month, r.slr_charge_retention
> FROM tb_slr_retention r, tb_slr_sample_employee se
> WHERE se.employee_id=r.employee_id AND r.slr_charge_retention<0 AND
> se.logname=@logname AND r.cur_month=@cmonth
>
> IF @@ERROR <> 0
> BEGIN
> ROLLBACK TRANSACTION
> RETURN
> END
>
> INSERT INTO #make_pay_ch_ret( employee_id, cur_month, calc_month,
> slr_charge_retention,
> total_sum, size_ch_ret)
> SELECT r.employee_id, r.cur_month,
> r.calc_month, -r.slr_charge_retention,
> r.size_ch_ret, -r.size_ch_ret
> FROM tb_slr_retention r, tb_slr_sample_employee se
> WHERE se.logname=@logname AND se.employee_id=r.employee_id AND
> r.cur_month=@cmonth AND r.slr_charge_retention>0 AND
> r.flag_sum=1 AND
> NOT EXISTS (SELECT * FROM #not_recalc_employee t
> WHERE t.employee_id=se.employee_id AND
> t.calc_month=r.calc_month AND
> t.slr_charge_retention=-r.slr_charge_retention)
>
> IF @@ERROR <> 0
> BEGIN
> ROLLBACK TRANSACTION
> RETURN
> END
>
> INSERT INTO #make_pay_ch_ret( employee_id, cur_month, calc_month,
> slr_charge_retention,
> total_sum, size_ch_ret)
> SELECT c.employee_id, c.cur_month,
> c.calc_month, -c.slr_charge_retention,
> c.size_ch_ret, c.size_ch_ret
> FROM tb_slr_charge c, tb_slr_sample_employee se
> WHERE se.logname=@logname AND se.employee_id=c.employee_id AND
> c.cur_month=@cmonth AND c.flag_sum=1 AND
> NOT EXISTS (SELECT * FROM #not_recalc_employee
> WHERE employee_id=se.employee_id AND
> calc_month=c.calc_month AND
> slr_charge_retention=-c.slr_charge_retention)
> IF @@ERROR <> 0
> BEGIN
> ROLLBACK TRANSACTION
> RETURN
> END
>
> INSERT INTO tb_slr_retention ( employee_id, cur_month, calc_month,
> slr_charge_retention,
> total_sum, size_ch_ret)
> SELECT employee_id, cur_month, calc_month, slr_charge_retention,
> SUM(total_sum),
> SUM(size_ch_ret)
> FROM #make_pay_ch_ret
> GROUP BY employee_id, cur_month, calc_month, slr_charge_retention
> IF @@ERROR <> 0
> ROLLBACK TRANSACTION
> ELSE
> COMMIT TRANSACTION
>
> END
> GO