Solved

debugging a proc

Posted on 2012-04-09
2
337 Views
Last Modified: 2012-04-30
hi guys
I have a store proc which is inserting rows in TABLE ' person_table '

PROCEDURE insert_person
    ( input_insert             person_type   --person_type is a  TYPE
    , po_success     OUT NOCOPY CHAR
    )
IS

c_program_name CONSTANT VARCHAR2(64) := c_package_nm||'.insert_person';

bulk_errors EXCEPTION;
PRAGMA EXCEPTION_INIT (bulk_errors, -24381);

BEGIN

    po_success := 'Y';  -- i put a break point here
    FORALL i IN input_insert.FIRST..input_insert.LAST   -- i put a break point here
    SAVE EXCEPTIONS
        INSERT INTO person_table  -- i put a break point here  
            ( id
            , name            
            , lst_updt_timestamp            
            )
        VALUES
            ( person_map.NEXTVAL                    
            , input_insert(i).person_name
            , SYSTIMESTAMP
           
            );


EXCEPTION
  WHEN bulk_errors THEN
    FOR i IN 1..SQL%BULK_EXCEPTIONS.COUNT
    LOOP
        person_exception_error_log
            ( pi_error_type     => 'FATAL'
            , pi_program_name   => c_program_name
            , pi_program_type   => c_program_type
            , pi_error_code     => SQL%BULK_EXCEPTIONS(i).ERROR_INDEX
            , pi_error_msg      => SQL%BULK_EXCEPTIONS(i).ERROR_CODE
            );
    END LOOP;

    po_success := 'N';

  WHEN OTHERS THEN
    person_exception_error_log  
        ( pi_error_type     => 'FATAL'
        , pi_program_name   => c_program_name
        , pi_program_type   => c_program_type
        , pi_error_code     => SQLCODE
        , pi_error_msg      => SQLERRM
        );

    po_success := 'N';
   
END insert_person;      


I put couple of break points but when my java program calls this store proc it doesnt stop at the break points.
In sql developer , From top menu I clicked on 'Debug' -->Debug Person_Operations Body.

any idea what i am doing wrong?

thanks
0
Comment
Question by:royjayd
2 Comments
 
LVL 76

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 250 total points
Comment Utility
I believe SQL Developer will only debug in the current session.  I don't think you can use debug when calling from an external program.
0
 
LVL 23

Accepted Solution

by:
David earned 250 total points
Comment Utility
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now