Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2008
    Posts
    5

    Unanswered: how to fix "Arithmetic overflow occurred"?

    Can someone suggest how to change the sql below to avoid an overflow? The server is on ASE 15.0.2 ESD#6.

    select (@@maxpagesize*reserved_pages(db_id(),944006394,0) )

    Message from server 'FILTERS1' (Msg 3606, Severity 16, State 0), Line 1:
    Arithmetic overflow occurred.

    sp_spaceused filtertb
    name rowtotal reserved data index_size unused
    --------------- --------- ---------- ---------- ---------- --------
    filtertb 113592400 6088986 KB 5934920 KB 74748 KB 79318 KB

  2. #2
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1
    Force decimal or float arithmetic by multiplying with 1.0 or 1e0
    Or use division to get MB
    select reserved_pages(db_id(),944006394,0)/(1024*1024/@@maxpagesize)
    Last edited by pdreyer; 11-24-08 at 04:20.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •