database.sarang.net
UserID
Passwd
Database
DBMS
MySQL
PostgreSQL
Firebird
Oracle
Informix
ㆍSybase
MS-SQL
DB2
Cache
CUBRID
LDAP
ALTIBASE
Tibero
DB 문서들
스터디
Community
공지사항
자유게시판
구인|구직
DSN 갤러리
도움주신분들
Admin
운영게시판
최근게시물
Sybase Q&A 907 게시물 읽기
No. 907
프로시져 실행시에요..
작성자
초보사이
작성일
2004-04-12 16:19
조회수
6,830

프로시져를 SQL Advantage에서 excute stored procedure 로 db 연결해서 실행을 하면 connet이 끊어 졌다는 아래 메시지와 함께 db 연결이 끊어 집니다.

프로시져의 구성이 잘못되서 이런 현상이 나는건지 잘 모르겠습니다

아시는 분 꼭 좀 알려주세요.~~~

 

-------------------------------------------------------------------------------

Server Message:  Number  5702, Severity  10
Procedure 'PR_AAA', Line 312:
The SQL Server is terminating this process.
Client Message:  Layer  1, Origin  1, Severity  1, Number  167
ct_cmd_drop(): user api layer: external error: This routine cannot be called because the command structure is in an undefined state.

 

이 글에 대한 댓글이 총 9건 있습니다.

이사항만 가지고는 뭐라 말씀드릴수 없네요..

지연님이 2004-04-13 10:34에 작성한 댓글입니다. Edit

 

프로시져 내에서 아래의 쿼리를 넣고, 프로시져를 실행 시키면 select 결과가 나오는데요..

select     @p_standdate, a.userid, a.acdgroup, a.teamcd, a.usergroupcd, @p_userid, convert(varchar(8), getdate(), 112)
      ,b.ibcount, b.obcount, b.callreport, b.callmark
   ,b.contcount, b.contmark

 from tb_user a ,
            (select callmonth, userid, sum(incallcount) ibcount, sum(outcallcount) obcount, sum(callmark) callreport
      , (case when 0 <> 0  then convert(decimal,(sum(callmark)*@v_cmax_tmr)/0)  else 0 end) callmark
      ,sum(contcount) contcount
      ,(case  when convert(decimal,200) <= isnull(sum(contcount),0)  then 300
              when convert(decimal,160) <= isnull(sum(contcount),0)  then 250
              when convert(decimal,120) <= isnull(sum(contcount),0)  then 200
              when convert(decimal,80)  <= isnull(sum(contcount),0)  then 150
              when convert(decimal,40)  <= isnull(sum(contcount),0)  then 100
        else  50 end)  contmark
      from tb_callmark
        where callmonth = @p_standdate group by callmonth, userid) b

 where  a.userid *= b.userid
   and  a.usergroupcd in ('00','01') and a.unableyn = '1' and a.acdgroup is not null 

 

 

위의 쿼리에 Arg를 넣어서 실행을 시키면

 

select     @p_standdate, a.userid, a.acdgroup, a.teamcd, a.usergroupcd, @p_userid, convert(varchar(8), getdate(), 112)
      ,b.ibcount, b.obcount, b.callreport, b.callmark
   ,b.contcount, b.contmark

 from tb_user a ,
            (select callmonth, userid, sum(incallcount) ibcount, sum(outcallcount) obcount, sum(callmark) callreport
      ,(case when @v_callmaxmark_tmr <> 0  then convert(decimal,(sum(callmark)*@v_cmax_tmr)/@v_callmaxmark_tmr)  else 0 end) callmark
      ,sum(contcount) contcount
      ,(case  when convert(decimal,@v_contcount_1) <= isnull(sum(contcount),0)  then @v_contmark_1
              when convert(decimal,@v_contcount_2) <= isnull(sum(contcount),0)  then @v_contmark_2
              when convert(decimal,@v_contcount_3) <= isnull(sum(contcount),0)  then @v_contmark_3
              when convert(decimal,@v_contcount_4) <= isnull(sum(contcount),0)  then @v_contmark_4
              when convert(decimal,@v_contcount_5) <= isnull(sum(contcount),0)  then @v_contmark_5
         else  @v_contminmark_tmr end)  contmark
      from tb_callmark
        where callmonth = @p_standdate group by callmonth, userid) b

 where  a.userid *= b.userid
   and  a.usergroupcd in ('00','01') and a.unableyn = '1' and a.acdgroup is not null

 

결과가...

Server Message:  Number  5702, Severity  10
Procedure 'pr_setResult', Line 350:
The SQL Server is terminating this process.
Client Message:  Layer  1, Origin  1, Severity  1, Number  167
ct_cmd_drop(): user api layer: external error: This routine cannot be called because the command structure is in an undefined state.
이렇게 나오네요.

혹시 프로시져내의 Query에서 ArgMent의 제한이 있는건지

알고 싶습니다.

 

 

초보사이님이 2004-04-22 15:34에 작성한 댓글입니다. Edit

이렇게 해보실래요?

 

select     @p_standdate, a.userid, a.acdgroup, a.teamcd, a.usergroupcd, @p_userid, convert(varchar(8), getdate(), 112)
      ,b.ibcount, b.obcount, b.callreport, b.callmark
   ,b.contcount, argn(b.contmark, @v_contmark_1, @v_contmark_2, @v_contmark_3, @v_contmark_4, @v_contmark_5, @v_contminmark_tmr) as contmark_cd
 from tb_user a ,
            (select callmonth, userid, sum(incallcount) ibcount, sum(outcallcount) obcount, sum(callmark) callreport
      ,(case when @v_callmaxmark_tmr <> 0  then convert(decimal,(sum(callmark)*@v_cmax_tmr)/@v_callmaxmark_tmr)  else 0 end) callmark
      ,sum(contcount) contcount
      ,(case  when convert(decimal,@v_contcount_1) <= isnull(sum(contcount),0)  then 0
              when convert(decimal,@v_contcount_2) <= isnull(sum(contcount),0)  then 1
              when convert(decimal,@v_contcount_3) <= isnull(sum(contcount),0)  then 2
              when convert(decimal,@v_contcount_4) <= isnull(sum(contcount),0)  then 3
              when convert(decimal,@v_contcount_5) <= isnull(sum(contcount),0)  then 4
         else 5 end)  contmark
      from tb_callmark
        where callmonth = @p_standdate group by callmonth, userid) b

 where  a.userid *= b.userid
   and  a.usergroupcd in ('00','01') and a.unableyn = '1' and a.acdgroup is not null

 

장형운(좋은구름)님이 2004-04-22 16:39에 작성한 댓글입니다.

위와 같이 고쳐서 프로시져 저장을 하는데 오류가 납니다.

오류내용은...

Function 'argn' not found. If this is a SQLJ function, use sp_help to check whether the object exsits (sp_help may produce a large amount of output).

 

이렇게 메시지 박스가 나오네요.. ^^

 

초보사이님이 2004-04-22 18:10에 작성한 댓글입니다. Edit

bug일 확률이 제일 높은데요....

 

우선 쿼리에 inline view가 있는걸로 봐서는 ase12.5이상 또는 asa나 iq일것으로 보이는 군요..

 

아~~어드밴테이지로 하셨다고 했으니 ase125나 iq이겠군요...

 

우선 최신 패치로 해보시고요....어드밴테이지 말고 서버에서 바로 수행해보시길...(클라이언트가 버젼이 낮아서 그럴수도 있기 때문에....SDK도 패치가 있습니다.)

 

버젼 알려주심 고맙겠습니다

지연님이 2004-04-23 09:23에 작성한 댓글입니다. Edit

버젼이 ASE 12.5.0이라고 합니다.. ^^

 

 그리고 IQ는 아니구요

ASE 12.5.0 PC CLIENT 입니다...

초보사이님이 2004-04-23 09:55에 작성한 댓글입니다.
이 댓글은 2004-04-23 11:44에 마지막으로 수정되었습니다. Edit

 패치 버젼이 상당히 낮군요...버그일 확률이 높아지는군요,

 

아마 log에 보심 stack trace가 떨어졌을겁니다.

 

그거 올려주시고요, isql에서도 그렇게 종료되는지 확인 부탁드립니다.

지연님이 2004-04-26 17:13에 작성한 댓글입니다. Edit

00:00000:00034:2004/04/27 15:47:24.23 kernel  pc: 0x00BA684D os_get_cur_stk_desc+ 0x13a (0x028ECA44, 0x77E6F0B4, 0x77E617E8, 0xFFFFFFFF)
00:00000:00034:2004/04/27 15:47:24.23 kernel  pc: 0x00BA684D os_get_cur_stk_desc+ 0x13a (0x028ECA44, 0x028EC7FC, 0x0000270F, 0x00000002)
00:00000:00034:2004/04/27 15:47:24.23 kernel  pc: 0x00B7EF5A pcstkwalk+ 0x204 (0x0C410050, 0x00000002, 0x0000270F, 0x00000000)
00:00000:00034:2004/04/27 15:47:24.23 kernel  pc: 0x00B7EBE4 ucstkgentrace+ 0x224 (0x0C410050, 0x00000001, 0x00E04DB8, 0x00000000)
00:00000:00034:2004/04/27 15:47:24.23 kernel  pc: 0x00B34B1B ucbacktrace+ 0xab (0x0C410050, 0xFFFFFFFF, 0xC0000005, 0x207A5F2C)
00:00000:00034:2004/04/27 15:47:24.23 kernel  pc: 0x0040736E terminate_process+ 0xc0b (0xC0000005, 0x7800BDB5, 0x028ECFC8, 0x00000000)
00:00000:00034:2004/04/27 15:47:24.23 kernel  pc: 0x00B29649 kiexception+ 0x29e (0x20D9CA18, 0x04D5FF40, 0x012726C4, 0x20D9CA18)
00:00000:00034:2004/04/27 15:47:24.23 kernel  pc: 0x00B2A1E7 kpntwrapper+ 0x104 (0x00B2A0E3, 0x20D9CA18, 0x00000000, 0x00000000)
00:00000:00034:2004/04/27 15:47:24.23 kernel  pc: 0x77E5987C KERNEL32.dll (0x00000000, 0x00000000, 0x00000000, 0x00000000)
00:00000:00034:2004/04/27 15:47:24.23 kernel  end of stack trace, spid 34, kpid 205586512, suid 4
00:00000:00034:2004/04/27 15:47:24.23 kernel  Failed to log the current message in the Windows NT event log

 

로그 입니다.. stack trace존재 하네요..

 

 

 

또 isql에서 실행해 봤는데요.

The SQL Server is terminating this process.
(1 row affected)

이런 메시지 떨어지는군요...

 

 

버젼이 낮아서 그런거라면 패치를 받을 수 있는 곳이 없을까요? 아무리 찾아봐도 안 보이네요..

사이베이스에서 돈을 주고 사야 하는지요??

초보사이님이 2004-04-27 15:46에 작성한 댓글입니다.
이 댓글은 2004-04-27 19:27에 마지막으로 수정되었습니다. Edit

패치는 돈주고 사실필요는 없고요, 유지보수 되어 있으면 그업체에 연락하시고

 

아님

 

sybase.com 에 가시면 download에 ebf라고 있습니다.

 

여기서 버젼이 맞는 것을 다운 받으시면 됩니다

지연님이 2004-04-29 09:03에 작성한 댓글입니다. Edit
[Top]
No.
제목
작성자
작성일
조회
910Index_Keys Select [2]
궁금이
2004-04-22
3025
909Multi connection은 어떻게? [2]
2004-04-21
3414
908사이베이스 DB에 접근하는 c 라이브러리좀 알려주세요 [1]
red
2004-04-12
3214
907프로시져 실행시에요.. [9]
초보사이
2004-04-12
6830
906sybase와 레뎃9에서 설치하려고 하는데 자료 좀 구할수 없을까요? [1]
소주향기
2004-04-10
2967
905AIX에서 thread 구동시 문제 [2]
올드보이
2004-04-08
5159
904UPDATE 값이 이상함... [2]
조창윤
2004-04-07
3501
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2024 DSN, All rights reserved.
작업시간: 0.018초, 이곳 서비스는
	PostgreSQL v16.2로 자료를 관리합니다