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.

Divide by cero

7 posts in General Discussion Last posting was on 2010-06-15 22:12:44.0Z
RGS Posted on 2010-06-01 18:53:30.0Z
Sender: 79e.4c0553de.1804289383@sybase.com
From: RGS
Newsgroups: sybase.public.ase.general
Subject: Divide by cero
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4c05572a.910.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 1 Jun 2010 11:53:30 -0700
X-Trace: forums-1-dub 1275418410 10.22.241.41 (1 Jun 2010 11:53:30 -0700)
X-Original-Trace: 1 Jun 2010 11:53:30 -0700, 10.22.241.41
Lines: 12
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:29277
Article PK: 78510

Sometimes, when we are executing a stored procedures (who
has a lot or internal stored procedures) the system show the
message:

"Divide by cero"

And the program abort

How can I know what specific stored procedure generated the
error?

Thanks!!!


Bret Halford Posted on 2010-06-01 20:31:19.0Z
From: Bret Halford <bret@sybase.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: Divide by cero
References: <4c05572a.910.1681692777@sybase.com>
In-Reply-To: <4c05572a.910.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4c056e17$1@forums-1-dub>
Date: 1 Jun 2010 13:31:19 -0700
X-Trace: forums-1-dub 1275424279 10.22.241.152 (1 Jun 2010 13:31:19 -0700)
X-Original-Trace: 1 Jun 2010 13:31:19 -0700, vip152.sybase.com
Lines: 37
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:29278
Article PK: 78511


On 6/1/2010 12:53 PM, RGS wrote:
> Sometimes, when we are executing a stored procedures (who
> has a lot or internal stored procedures) the system show the
> message:
>
> "Divide by cero"
>
> And the program abort
>
> How can I know what specific stored procedure generated the
> error?
>
> Thanks!!!

What version are you using?

in 15.5 (and I think since 15.0 GA), using isql, the message identifies
the procedure involved:

Adaptive Server Enterprise/15.5/EBF 17218 SMP/P/NT (IX86)/Windows
2003/ase155/2
391/32-bit/OPT/Mon Nov 09 14:18:14 2009


(1 row affected)
1> create procedure p9
2> as
3> select 1/0
4> go
1> p9
2> go
Msg 3607, Level 16, State 0:
Server 'BRETXP', Procedure 'p9', Line 3:
Divide by zero occurred.

-----------
(return status = -6)


"Mark A. Parsons" <iron_horse Posted on 2010-06-01 20:41:37.0Z
From: "Mark A. Parsons" <iron_horse@no_spamola.compuserve.com>
User-Agent: Thunderbird 1.5.0.10 (Windows/20070221)
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: Divide by cero
References: <4c05572a.910.1681692777@sybase.com>
In-Reply-To: <4c05572a.910.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 100529-0, 05/29/2010), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4c057081$1@forums-1-dub>
Date: 1 Jun 2010 13:41:37 -0700
X-Trace: forums-1-dub 1275424897 10.22.241.152 (1 Jun 2010 13:41:37 -0700)
X-Original-Trace: 1 Jun 2010 13:41:37 -0700, vip152.sybase.com
Lines: 45
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:29279
Article PK: 78513

You haven't mentioned your ASE version so I'm going to assume you're running at least 12.5.0.3 ...

1 - install/configure MDA tables to allow the capture of statement statistics (ie, master..monSysStatement)

2 - when the 'divide by zero' error occurs, run the following against master..monSysStatement:

=====================
select db_name(DBID),object_name(ProcedureID,DBID),*
from master..monSysStatement
where ErrorStatus = 3607 -- divide by zero
order by SPID, KPID, BatchID, ProcNestLevel, LineNumber
=====================

Caveats:

- the login running the above query will need to have the mon_role role granted to it

- monSysStatement is a pipe table, the longer it takes you to query monSysStatement the greater the chance the record
you're looking for has been deleted; you'll need to weigh making monSysStatement large enough to hold the desired
records until you query monSysStatement, or consider having a separate process periodically poll monSysStatement for the
desired records

- the error (ErrorStatus = 3607) may show up in several lines of monSysStatement output; this is primarily due to the
error message being 'passed up' through the procedure stack; look for the entry with the greatest ProcNestLevel value
(ie, the deepest stored proc); the rest of the monSysStatement columns (eg, LineNumber, StatementNumber) should help you
pinpoint the problematic query

- the proposed query and my comments are based on the 15.0.3 ESD#2 version of the MDA tables; the structure of various
MDA tables have changed over time ... point being that some of the above may not apply/be-available if you're running an
older version of ASE, ymmv

RGS wrote:
> Sometimes, when we are executing a stored procedures (who
> has a lot or internal stored procedures) the system show the
> message:
>
> "Divide by cero"
>
> And the program abort
>
> How can I know what specific stored procedure generated the
> error?
>
> Thanks!!!


RGS Posted on 2010-06-11 18:22:18.0Z
Sender: 7e70.4c127c28.1804289383@sybase.com
From: RGS
Newsgroups: sybase.public.ase.general
Subject: Re: Divide by cero
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4c127eda.7eb1.1681692777@sybase.com>
References: <4c057081$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 11 Jun 2010 11:22:18 -0700
X-Trace: forums-1-dub 1276280538 10.22.241.41 (11 Jun 2010 11:22:18 -0700)
X-Original-Trace: 11 Jun 2010 11:22:18 -0700, 10.22.241.41
Lines: 88
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:29295
Article PK: 78529

Thanks a lot, this information is very complete

I am using ASE 15.0.3

I did the next test :

create proc sp1
as
select 1/0
go


exec sp1

select db_name(DBID),object_name(ProcedureID,DBID),*
from master..monSysStatement
where ErrorStatus = 3607 -- divide by zero
order by SPID, KPID, BatchID, ProcNestLevel, LineNumber


But ASE Didn't return any rows...

I executed all of your recomendations

Please help again...

RGS

> You haven't mentioned your ASE version so I'm going to
> assume you're running at least 12.5.0.3 ...
>
> 1 - install/configure MDA tables to allow the capture of
> statement statistics (ie, master..monSysStatement)
>
> 2 - when the 'divide by zero' error occurs, run the
> following against master..monSysStatement:
>
> =====================
> select db_name(DBID),object_name(ProcedureID,DBID),*
> from master..monSysStatement
> where ErrorStatus = 3607 -- divide by zero
> order by SPID, KPID, BatchID, ProcNestLevel, LineNumber
> =====================
>
> Caveats:
>
> - the login running the above query will need to have the
> mon_role role granted to it
>
> - monSysStatement is a pipe table, the longer it takes you
> to query monSysStatement the greater the chance the record
> you're looking for has been deleted; you'll need to weigh
> making monSysStatement large enough to hold the desired
> records until you query monSysStatement, or consider
> having a separate process periodically poll
> monSysStatement for the desired records
>
> - the error (ErrorStatus = 3607) may show up in several
> lines of monSysStatement output; this is primarily due to
> the error message being 'passed up' through the procedure
> stack; look for the entry with the greatest ProcNestLevel
> value (ie, the deepest stored proc); the rest of the
> monSysStatement columns (eg, LineNumber, StatementNumber)
> should help you pinpoint the problematic query
>
> - the proposed query and my comments are based on the
> 15.0.3 ESD#2 version of the MDA tables; the structure of
> various MDA tables have changed over time ... point being
> that some of the above may not apply/be-available if
> you're running an older version of ASE, ymmv
>
>
> RGS wrote:
> > Sometimes, when we are executing a stored procedures
> > (who has a lot or internal stored procedures) the system
> > show the message:
> >
> > "Divide by cero"
> >
> > And the program abort
> >
> > How can I know what specific stored procedure generated
> > the error?
> >
> > Thanks!!!


"Mark A. Parsons" <iron_horse Posted on 2010-06-11 19:46:56.0Z
From: "Mark A. Parsons" <iron_horse@no_spamola.compuserve.com>
User-Agent: Thunderbird 1.5.0.10 (Windows/20070221)
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: Divide by cero
References: <4c057081$1@forums-1-dub> <4c127eda.7eb1.1681692777@sybase.com>
In-Reply-To: <4c127eda.7eb1.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 100606-0, 06/06/2010), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4c1292b0$1@forums-1-dub>
Date: 11 Jun 2010 12:46:56 -0700
X-Trace: forums-1-dub 1276285616 10.22.241.152 (11 Jun 2010 12:46:56 -0700)
X-Original-Trace: 11 Jun 2010 12:46:56 -0700, vip152.sybase.com
Lines: 123
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:29296
Article PK: 78532

Separate the proc invocation and monSysStatement query into separate batches, eg:

================================
-- exec proc in one batch ...

exec sp1
go

Msg 3607, Level 16, State 0:
Server 'CC1', Procedure 'sp1', Line 3:
Divide by zero occurred.

-----------
(return status = -6)

-- query monSysStatement in another batch ...

select left(db_name(DBID),10) as dbname,
left(object_name(ProcedureID,DBID),10) as procname,
DBID,ProcedureID,ErrorStatus
from master..monSysStatement
where ErrorStatus = 3607 -- divide by zero
order by SPID, KPID, BatchID, ProcNestLevel, LineNumber
go

dbname procname DBID ProcedureID ErrorStatus
---------- ---------- ----------- ----------- -----------
tempdb NULL 2 0 3607
tempdb sp1 2 550608887 3607

(2 rows affected)

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

RGS wrote:
> Thanks a lot, this information is very complete
>
> I am using ASE 15.0.3
>
> I did the next test :
>
> create proc sp1
> as
> select 1/0
> go
>
>
> exec sp1
>
> select db_name(DBID),object_name(ProcedureID,DBID),*
> from master..monSysStatement
> where ErrorStatus = 3607 -- divide by zero
> order by SPID, KPID, BatchID, ProcNestLevel, LineNumber
>
>
> But ASE Didn't return any rows...
>
> I executed all of your recomendations
>
> Please help again...
>
> RGS
>
>
>
>
>> You haven't mentioned your ASE version so I'm going to
>> assume you're running at least 12.5.0.3 ...
>>
>> 1 - install/configure MDA tables to allow the capture of
>> statement statistics (ie, master..monSysStatement)
>>
>> 2 - when the 'divide by zero' error occurs, run the
>> following against master..monSysStatement:
>>
>> =====================
>> select db_name(DBID),object_name(ProcedureID,DBID),*
>> from master..monSysStatement
>> where ErrorStatus = 3607 -- divide by zero
>> order by SPID, KPID, BatchID, ProcNestLevel, LineNumber
>> =====================
>>
>> Caveats:
>>
>> - the login running the above query will need to have the
>> mon_role role granted to it
>>
>> - monSysStatement is a pipe table, the longer it takes you
>> to query monSysStatement the greater the chance the record
>> you're looking for has been deleted; you'll need to weigh
>> making monSysStatement large enough to hold the desired
>> records until you query monSysStatement, or consider
>> having a separate process periodically poll
>> monSysStatement for the desired records
>>
>> - the error (ErrorStatus = 3607) may show up in several
>> lines of monSysStatement output; this is primarily due to
>> the error message being 'passed up' through the procedure
>> stack; look for the entry with the greatest ProcNestLevel
>> value (ie, the deepest stored proc); the rest of the
>> monSysStatement columns (eg, LineNumber, StatementNumber)
>> should help you pinpoint the problematic query
>>
>> - the proposed query and my comments are based on the
>> 15.0.3 ESD#2 version of the MDA tables; the structure of
>> various MDA tables have changed over time ... point being
>> that some of the above may not apply/be-available if
>> you're running an older version of ASE, ymmv
>>
>>
>> RGS wrote:
>>> Sometimes, when we are executing a stored procedures
>>> (who has a lot or internal stored procedures) the system
>>> show the message:
>>>
>>> "Divide by cero"
>>>
>>> And the program abort
>>>
>>> How can I know what specific stored procedure generated
>>> the error?
>>>
>>> Thanks!!!


RGS Posted on 2010-06-15 21:46:57.0Z
Sender: 510a.4c17f461.1804289383@sybase.com
From: RGS
Newsgroups: sybase.public.ase.general
Subject: Re: Divide by cero
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4c17f4d1.5117.1681692777@sybase.com>
References: <4c1292b0$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 15 Jun 2010 14:46:57 -0700
X-Trace: forums-1-dub 1276638417 10.22.241.41 (15 Jun 2010 14:46:57 -0700)
X-Original-Trace: 15 Jun 2010 14:46:57 -0700, 10.22.241.41
Lines: 183
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:29302
Article PK: 78536

Hi again!

I still have problems....

I executed your changes but the problem persists....

use cobis
go

create proc sp99
as
select 1/0
go

exec sp99
go


select db_name(DBID),object_name(ProcedureID,DBID),*
from master..monSysStatement
where ErrorStatus = 3607 -- divide by zero
order by SPID, KPID, BatchID, ProcNestLevel, LineNumber
go


Msg 3607, Level 16, State 0
Divide by zero occurred.

-----------




SPID
InstanceID KPID DBID ProcedureID PlanID
BatchID ContextID LineNumber CpuTime WaitTime
MemUsageKB PhysicalReads LogicalReads PagesModified
PacketsSent PacketsReceived NetworkPacketSize PlansAltered
RowsAffected ErrorStatus HashKey SsqlId
ProcNestLevel StatementNumber DBName
StartTime EndTime
------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
----------- ---------- ----------- ----------- -----------
----------- ----------- ----------- ----------- -----------
----------- ----------- ------------- ------------
------------- ----------- --------------- -----------------
------------ ------------ ----------- -----------
----------- ------------- ---------------
------------------------------ ---------------------------
---------------------------

> Separate the proc invocation and monSysStatement query
> into separate batches, eg:
>
> ================================
> -- exec proc in one batch ...
>
> exec sp1
> go
>
> Msg 3607, Level 16, State 0:
> Server 'CC1', Procedure 'sp1', Line 3:
> Divide by zero occurred.
>
> -----------
> (return status = -6)
>
> -- query monSysStatement in another batch ...
>
> select left(db_name(DBID),10) as dbname,
> left(object_name(ProcedureID,DBID),10) as
> procname,
> DBID,ProcedureID,ErrorStatus
> from master..monSysStatement
> where ErrorStatus = 3607 -- divide by zero
> order by SPID, KPID, BatchID, ProcNestLevel, LineNumber
> go
>
> dbname procname DBID ProcedureID
> ErrorStatus
> ---------- ---------- ----------- -----------
> -----------
> tempdb NULL 2 0
> 3607
> tempdb sp1 2 550608887
> 3607
>
> (2 rows affected)
>
> ===============================
>
> RGS wrote:
> > Thanks a lot, this information is very complete
> >
> > I am using ASE 15.0.3
> >
> > I did the next test :
> >
> > create proc sp1
> > as
> > select 1/0
> > go
> >
> >
> > exec sp1
> >
> > select db_name(DBID),object_name(ProcedureID,DBID),*
> > from master..monSysStatement
> > where ErrorStatus = 3607 -- divide by zero
> > order by SPID, KPID, BatchID, ProcNestLevel, LineNumber
> >
> >
> > But ASE Didn't return any rows...
> >
> > I executed all of your recomendations
> >
> > Please help again...
> >
> > RGS
> >
> >
> >
> >
> >> You haven't mentioned your ASE version so I'm going to
> >> assume you're running at least 12.5.0.3 ...
> >>
> >> 1 - install/configure MDA tables to allow the capture
> of >> statement statistics (ie, master..monSysStatement)
> >>
> >> 2 - when the 'divide by zero' error occurs, run the
> >> following against master..monSysStatement:
> >>
> >> =====================
> >> select db_name(DBID),object_name(ProcedureID,DBID),*
> >> from master..monSysStatement
> >> where ErrorStatus = 3607 -- divide by zero
> >> order by SPID, KPID, BatchID, ProcNestLevel, LineNumber
> >> =====================
> >>
> >> Caveats:
> >>
> >> - the login running the above query will need to have
> the >> mon_role role granted to it
> >>
> >> - monSysStatement is a pipe table, the longer it takes
> you >> to query monSysStatement the greater the chance the
> record >> you're looking for has been deleted; you'll need
> to weigh >> making monSysStatement large enough to hold
> the desired >> records until you query monSysStatement, or
> consider >> having a separate process periodically poll
> >> monSysStatement for the desired records
> >>
> >> - the error (ErrorStatus = 3607) may show up in several
> >> lines of monSysStatement output; this is primarily due
> to >> the error message being 'passed up' through the
> procedure >> stack; look for the entry with the greatest
> ProcNestLevel >> value (ie, the deepest stored proc); the
> rest of the >> monSysStatement columns (eg, LineNumber,
> StatementNumber) >> should help you pinpoint the
> problematic query >>
> >> - the proposed query and my comments are based on the
> >> 15.0.3 ESD#2 version of the MDA tables; the structure
> of >> various MDA tables have changed over time ... point
> being >> that some of the above may not apply/be-available
> if >> you're running an older version of ASE, ymmv
> >>
> >>
> >> RGS wrote:
> >>> Sometimes, when we are executing a stored procedures
> >>> (who has a lot or internal stored procedures) the
> system >>> show the message:
> >>>
> >>> "Divide by cero"
> >>>
> >>> And the program abort
> >>>
> >>> How can I know what specific stored procedure
> generated >>> the error?
> >>>
> >>> Thanks!!!


"Mark A. Parsons" <iron_horse Posted on 2010-06-15 22:12:44.0Z
From: "Mark A. Parsons" <iron_horse@no_spamola.compuserve.com>
User-Agent: Thunderbird 1.5.0.10 (Windows/20070221)
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: Divide by cero
References: <4c1292b0$1@forums-1-dub> <4c17f4d1.5117.1681692777@sybase.com>
In-Reply-To: <4c17f4d1.5117.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 100606-0, 06/06/2010), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4c17fadc$1@forums-1-dub>
Date: 15 Jun 2010 15:12:44 -0700
X-Trace: forums-1-dub 1276639964 10.22.241.152 (15 Jun 2010 15:12:44 -0700)
X-Original-Trace: 15 Jun 2010 15:12:44 -0700, vip152.sybase.com
Lines: 189
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:29303
Article PK: 78537

Was the empty monSysStatement output preceded by any messages/warnings/errors?

Could you post the entire output from the following:

sp_configure Monitoring

Is there a lot of activity on your dataserver when you're running this test?

What is your exact ASE version? (select @@version)

RGS wrote:
> Hi again!
>
> I still have problems....
>
> I executed your changes but the problem persists....
>
> use cobis
> go
>
> create proc sp99
> as
> select 1/0
> go
>
> exec sp99
> go
>
>
> select db_name(DBID),object_name(ProcedureID,DBID),*
> from master..monSysStatement
> where ErrorStatus = 3607 -- divide by zero
> order by SPID, KPID, BatchID, ProcNestLevel, LineNumber
> go
>
>
> Msg 3607, Level 16, State 0
> Divide by zero occurred.
>
> -----------
>
>
>
>
> SPID
> InstanceID KPID DBID ProcedureID PlanID
> BatchID ContextID LineNumber CpuTime WaitTime
> MemUsageKB PhysicalReads LogicalReads PagesModified
> PacketsSent PacketsReceived NetworkPacketSize PlansAltered
> RowsAffected ErrorStatus HashKey SsqlId
> ProcNestLevel StatementNumber DBName
> StartTime EndTime
> ------------------------------
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> ----------- ---------- ----------- ----------- -----------
> ----------- ----------- ----------- ----------- -----------
> ----------- ----------- ------------- ------------
> ------------- ----------- --------------- -----------------
> ------------ ------------ ----------- -----------
> ----------- ------------- ---------------
> ------------------------------ ---------------------------
> ---------------------------
>
>
>
>> Separate the proc invocation and monSysStatement query
>> into separate batches, eg:
>>
>> ================================
>> -- exec proc in one batch ...
>>
>> exec sp1
>> go
>>
>> Msg 3607, Level 16, State 0:
>> Server 'CC1', Procedure 'sp1', Line 3:
>> Divide by zero occurred.
>>
>> -----------
>> (return status = -6)
>>
>> -- query monSysStatement in another batch ...
>>
>> select left(db_name(DBID),10) as dbname,
>> left(object_name(ProcedureID,DBID),10) as
>> procname,
>> DBID,ProcedureID,ErrorStatus
>> from master..monSysStatement
>> where ErrorStatus = 3607 -- divide by zero
>> order by SPID, KPID, BatchID, ProcNestLevel, LineNumber
>> go
>>
>> dbname procname DBID ProcedureID
>> ErrorStatus
>> ---------- ---------- ----------- -----------
>> -----------
>> tempdb NULL 2 0
>> 3607
>> tempdb sp1 2 550608887
>> 3607
>>
>> (2 rows affected)
>>
>> ===============================
>>
>> RGS wrote:
>>> Thanks a lot, this information is very complete
>>>
>>> I am using ASE 15.0.3
>>>
>>> I did the next test :
>>>
>>> create proc sp1
>>> as
>>> select 1/0
>>> go
>>>
>>>
>>> exec sp1
>>>
>>> select db_name(DBID),object_name(ProcedureID,DBID),*
>>> from master..monSysStatement
>>> where ErrorStatus = 3607 -- divide by zero
>>> order by SPID, KPID, BatchID, ProcNestLevel, LineNumber
>>>
>>>
>>> But ASE Didn't return any rows...
>>>
>>> I executed all of your recomendations
>>>
>>> Please help again...
>>>
>>> RGS
>>>
>>>
>>>
>>>
>>>> You haven't mentioned your ASE version so I'm going to
>>>> assume you're running at least 12.5.0.3 ...
>>>>
>>>> 1 - install/configure MDA tables to allow the capture
>> of >> statement statistics (ie, master..monSysStatement)
>>>> 2 - when the 'divide by zero' error occurs, run the
>>>> following against master..monSysStatement:
>>>>
>>>> =====================
>>>> select db_name(DBID),object_name(ProcedureID,DBID),*
>>>> from master..monSysStatement
>>>> where ErrorStatus = 3607 -- divide by zero
>>>> order by SPID, KPID, BatchID, ProcNestLevel, LineNumber
>>>> =====================
>>>>
>>>> Caveats:
>>>>
>>>> - the login running the above query will need to have
>> the >> mon_role role granted to it
>>>> - monSysStatement is a pipe table, the longer it takes
>> you >> to query monSysStatement the greater the chance the
>> record >> you're looking for has been deleted; you'll need
>> to weigh >> making monSysStatement large enough to hold
>> the desired >> records until you query monSysStatement, or
>> consider >> having a separate process periodically poll
>>>> monSysStatement for the desired records
>>>>
>>>> - the error (ErrorStatus = 3607) may show up in several
>>>> lines of monSysStatement output; this is primarily due
>> to >> the error message being 'passed up' through the
>> procedure >> stack; look for the entry with the greatest
>> ProcNestLevel >> value (ie, the deepest stored proc); the
>> rest of the >> monSysStatement columns (eg, LineNumber,
>> StatementNumber) >> should help you pinpoint the
>> problematic query >>
>>>> - the proposed query and my comments are based on the
>>>> 15.0.3 ESD#2 version of the MDA tables; the structure
>> of >> various MDA tables have changed over time ... point
>> being >> that some of the above may not apply/be-available
>> if >> you're running an older version of ASE, ymmv
>>>>
>>>> RGS wrote:
>>>>> Sometimes, when we are executing a stored procedures
>>>>> (who has a lot or internal stored procedures) the
>> system >>> show the message:
>>>>> "Divide by cero"
>>>>>
>>>>> And the program abort
>>>>>
>>>>> How can I know what specific stored procedure
>> generated >>> the error?
>>>>> Thanks!!!