- 論壇徽章:
- 0
|
小弟在處理一程序時,數(shù)據(jù)庫在即將結(jié)束時報"<-16843010>;--<ct_cmd_alloc(): user api layer: external error: error string not available>;"異常.該種情況已經(jīng)出現(xiàn)很多次了,萬望各位指教!
操作系統(tǒng)為S85,數(shù)據(jù)庫版本為Adaptive Server Enterprise/12.5.0.3/EBF 11443 ESD#4/P/RS6000/AIX 4.3.3/rel12503/1939/32-bit/FBO/Sun Sep 21 00:54:50 2003.
查看SYBASE.log,該時間點附近為:
02:00000:00011:2005/04/08 03:33:14.15 server A client process exited abnormally, or a network error was encountered. Unless other errors occurred, continue processing normally.
01:00000:00017:2005/04/08 05:50:22.34 server Error: 1608, Severity: 18, State:4
01:00000:00017:2005/04/08 05:50:22.34 server A client process exited abnormally, or a network error was encountered. Unless other errors occurred, continue processing normally.
請問:在何種情況下可能出現(xiàn)該種異常?如何避免該種異常?
程序框架如下
declare tmp_cur cursor for
.......
open tmp_cur;
while(1)
{
fetch tmp_cur;
if(sqlcode!=0) break;
........
sub_proc();
........
if(proc_cnt%1000)=0
printf(" roc cnt<%d>;" ;
}
if(sqlcode!=100) /*此處報錯*/
{
WriteErrLog(...)
close tmp_cur;
deallocate cursor tmp_cur;
rollback;
return -1
}
close tmp_cur;  |
|