+ Reply to Thread + Post New Thread
Results 1 to 5 of 5
  1. ericzutter's Avatar
    ericzutter is offline Junior Member
    Join Date
    07 Apr 2009
    Posts
    7
    Say Thanks
    2
    Thanked 0 Times in 0 Posts

    PL/SQL ORA-06512 Error

    Hi friends

    this is a very simple procedure but for some reason it's giving the dreaded ORA-06512 Error. Please advise.

    Code sql:
    CREATE OR REPLACE PROCEDURE getprojectdescription (
       v_project_id            IN       NUMBER,
       v_project_description   OUT      VARCHAR2
    )
    AS
    BEGIN
       SELECT project_description
         INTO v_project_description
         FROM projects
        WHERE project_id = v_project_id;
    END;
    /

    Thanks

  2.    Club-Oracle Complementary E-Books and Magazines
    Get your free Complementary Copy of Oracle Magazine

    You can also browse the Free Magazines and E-Books section to see the complete list of free magazines, e-books and Whitepapers.

  3. tyro's Avatar
    tyro is offline Forum Genius
    Join Date
    20 Aug 2008
    Location
    India
    Posts
    363
    Say Thanks
    0
    Thanked 17 Times in 17 Posts

    Re: PL/SQL ORA-06512 Error

    your procedure looks fine to me, could you post the error code and the desc table for projects. Seems like you might have a column length problem with the data that your query is returning.

  4. rajavu's Avatar
    rajavu is offline Forum Genius
    Join Date
    13 Oct 2008
    Location
    @ Bangalore , India
    Posts
    410
    Say Thanks
    0
    Thanked 16 Times in 15 Posts

    Re: PL/SQL ORA-06512 Error

    The ORA-06512 error itself does not indicate the actual error . It normally indicates the line number at which the oracle PL/SQL code has caused an error . There will be another main error occurred in your process and that error happened in the line number as mentioned in ORA-06512 message description.

    As tyro assumed, it could be data type length issue with the OUT variable v_project_description (in comparison with length of column value project_description) while calling the procedure. please check it.

    Raj.

  5. ericzutter's Avatar
    ericzutter is offline Junior Member
    Join Date
    07 Apr 2009
    Posts
    7
    Say Thanks
    2
    Thanked 0 Times in 0 Posts

    Re: PL/SQL ORA-06512 Error

    Thanks for your replies guys

    yes the actual error is
    Code sql:
    ORA-06502: PL/SQL: numeric OR value error: character string buffer too small

    Any suggestions?

  6. rajavu's Avatar
    rajavu is offline Forum Genius
    Join Date
    13 Oct 2008
    Location
    @ Bangalore , India
    Posts
    410
    Say Thanks
    0
    Thanked 16 Times in 15 Posts

    Re: PL/SQL ORA-06512 Error

    The reason is already mentioned.

    The data type length of v_project_description is less than the actual Data type length of the column projects.project_description.

    Increase the data type length of v_project_description while calling the procedure.

    Raj.