Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7701145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:54:53+00:00 2026-05-31T22:54:53+00:00

I am using Oracle/MyBatis and trying to debug a stored procedure with an enormous

  • 0

I am using Oracle/MyBatis and trying to debug a stored procedure with an enormous amount of parameters. Inside the stored procedure I get a ORA-01438: value larger than specified precision allowed for this column

So my initial approach would be to do like dbms_output.put_line in the stored procedure to try to see what the values are right before the offending statement. Without MyBatis, I would ordinarily open up a sqlplus script and type set serveroutput on and then run my stored procedure at some later point to see all the debug messages come out. With MyBatis, I cannot figure out how (if possible) to get these debug statements.

I have the ibatis and sql debuggers set for DEBUG and I use log4j to log everything for my Tomcat 6 application.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T22:54:54+00:00Added an answer on May 31, 2026 at 10:54 pm

    The DBMS_OUTPUT package has a few other procedures that you could use. DBMS_OUTPUT.ENABLE functions much like the SQL*Plus command set serveroutput on in that it allocates a buffer for DBMS_OUTPUT.PUT_LINE to write to. DBMS_OUTPUT.GET_LINE can be used to fetch the data written to that buffer by previous calls to DBMS_OUTPUT.PUT_LINE. So it should be possible to call the ENABLE function, call the procedure which writes a number of lines to the buffer, and then call GET_LINE (or GET_LINES) to fetch the data that was written to the DBMS_OUTPUT buffer and write that data to your logs.

    It may be simpler, however, to redirect the logging to an Oracle database table rather than trying to use DBMS_OUTPUT. One common approach is to create your own package that has a switch to determine whether to write to DBMS_OUTPUT or whether to write to a table. Something like

    CREATE OR REPLACE PACKAGE p
    AS
      procedure l( p_str IN VARCHAR2 );
    END;
    
    CREATE OR REPLACE PACKAGE BODY p
    AS
      g_destination INTEGER;
      g_destination_table    CONSTANT INTEGER := 1;
      g_destination_dbms_out CONSTANT INTEGER := 2;  
    
      PROCEDURE l( p_str IN VARCHAR2 )
      AS 
      BEGIN
        IF( g_destination = g_destination_dbms_out )
        THEN
          dbms_output.put_line( p_str );
        ELSE
          INSERT INTO log_table ...
        END IF;
      END;
    
      BEGIN
        g_destination := <<determine which constant to set it to.  This
                           may involve querying a `SETTINGS` table, looking
                           at the environment, or something else>>
      END;
    END;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

when using oracle forms to generate md5 hash, i get result that is different
I'm using Oracle 10g and I'm trying to stack the conditions in a CASE
Using Oracle 11g release 2, the following query gives an ORA-01790: expression must have
(Using Oracle) I have a table with key/value pairs like this: create table MESSAGE_INDEX
I am using Oracle ODAC for EntityFramework. I am trying to develop a sample
Currently using Oracle/BEA/Plumtree ALUI Portal 6.1, and am trying to display a client's IP
I'm using oracle(10). I've got two tables as follows: Table1 (uniq rows): ID AMOUNT
hi i am using oracle db. getting in the following statements.ORA-00936: missing expression string
Using Oracle SQL Developer I'm trying to access a given package that has been
I am using Oracle Express Edition and I want to get table information (column

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.