Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2003
    Posts
    21

    Unanswered: Entering an unnamed cursor loop giving ORA-06502

    I realize that the buffer output from DBMS_OUTPUT doesn't necessarily reflect the actual sequence of calls, but why am I getting this? I populate a varchar2 variable with a brief description of the operation that's about to be attempted, so that it can be reported in the exception section. But what could be going wrong with this?

    v_exception_type:='Entering disablement loop';

    FOR INDEX_REC IN
    (SELECT INDEX_NAME
    FROM ALL_INDEXES
    WHERE TABLE_NAME='SUB_START_DATE')
    LOOP

    ....
    END LOOP;

    When I run the procedure, I'm seeing this error message, among others:
    Entering disablement loop ORA-06502: PL/SQL: numeric or value error

  2. #2
    Join Date
    Aug 2003
    Posts
    21
    I'm really desperate here.

    If anyone has a soft copy, from the Feuerstein book, of his "do" wrapper package to deal with DBMS_OUTPUT weaknesses, could you send it to me?

    I need to disable and re-enable indexes on a nonpartitioned table, as part of a table population routine which I've been told to add into another project, which is otherwise ready. This project is late and wanted ASAP, now I'm bogged down in this problem which goes beyond the scope of the original project.

  3. #3
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >But what could be going wrong with this?
    It generates an ORA-06502 error.
    Since you won't share with us the whole procedure,
    I won't bother trying to guess what is causing the error.
    P.S.
    Please show us the line which declares v_exception_type

  4. #4
    Join Date
    Aug 2003
    Posts
    21
    OK, it's really stupid, but I found the explanation.

    I was moving a value into the varchar2 that was too big. That'll cause this type of exception.

    Could a moderator or administrator lock this thread?

  5. #5
    Join Date
    Nov 2002
    Location
    Desk, slightly south of keyboard
    Posts
    697
    Hi,

    Glad you found the problem.

    Incidentally, (I'm not an Administrator - just curious)... what do you mean by 'Lock' this thread?

    Cheers
    Bill
    Please don't email me directly with questions. I've probably just got home from the pub and cannot guarantee the sanity of my answers. In fact, I can't believe I actually made it home.

Posting Permissions

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