Debugging in Toad

Hi,
Can anyone tell me how to see the collection values while running procedure in debugging mode in toad?
Regards
Aswathy

TOAD is pathelogical software that should be avoided.
Handle:     AswathyJK
Status Level:     Newbie
Registered:     Sep 3, 2009
Total Posts:     22
Total Questions:     9 (7 unresolved)
I extend my condolences to you since you rarely get answers to your questions here.
AswathyJK wrote:
Hi,
Can anyone tell me how to see the collection values while running procedure in debugging mode in toad?
Regards
Aswathy

Similar Messages

  • Problem with compiling a procedure in debug-mode

    ahoj all together!
    i have a small pl/sql function, which made big troubles yesterday, when i compiled it with debug-info. toad didn't finish compiling and when i canceled it, i got the following two error-messages in the oracle-trace file again and again till the harddisk was full. (file is now 17 gb)
    Probe:read_pipe: receive failed, status 3
    Probe:S:debug_loop: timeout. Action 0
    oracle-version: 9.2.0.4.0
    can someone tell me what's the problem? thx!
    bye,
    christian

    Hello,
    You may get more help raising this with Toad support, or on a Toad forum.
    Regards,
    AG

  • How to see variable Data at the time debugging procedure in oracle toad 9.1

    Hi all,
    I am not able to see variable Data at the time of debugging procedure in oracle toad 9.1 .
    Any help would be appreciated .
    Regards,
    P Prakash
    Edited by: prakash on May 30, 2011 1:37 AM
    Edited by: prakash on May 30, 2011 1:37 AM
    Edited by: prakash on May 30, 2011 1:37 AM

    You might be aware Toad is not an Oracle product, so you need to post this at the forums of Quest, http://www.questsoftware.com
    Sybrand Bakker
    Senior Oracle DBA

  • Debug an oracle function with toad 7.4, oracle 9i

    Hello,
    i wanna debug an oracle function with toad 7.4
    so i wanna give param to this function and fix breakpoint and verfy some variables values ... etc
    could you show me how debug it?
    Thanks
    Regards
    Elyes

    Do you have the Toad Debugger? Thats the extra cost option which you get for free in OracleSqlDeveloper.
    If you have the ToadDebugger, Read the Manual
    If not , download OracleSqlDeveloper and use it. It's free, and written by Oracle.

  • Not able to debug procedure using oracle 11g & toad 9.0.1.8

    hi..
    i m using oracle 11g & toad 9.0.1.8 ..i want to debug procedure , i set parameter, but not able to debug procedure , there is 'debug' option, but that option is disable..
    can u plz help me regarding this..
    can u suggest me another tool where i can debug my procedure..
    thanx..
    Edited by: user10502250 on Jun 22, 2009 4:15 AM

    "Help, About" should list the installed options, and "Debugger" should be in the list otherwise you'll need an expensive upgrade or a change of IDE.
    In TOAD you have to open the source code editor, at which point the debugging options should be accessible. You can either set a breakpoint and hit the 'Execute' lightening symbol, or place the cursor at a suitable point in the code and press F12.
    I'm not completely sure how you are supposed to pass runtime parameters but it may be to do with right-click, Action Console, Execute, which brings up a 'Set Parameters' dialog. However this won't run in debug mode, it just runs and remembers the arguments. I don't really get it. As you can probably tell I'm not a great fan of the product. Have you looked at PL/SQL Developer?

  • Is there a way to force Local Debug

    Hi,
    I can't debug on any oracle 9i server, having this issue :
    Executing PL/SQL: ALTER SESSION SET PLSQL_DEBUG=TRUE
    Executing PL/SQL: ALTER SESSION SET PLSQL_COMPILER_FLAGS=INTERPRETED
    Executing PL/SQL: CALL DBMS_DEBUG_JDWP.CONNECT_TCP( '127.0.0.1', '4000' )
    ORA-30683: failure establishing connection to debugger
    ORA-12541: TNS:no listener
    ORA-06512: at "SYS.DBMS_DEBUG_JDWP", line 68
    ORA-06512: at line 1
    The reason is, I guess, because the Oracle server can't access my computer because there is a firewall between them that I can't remove ...
    But, I also use some Oracle 8i db, behind the same firewall, and these work great !
    It seems that SQL developper do some local debug on oracle 8i, and some remote debug on oracle 9i.
    Is there a way to force local debug on Oracle 9i db from sql developper ? (it should be possible, because TOAD debug works perfectly, so I guess it's using local debug)
    Thanks !

    Thanks
    but I already tried that
    It seems I need to provide my IP address, so that the server can access my computer.
    But even if I provide it, it's impossible for the server to access my computer because there is a firewall between us that I can't remove ...
    There's no way for me to do some remote debug ..
    That's why I'd like to do some local debug ...

  • How to run a stored procedure in TOAD 9.0

    Dear Friends,
    I am using TOAD 9.0 .
    Running a procedure but getting the error ..
    create or replace PROCEDURE UPD_TBL(I_table_name IN VARCHAR2) IS
    CURSOR c_columns is select column_name from ALL_TAB_COLUMNS where
    TABLE_NAME = I_table_name;
    BEGIN
    FOR rec in c_columns
    LOOP
    IF ( rec.COLUMN_NAME = 'X_NNM_TYPE_CD' ) THEN
    UPDATE I_table_name set X_NNM_TYPE_CD = REPLACE (X_NNM_TYPE_CD, '-', '_')
    WHERE INSTR (X_NNM_TYPE_CD, '-') > 0 ;
    ELSIF ( rec.COLUMN_NAME = 'X_REVENUE_TYPE_CD' ) THEN
    UPDATE I_table_name set X_REVENUE_TYPE_CD = REPLACE (X_REVENUE_TYPE_CD, '-', '_')
    WHERE INSTR (X_REVENUE_TYPE_CD, '-') > 0 ;
    END IF;
    END LOOP;
    EXCEPTION
    when OTHERS then
    NULL;
    END UPD_TBL;
    ERROR: TABLE OR VIEW DOES NOT EXIST.
    Please let me know how to run the procedure in toad.
    thanks/kumar

    Kumar,
    At a minimum, you would need to remove both the exception handler in your procedure and the exception handler in your anonymous block. As has been mentioned before, the code
    EXCEPTION
      WHEN OTHERS THEN
        NULL;
    END;is almost always a bug. In your case, your code is almost certainly generating an exception and your exception handler is silently catching and ignoring that exception. If you care whether or not any rows are updated, that is a bug.
    Once you remove the exception handlers, you'll very likely discover that the SQL statements you are generating and executing dynamically are malformed. Off the top of my head, it would appear that there is no space between the table name and the SET keyword in the string you are constructing. That means that if I_TABLE_NAME is 'EMP', for example, you'd construct a statement like
    UPDATE empSET x_nnm_typ_cd = ...'Oracle would interpret empSET as the table name, it would interpret X_NNM_TYP_CD as a table alias, and then it would encounter the equals sign unexpectedly and generate a syntax error. You'd need to insert a space after the table name and before the SET keyword (note where folks inserted extra spaces in their sample code).
    In general, you are probably better served by having a local variable that you use to build up the SQL statement. That way, you can print (or log) the SQL statement that is constructed. When you encounter a syntax error at runtime, that will generally make debugging easier. So you'd probably want something like
      l_sql_stmt VARCHAR2(1000);
    BEGIN
      FOR rec IN cur_c_columns LOOP
        IF (rec.column_name = 'X_NNM_TYPE_CD') THEN
          l_sql_stmt :=
             'UPDATE '||i_table_name||
             ' SET x_nnm_type_cd = REPLACE(x_nnm_type_cd, ''-'', ''_'')'||
             'WHERE INSTR(x_nnm_type_cd, ''-'') > 0';
          dbms_output.put_line( l_sql_stmt );
          EXECUTE IMMEDIATE l_sql_stmt;
    ...When you get a syntax error, you can then take a look at the SQL statement that was generated and debug the problem more easily.
    Justin

  • Problem viewing cursor value in debug mode

    Hi eveybody!
    I'm French and new here.
    I know some topics deal with my subject but I don't really understand.
    Here's my environnement :
    Win2000 / ORA 9iR2 / SQL DEVELOPPER 1.0.0.15.57
    As some people say when i'm in debug mode (after compiling my procedure PL/SQL for debug) I can't see any value of my cursors !
    Ex :
    CURSOR cur IS
    SELECT COL1, COL2
    FROM TABLE1;
    v_cur cur%ROWTYPE;
    For v_cur in cur
    Loop
    If v_cur.COL1 = 'toto' then
    'do something' ;
    End if;
    End Loop;
    When I run this step by step in debug mode I can't see the data of my cursor in the data or smartdata pane.
    The values of my cursor is allways null !
    I guess I'm not the only one to see that bug.
    My question is should I wait a new release of sql developer or is there any solution for this problem?
    Anyway I want to congratulate the developers team who create this tool which is fabulous! It makes me forget TOAD and it's totally free.
    Thanks a lot for this job.
    Greg

    Here is a piece of code I use:
    CREATE OR REPLACE PROCEDURE sm_list AS CURSOR emp_cursor IS
    SELECT d.department_name,
    e.last_name
    FROM departments d,
    employees e
    WHERE d.department_id = e.department_id;
    emp_record emp_cursor % rowtype;
    BEGIN
    FOR emp_record IN emp_cursor
    LOOP
    DBMS_OUTPUT.PUT_LINE(emp_record.last_name);
    END LOOP;
    END;
    With this example, I agree, the smart data is null. Logged a bug. However, note that I do see values in the data tab and can modify and watch these values.
    When using cursors I've been looping and then fetching into cursor records, i.e.:
    FETCH emp_cursor
    INTO emp_record;
    emp_tab(i) := emp_record;
    and then the values display in the Smart data and data tabs.
    Sue

  • Executing Stored Procedure from TOAD: ORA-00900: invalid SQL statement

    Ok…I have ALL the stored procedures converted into Oracle…now, when I go to test them I am getting the vague error of:
    ORA-00900: invalid SQL statement
    I am attempting to execute:
    --EXEC IEXGetAgentSysPerf(to_date('2008/09/01', 'yyyy/mm/dd/'), to_date('2008/09/11', 'yyyy/mm/dd'), 'US HelpDesk');
    EXEC IEXGetAgentSysPerf('9/1/2008', '9/11/2008', 'US HelpDesk');
    (Neither work). These are calling a Stored Procedure with the following header:
         PROCEDURE IEXGetAgentSysPerf (
              v_curparm_IEXGetAgentSysPerf     IN OUT      pkg_IEX.cur_IEXGetAgentSysPerf
              ,v_BDateTime     DATE
              ,v_EDateTime     DATE
              ,v_WorkGroup     VARCHAR2
    The IDE is “TOAD” for Oracle. Thanks in advance.

    Hi,
    This is your procedure
    PROCEDURE IEXGetAgentSysPerf (
    v_curparm_IEXGetAgentSysPerf IN OUT pkg_IEX.cur_IEXGetAgentSysPerf
    ,v_BDateTime DATE
    ,v_EDateTime DATE
    ,v_WorkGroup VARCHAR2
    you are providing the ,v_BDateTime DATE,v_EDateTime DATE and v_WorkGroup
    and how about "v_curparm_IEXGetAgentSysPerf ". So that procedures is returning the error.
    Adding the the earlier post, If you want to test the Stored Procedures... then I say you work on the PL/SQL
    Developer which good for debugging (easy to use...) When compare to TOAD.. :-)
    Test ..it there...
    - Pavan Kumar N

  • Error when substracting 2 dates in Packgage using toad

    Hi there , I am having a problem when calculating dates in a package usiong Toad.
    I have my function :
    FUNCTION PORTFOLIO_MEMO_RPT_Sql
    ( schema_name IN  VARCHAR2
      , select_business_date IN  DATE
    ) RETURN VARCHAR2
    SELECT DISTINCT
           Case
        when NVL(TO_DATE(''09/24/2013'',''MM/DD/YYYY'') - DECODE(mn.Active, 1, mn.DueDate, sc.DueDate ),0) = 0 then ''0Days''
        when NVL(''' || select_business_date  || '''   - DECODE(mn.Active, 1, mn.DueDate, sc.DueDate ),0) = 0 then .....
    when I give it my variable from outside , it is not working......but when I use a date inside, it works.
    Please note I call my function from outside like :
    SELECT * FROM  TABLE ( FI_rpt.Fi_Rpt_Pkg_loan.PORTFOLIO_MEMO_RPT (sys_context('userenv','session_user'),TO_DATE('09/24/2013','MM/DD/YYYY')) ) 
    Any help ?

    Hi,
    Once again, post a complete test script that people can run to re-create the problem.
    The script just has to show the problem you need to solve.  If it's difficult to post the acutal tables that get the actaul results you need, then post something simpler that just shows the part you don;'t understand.
    It looks like the part you don't understand is: "How can I create dynamic SQL with a DATE datatype?"
    For example, say you need a function that takes 2 arguments: a table name and a DATE (cutoff_date), and it returns the number of rows in that table where hiredate>=cutoff_date.  That is, given the scott.emp table, we'd like to write a query such as this:
    SELECT    ename, hiredate
    ,         hired_since ('SCOTT.EMP', hiredate)  AS h
    ,         hired_since ('SCOTT.EMP', SYSDATE)   AS t
    FROM      scott.emp
    ORDER BY  hiredate;
    and have it produce resutls like this:
    ENAME      HIREDATE             H          T
    SMITH      17-Dec-1980         14          0
    ALLEN      20-Feb-1981         13          0
    WARD       22-Feb-1981         12          0
    JONES      02-Apr-1981         11          0
    BLAKE      01-May-1981         10          0
    CLARK      09-Jun-1981          9          0
    TURNER     08-Sep-1981          8          0
    MARTIN     28-Sep-1981          7          0
    KING       17-Nov-1981          6          0
    JAMES      03-Dec-1981          5          0
    FORD       03-Dec-1981          5          0
    MILLER     23-Jan-1982          3          0
    SCOTT      19-Apr-1987          2          0
    ADAMS      23-May-1987          1          0
    where the h column is the number of people hired since the hiredat in the output, and the t column is the number of people hired on or after run time, which will, of course, be 0.
    You assemble the dynamic SQL statement using || operators to connect strings.  As you pointed out, as string like
    TO_DATE ('09/24/2013', 'MM/DD/YYYY')
    woule work very nicely, but we're dealing with a DATE, not a string.  We could use TO_CHAR to create a string like that from the given DATE, but there's a much better way.  Pass the cutoff_date in to the dynamic SQL statement as a DATE, using a buind varible, like this:
    CREATE OR REPLACE FUNCTION  hired_since
    (   table_name   IN  VARCHAR2
    ,   cutoff_date  IN  DATE
    RETURN NUMBER
    IS
        return_val  NUMBER;
        sql_txt VARCHAR2 (1000);
    BEGIN
        sql_txt := 'SELECT  COUNT (*)'
                || ' FROM ' || table_name
                || ' WHERE  hiredate >= :1';
        dbms_output.put_line (sql_txt || ' = sql_txt in hired_since'); -- For debugging only
        EXECUTE IMMEDIATE sql_txt
        INTO              return_val
        USING             cutoff_date;
        RETURN  return_val;
    END  hired_since;
    SHOW ERRORS

  • Basic query on PLSQL using TOAD

    hi all,
    First of all thanks a lot to everyone for always helping and guiding me through all the doubts i had asked here.I have leasrned a lot and appreciate your help.
    So,my question is
    executing the STORED PROCEDURE in Toad 9.0
    execute assign_daily_plan('547615',null,null,'plan67063974107')
    I am getting an error showing LINE NO. and ISSUE  displayed.Now,when i cancel this ...it closes the window and execution over.
    I am not at all able to debug any more in this case.where can i see the values getting printed out in the program and the values for the dbms.output lines.
    I need to see all the inter-midate values during the run of the program till it gets the ERROR,possibly with BREAKPOINTS but...i am not able to do.Please help me
    I use toad 9.0 to connect to Oracle 10g Database
    * The stored procedure has dbms.output_lines for PRINT the flow of the program as well printing each variable data out during run time.
    *Also,set SERVEROUT ON is at the start of the editor as well as I used all the buttons like "STEP OVER","STEP INTO","TRACE" as well SQLPLUS too                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hello,
    First this procedure syntax ain't look right but you might be giving an example. (Here I am using TOAD 9.5).
    You should following as is and create procedure and then execute as a script in TOAD and check in output and see if it's priniting it or not and post output if didn't work for you.
    CREATE OR REPLACE PROCEDURE myprocedure
    AS
    BEGIN
       DBMS_OUTPUT.put_line ('HELLO I AM TESTING');
    END;pl/sql block using sqlplus
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
    With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options
    SQL> set serveroutput on;
    SQL> BEGIN
      2    KLONDIKE.MYPROCEDURE;
      3    COMMIT;
      4  END;
      5  /
    HELLO I AM TESTING
    PL/SQL procedure successfully completed.Runing as script from TOAD
    set serveroutput on;
    DECLARE
    BEGIN
       MYPROCEDURE;
    END;
    HELLO I AM TESTING
    PL/SQL procedure successfully completed.Regards
    Edited by: OrionNet on Mar 14, 2009 6:52 PM

  • What is the easiest tool to debug an SQL script in Oracle XE environment?

    I try to run a simple sql script that creates tables with their keys on Oracle XE. When it runs into bunch errors, I have difficult time to locate the mistake. One of the reason is, I don't know how to view the script in color that distinguishes the syntax like virtual C++ editor treats their text code.
    Can XE do this? If not, is there any easier way to debug a script in its environment?
    Much appreciated. Pardon for the triviality nature of the question.

    [PL/SQL Developer|http://www.allroundautomations.com/plsqldev.html] lets you step through a SQL*Plus-style script one command at a time.
    SQL*Plus (Oracle's very basic command-line tool) has [WHENEVER OSERROR|http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14357/ch12051.htm] and [WHENEVER SQLERROR|http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14357/ch12052.htm] settings that make it jump out of the script on OS or database failure, but that's about it. Other tools such as PL/SQL Developer, SQL Developer and (if you must) TOAD attempt to emulate SQL*Plus commands to some extent but you'd have to check the documentation to see what commands they support.
    Scripts aren't a compiled programming language like C++ or PL/SQL so there is no interactive debugger.

  • Differences between TOAD for Oracle and Oracle SQL Developer?

    Does someone know the advantages and disadvantages of using TOAD for Oracle and Oracle SQL Developer?
    I work making reports with TOAD, but in a few days I will have to use the SQL Developer (because it´s free) unless I justify the necessity of using TOAD.
    Could some that used both compare them?
    Thanks,
    Facundo.

    Hello Facundo,
    since we are rolling out new client PCs we switch from Toad to SQL Developer. Therefore I'm doing some training for the "normal" users and our developers.
    Most users simply want to have access to the data in tables and views. For those there are 2 main issues:
    - Filters get lost when exiting table while sorting is still applied. Since there is no way to apply filtering before entering the data tab this can become a great performance issue because sorting is applied to many many rows. For views it is sometimes impossible to open the data tab.
    - Exporting date values to Excel needs some know how if you want to sort by this column in Excel, because the date is formatted as "Standard" meaning that the sorting is done as for a text column: 01.01.2009 is less than 02.01.2008. Here you have to use a workaround column with a formula (=1*<datecolumn>)
    The greatest Pro is the easy sharing of connections and reports by XML files.
    Our developers like the easy debugging in SQL Developer. Though they miss the feature that the source is compiled for debug automatically as in Toad. For this we have distributed a script that compiles any PL/SQL object for debugging.
    There are only some Toads installed for DBAs and for users that need access to tables protected by policies that require authentification by OS user since this information is not passed under every circumstance.
    Regards
    Marcus

  • Debugging Anonymous PL/SQL Block

    Does sql developer allow you to debug an anonymous PL/SQL block or is the debugging restricted to compiled procedures/functions? Am a TOAD user but am looking at SQL Developer. Thanks

    As you can only set breakpoints inside a code editor, you'll have to wrap your code in a stored procedure.
    You could request this at the SQL Developer Exchange, but I guess it'll be too much work to add vs. the relative ease of using a stored proc.
    Regards,
    K.

  • Pl/sql using enterprise manager or toad

    A basic question : When it comes to writing PL/SQL code, testing, debugging and performance tuning(the pl/sql code itself), which of the tools are better (The OEM or would it be toad). I am looking for advantages that either or both of them have. Any documentation or tip on this would be great...
    Note: I am not looking forward in just monitoring and tuning the sql statements that the pl/sql code has(which I would, anyways), but wanted to explore a possibility if either of the above tools can tell me something at a pl/sql level... like... this pl/sql code performs well, whereas the other one doesn't... This is the idea I have...
    Thanks

    The best tool for writing PL/SQL is that gray stuff between your ears.
    A s/w tool can not take poorly designed and written PL/SQL code and make it "better".
    As for determining how well the code performs - that also need gray matter and using tools like DBMS_PROFILE, execution plans, SQL Trace/TKProf.
    I write lot of code. In Linux Vi (aka vim). Using SQL*Plus. This code, as code, is no worse (or better) than code written in TOAD, SQL*Developer, or whatever else.
    It is not about the tool. It is how about one uses that tool. It was Van Gogh that created master pieces. Not his paint and brushes.

Maybe you are looking for

  • How to monitor Database Users who ever is doing bulk transactions

    Hi All, We need to produce a report (daily basis ) which will provide User and Bulk Transaction details in Database to track the system. How to state a script to perform this monitoring ? RDBMS: 10.2.0.5.0 (64 bit) OS: RHEL-5.2 Thanks, Tusar

  • Asset management and ekpo

    Hi i am dealing with asset related tables  ( anla/anlz/anep/anek) . I want to get related purchase order for that . thast is I want to relate aset table and EKPO to get ekpo-ebeln . Please help regarding this ............... thanks in advance

  • MR11- Change Account determinations

    All- How do we change the account determination that are set up for MR11 (GR/IR clearing). We want it to post to a manfucatoring account instead of an inventory account when doing this transcation, and can't figure out how to switch the path of these

  • Working with dimensions in data forms

    Hi All, I am creating a data form in one of my classic planning application, using Hyperion 11.1.2. Suppose i have two custom dimensions with two members in each of them: Dim1 (Mem1, Mem2) Dim2 (Mem3, Mem4) Now i place both of above dimension at colu

  • Windows 7 - Brand new Satilite M300

    Hi guys, I bought a new Toshiba Satellite last night, 2.1 (I think) processor, 3 (or 4?) Gb ram, 14.1" screen. It's white, and actually, very nice so far. But I am of the view that I will either run XP Professional (Came with Vista Home), or Windows