Debugging PL/SQL in Oracle

Hi there,
I'm needing some help on features of Oracle PL/SQL and the Oracle server. Does oracle provide a way for a user to debug SQL and/or PL/SQL statements? I'm currently using Oracle 8x and looking to probably use Oracle 9 or later version in the future. I don't use Oracle directly very much (it's our database server to a PowerBuilder 8 application) so I'm not aware of all its features. Thanks alot for any feedback and info you can give. :-)

You can monitor the activity in the database with many features, with oracle 8.X, you can turn the trace on, and generate statistics for every sentence which is sent to the oracle server. In the other hand you can use 3rd party tools, for example, Patrol Module for Oracle but you need some infraestructure for using it, or you can try with the Oracle Expert which is part of the Oracle Tunning Pack or you can use SQL Lab (for tuning the statements you suspect are not as perfect in performance as you could wish), sql lab is from quest software.
Trancing users with sql_trace=true can generate a lot of information taht you can format and analyze it with tkprof utility. This is kind of heavy work, but if you do not want to buy another tool, this is an option.
Hope this helps.
Cynthia Pulido
Monterrey, Mexico

Similar Messages

  • 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.

  • Probs Debugging PL/SQL proc JDev903

    Im trying to debug PL/SQL functions in JDeveloper 9.0.3.
    Issue N1. In Run PL/SQL window JDev adds schema name to my function and PL/SQL block fails to compile. Im manually deleting prefix from my function and block is compiled successfully.
    Then an error happened: PLS-00302: component 'JDEV_TMP_PROC_1' must be declared
    Please advice
    Debugger attempting to connect to database.
    Executing PL/SQL: ALTER SESSION SET PLSQL_DEBUG=TRUE
    Executing PL/SQL: DECLARE
    id VARCHAR2( 30 );
    BEGIN
    id := DBMS_DEBUG.initialize( '24.27.75.30:1036303964414', 1 );
    DBMS_DEBUG.debug_on( TRUE );
    END;
    Debugger connected to database.
    Deadlock detection is not supported by the debuggee virtual machine.
    Executing PL/SQL: BEGIN MY_SCHEMA."JDEV_TMP_PROC_1"(); END;
    ORA-06550: line 1, column 11:
    PLS-00302: component 'JDEV_TMP_PROC_1' must be declared
    ORA-06550: line 1, column 7:

    JDev can debug with Oracle 8.1.7 or later.
    Is the PL/SQL you want to debug in the same schema as you are connecting? Because you mentioned schema names, I wonder if there may be a bug with trying to debug PL/SQL in a schema other than the one you are connected to. If so, can you try creating connection as the owner of the PL/SQL and see if that works?
    Thanks!
    -- Brian (JDev Team)

  • Debugging PL/SQL using JDeveloper

    Hi all,
    I'm running JDeveloper 10.1.3.2.0 on Windows XP (32-bit) SP2 connecting to a Oracle 10g 10.2.1.0 (64-bit) on UNIX.
    I have compiled the packages and procedure using JDeveloper and can run the procedure using SQL*Plus but I when I try to run the procedure in JDeveloper
    the "Run PL/SQL" dialogue appears, the Messages window shows: "Connecting to the database oradb01". I click OK and nothing seems to happen.
    I have been told by my DBA that I have all the prerequisites to debug PL/SQL so I wonder if I am missing something. Can anyone help?
    Thanks all,
    LG

    Brilliant. Thanks Shay,
    The only thing I wasn't sure about was that I tried to use the IP address of my workstation (from ipconfig) in the DBMS_DEBUG_JDWP.CONNECT_TCP procedure and for some reason it wouldn't work, so I used the Windows full computer name instead and it worked fine.
    Leo

  • How to debug PL/SQL functions? Passing parameter and debugger error

    Hi,
    How to debug a PL/SQL function in JDeveloper? There are two problems with it:
    1) Don't see how it's possible to pass parameters required by function call (in the dialog opening after Debug -> Debug FUNCTION_NAME)
    2) In a function returning table_name%ROWTYPE (and having a record declaration for table_name%ROWTYPE), debug gives error:
    PLS-00103: Encountered symbol "/" when expecting one of ... in line
    v_Return PL/SQL RECORD;
    Debugging procedures works as expected.
    Found a similar question without answer here:
    Debugging PL/SQL with parameters

    Check
    http://www.oracle.com/technology/obe/obe9051jdev/plsqlobe/obeplsql.htm#t2
    Frank

  • Debug PL/SQL in SQL Developer

    I am not able to debug PL/SQL and i have following error please advice how I can enable privileges and I want to know the steps of debugging.
    Connecting to the database My_connection.
    Executing PL/SQL: ALTER SESSION SET PLSQL_DEBUG=TRUE
    Executing PL/SQL: CALL DBMS_DEBUG_JDWP.CONNECT_TCP
    ORA-01031: insufficient privileges
    ORA-06512: at "SYS.DBMS_DEBUG_JDWP", line 68
    ORA-06512: at line 1
    This session requires DEBUG CONNECT SESSION and DEBUG ANY PROCEDURE user privileges.
    Process exited.
    Disconnecting from the database My_connection.
    Thanks for your time

    Pl do not post duplicates - https://forums.oracle.com/thread/2559861

  • Debugging PL/SQL blocks in SQL Developer

    Is there any way to debug blocks of PL/SQL in SQL Developer by setting breakpoints in the code? I'm using SQL Developer.
    I'm trying to debug some fairly complex PL/SQL blocks - they are not procedures or functions and so I'm unable to run them in debug mode.
    p.s. Apologies should have posted this in the database forum really.
    Edited by: Antilles on Sep 10, 2008 1:12 AM

    Hello,
    Sure you can, take a look at the following two links -
    http://sueharper.blogspot.com/2006/07/remote-debugging-with-sql-developer_13.html
    http://www.oracle.com/technology/oramag/oracle/08-may/o38browser.html
    Hope this helps,
    John.
    http://jes.blogs.shellprompt.net
    http://www.apex-evangelists.com

  • Debugging PL/SQL

    I am using Toad for Oracle. Is there any way within PL/SQL code to define a section or block of code as code that should only run when you are debugging PL/SQL procedures/functions?

    I think the OP wants something more like this (tested in 11g, should work from 10.2 onwards if I remember correctly):
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> create or replace procedure procedurewithdebug
      2  as
      3  begin
      4      dbms_output.put_line('Start of procedure');
      5
      6      $if $$debug $then
      7          dbms_output.put_line('Extra code section only called when $$debug is TRUE');
      8      $end
      9
    10      dbms_output.put_line('End of procedure');
    11  end procedurewithdebug;
    12  /
    Procedure created.
    SQL> set serverout on
    SQL> exec procedurewithdebug
    Start of procedure
    End of procedure
    PL/SQL procedure successfully completed.
    SQL> call dbms_preprocessor.print_post_processed_source('PROCEDURE','WILLIAM','PROCEDUREWITHDEBUG');
    procedure procedurewithdebug
    as
    begin
    dbms_output.put_line('Start of procedure');
    dbms_output.put_line('End of procedure');
    end procedurewithdebug;
    Call completed.
    SQL> alter session set plsql_ccflags = 'debug:true';
    Session altered.
    SQL> alter procedure procedurewithdebug compile;
    Procedure altered.
    SQL> exec procedurewithdebug
    Start of procedure
    Extra code section only called when $$debug is TRUE
    End of procedure
    PL/SQL procedure successfully completed.
    SQL> call dbms_preprocessor.print_post_processed_source('PROCEDURE','WILLIAM','PROCEDUREWITHDEBUG');
    procedure procedurewithdebug
    as
    begin
    dbms_output.put_line('Start of procedure');
    dbms_output.put_line('Extra code section only called when $$debug is TRUE');
    dbms_output.put_line('End of procedure');
    end procedurewithdebug;
    Call completed.
    SQL> alter session set plsql_ccflags = 'debug:false';
    Session altered.
    SQL>
    SQL> alter procedure procedurewithdebug compile;
    Procedure altered.
    SQL> exec procedurewithdebug
    Start of procedure
    End of procedure
    PL/SQL procedure successfully completed.Note this does not automatically detect whether a procedure is compiled for debug - you have to set a compilation directive explicitly. (There is nothing special about '$$debug' either - I could have used '$$banana'.)
    As a variation, you can also use package constants:
    SQL> create or replace package environment_settings
      2  as
      3      debug constant boolean := TRUE;
      4  end environment_settings;
      5  /
    Package created.
    SQL> create or replace procedure procedurewithdebug
      2  as
      3  begin
      4      dbms_output.put_line('Start of procedure');
      5
      6      $if environment_settings.debug $then
      7          dbms_output.put_line('Extra code section only called when environment_settings.debug is TRUE');
      8      $end
      9
    10      dbms_output.put_line('End of procedure');
    11  end procedurewithdebug;
    12  /
    Procedure created.
    SQL> exec procedurewithdebug
    Start of procedure
    Extra code section only called when environment_settings.debug is TRUE
    End of procedure
    PL/SQL procedure successfully completed.
    SQL> create or replace package environment_settings
      2  as
      3      debug constant boolean := FALSE;
      4  end environment_settings;
      5  /
    Package created.
    SQL> exec procedurewithdebug
    Start of procedure
    End of procedure
    PL/SQL procedure successfully completed.Note that PL/SQL isn't just skipping the line like an ordinary IF statement, the PL/SQL compiler is actually excluding the section at compile time:
    SQL> call dbms_preprocessor.print_post_processed_source('PROCEDURE','WILLIAM','PROCEDUREWITHDEBUG');
    procedure procedurewithdebug
    as
    begin
    dbms_output.put_line('Start of procedure');
    dbms_output.put_line('End of procedure');
    end procedurewithdebug;
    Call completed.Edited by: William Robertson on Mar 26, 2009 7:18 AM

  • Debugging PL/SQL procedures with JDeveloper ?

    Hi,
    does anyone know if it is possible to debug PL/SQL procedures and packages with JDeveloper ? I'm using a 9.0.1.2.0 database but JDeveloper returns the error "The target VB_TEST could not be started because the database version does not support debugging." when I try to debug a PL/SQL procedure.
    If it is not possible, does anyone know a good alternative ?Oracle Script Debugger is not available anymore at technet.

    I need to retrive data from PL/SQL stored procedures. I am using the DynamicSQL component (2nd workaround) to retrive data from PL/SQL stored procedures. <br><br>
    I am having some problems.<br><br>
    This is the code I am running in Fuego Studio 5.5 SP 11 Build #71108:<br><br>
    dynamicSQL as Fuego.Sql.DynamicSQL<br>
    iterator as Iterator(Any[Any])<br>
    sentence as String<br>
    implname as String<br><br>
    dynamicSQL = Fuego.Sql.DynamicSQL()<br>
    implname = "conexionORBPAU"<br>
    sentence = "var result REFCURSOR; " + <br>
    "exec :result_cursor := pkg_audbpm_bpaasig_indicador.prgetsingle(9999);";<br>
    iterator = executeQuery(DynamicSQL, sentence, implname, inParameters : []);<br><br>
    And, this is the error:<br><br>
    java.sql.SQLException: Falta el parametro IN o OUT en el indice:: 1 <br>
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)<br>      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)<br>
    oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:1681)<br>
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3280)<br>
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3329)<br>
         at fuego.jdbc.FaultTolerantPreparedStatement.executeQuery(FaultTolerantPreparedStatement.java:579)<br>
         at fuegoblock.sql.DynamicSQL.executeQuery(DynamicSQL.java:340)<br>
    ...<br><br>
    This is the code of the PL/SQL in the Oracle DB:<br><br>
    CREATE OR REPLACE PACKAGE PKG_AUDBPM_BPAASIG_INDICADOR IS<br>
    TYPE cursor_type IS REF CURSOR;<br>
         FUNCTION prGetSingle<br>
         (<br>
              p_ID_ASIG_INDICADOR IN NUMBER<br>
         )<br>
         RETURN cursor_type;<br><br>
    END PKG_AUDBPM_BPAASIG_INDICADOR;<br><br>
    is my code OK? Any ideas?<br><br>
    Thanks in advance.<br>

  • Problem displaying data and Smart data debugging pl/sql

    I'm using JDev 9.0.5.1 build 1065, when i debug a PL/SQL function from the connections navigator, it allows me to stop at a breakpoint, but it doesn't display anything in the data or smart data panes. Do i need to change a config setting somewhere ? The PL/SQL is in an Oracle 8i database, does it need to be 10g for this functionality to work ?
    Thanks
    Alistair

    Are you trying to debug ASP.NET or a windows app or direct debugging?
    If a windows app or direct debugging, follow these steps:
    http://cshay.blogspot.com/2006/07/plsql-debugger-in-visual-studio.html
    If ASP.NET, follow part of the steps above to configure, but then use these steps for External App debugging:
    Debugging PL/SQL from .Net 2003

  • Can't get External Application Debugging to work to debug PL/SQL.

    I can debug PL/SQL directly. I wish to debug ASP.NET applications using IIS. To debug my application I must attach to aspnet_wp.exe and fire up IE or firefox.. I have tried to set ORA_DEBUG_JDWP just before the call to the PL/SQL SP, but the debugger doesn't stop at the PL/SQL break point--I have set a break point just before the PL/SQL call and then enable 'Start Oracle External Application Debugger" and enter the port number that I set in ORA_DEBUG_JDWP. I believe that ORA_DEBUG_JDWP must be set before an Oracle connection is established. If I do that it interferes with my firefox or IE browser that I need to get to the point of the PL/SQL call--there are many postbacks that are encountered through the course of getting to the point where the PL/SQL call (i.e. logging in, navigating through the menu and then entering values to trigger the call). Has anyone gotten ODT to work in this configured environment? Any suggestions would be appreciated.

    Yes, I have gone through the article step by step many times. The crux of my problem I believe is that I am to "3) Add code to your ASP.NET app to set the environment variable at the process level. You need to do this at a point in the code before a connection is opened. In C# this looks something like:
    Environment.SetEnvironmentVariable("ORA_DEBUG_JDWP", "host=mymachine;port=8888", EnvironmentVariableTarget.Process);"
    I must access the Oracle database for various logon information before I get to the PL/SQL SP that I want to debug. On the first Oracle database access I get the following Oracle error because I have already set the ORA_DEBUG_JDWP variable so any connection to Oracle is trying to access the debugger (That's what I conclude anyway)..
    ORA-01031: insufficient privileges\nORA-06512: at \"SYS.DBMS_DEBUG_JDWP\", line 68\nORA-06512: at \"SYS.DBMS_DEBUG_JDWP_CUSTOM\", line 59\nORA-06512: at line 1\n"
    Thanks,
    Brent
    <<Did you have a chance to go through the steps in this article?:
    <<http://cshay.blogspot.com/2006/10/debugging-plsql-from-aspnet-and-visual.html
    <<Let me know.
    <<Christian

  • Can we use Dynamic SQL in Oracle Reports ?

    Hi ,
    Can we use Dynamic SQL in Oracle Reports ?
    If yes please give some examples .
    Thanx
    srini

    I believe the built-in package SRW.Do_Sql is what you are looking for
    Example from the document:
    /* Suppose you want to create a "table of contents" by getting the
    ** first character of a columns value, and page number on which its
    ** field fires to print. Assume that you want to put the "table of
    contents"
    ** into a table named SHIP. You could write the following construct:
    DECLARE
    PAGE_NO NUMBER;
    PAGE_FOR INDEX NUMBER;
    SORT_CHAR CHAR(1);
    CMD_LINE CHAR(200);
    BEGIN
    SORT_CHAR := :SORT_NAME ;
    IF :CALLED = Y THEN
         SRW.GET_PAGE_NUM(PAGE_FOR_INDEX);
         SRW.USER_EXIT(RWECOP PAGE_FOR_INDEX
         P_START_PAGENO);
         SRW.MESSAGE(2,TO_CHAR(:P_START_PAGENO));
    END IF;
    SRW.GET_PAGE_NUM(PAGE_NO);
    CMD_LINE := INSERT INTO SHIP VALUES
                          (||SORT_CHAR||,||TO_CHAR(PAGE_NO)||);
    SRW.MESSAGE(2,CMD_LINE);
    SRW.DO_SQL(CMD_LINE);
    COMMIT;
    EXCEPTION
      WHEN DUP_VAL_ON_INDEX THEN
            NULL;
      WHEN SRW.DO_SQL_FAILURE THEN
            SRW.MESSAGE(1,FAILED TO INSERT ROW INTO SHIP TABLE);
      WHEN OTHERS THEN
           COMMIT;
    END;

  • SQL Server Oracle If else differences

    I have a query in SQL Server 2008 that uses an if statement to determine how the SQL is returned. It is fairly complex but here it is in its basic form.
    declare @granularity varchar(20);
    begin
    set @granularity = 'Month';
    if (@granularity = 'Month')
    begin
    select count(*) as DisplayCount, yearstep, monthstep
    from MyTable
    group by yearstep, monthstep
    order by yearstep, monthstep
    end
    else
    if (@granularity = 'Year')
    begin
    select count(*) as DisplayCount, yearstep
    from MyTable
    group by yearstep
    order by yearstep
    end
    end
    Originally I thought the conversion would be as easy as changing the @ to :, adding a then and an end if. Not so....
    Can anyone show what the Oracle equivalent would be?
    Edited by: user497094 on Aug 20, 2010 12:51 PM

    If you use SQL Developer tool, you have a translator to translate T-SQL to Oracle PL/SQL language.
    For your example, you should get:
    BEGIN
    v_granularity := 'Month' ;
    IF ( v_granularity = 'Month' ) THEN
    BEGIN
    SELECT COUNT(*) DisplayCount,
    yearstep,
    monthstep
    FROM MyTable
    GROUP BY yearstep,monthstep
    ORDER BY yearstep,
    monthstep;
    END;
    ELSE
    IF ( v_granularity = 'Year' ) THEN
    BEGIN
    SELECT COUNT(*) DisplayCount,
    yearstep
    FROM MyTable
    GROUP BY yearstep
    ORDER BY yearstep;
    END;
    END IF;
    END IF;
    END;
    I hope it helps youi
    Regards,
    Mireille

  • Using a SQL for Oracle in Microsoft Excel Query

    I am having the most difficult time (in fact, I can't get it to work) trying to use an SQL I created in Toad for Oracle. It works fine in Toad for Oracle...gives me all the data I need. I am trying to use it in Excel for users that don't know SQL or Oracle so they can use the query to extract data they need for Charts, Graphs, etc.
    Here is the SQL code from Toad for Oracle:
    /* Formatted on 2006/09/22 11:42 (Formatter Plus v4.8.6) */
    SELECT a_compl_summary.incident_number, a_compl_summary.case_number,
           a_compl_summary.part_sequence, a_compl_summary.part_number,
           a_compl_summary.lot_number, a_compl_summary.alert_date,
           a_compl_summary.entry_date, a_compl_summary.NAME,
           a_compl_summary.MONTH, a_compl_summary.product_family,
           a_compl_summary.complaint, a_compl_summary.reportable,
           a_compl_summary.product_returned, a_compl_summary.case_desc,
           a_compl_summary.failure_invest_desc, a_compl_summary.lhr_search,
           a_compl_summary.root_cause, a_compl_summary.corrective_action,
           a_compl_summary.region,
           rp_qa_reported_device_codes.reported_device_code,
           rp_qa_reported_device_codes.reported_dev_clarification,
           rp_qa_reported_device_codes.reported_dev_code_desc,
           rp_qa_patient_codes.patient_code,
           rp_qa_patient_codes.patient_code_clarif,
           rp_qa_patient_codes.patient_code_severity,
           rp_qa_patient_codes.description
      FROM chsuser.a_compl_summary,
           chsuser.rp_qa_patient_codes,
           chsuser.rp_qa_reported_device_codes
    WHERE (    (a_compl_summary.product_division = 'CP')
            AND (    a_compl_summary.entry_date >= :date1
                 AND a_compl_summary.entry_date <= :date2
            AND (   a_compl_summary.product_family LIKE :pf1
                 OR a_compl_summary.product_family LIKE :pf2
                 OR a_compl_summary.product_family LIKE :pf3
                 OR a_compl_summary.product_family LIKE :pf4
                 OR a_compl_summary.product_family LIKE :pf5
            AND (a_compl_summary.region = :r1)
            AND (   a_compl_summary.NAME = :c1
                 OR a_compl_summary.NAME = :c2
                 OR a_compl_summary.NAME = :c3
                 OR a_compl_summary.NAME = :c4
                 OR a_compl_summary.NAME = :c5
            AND (a_compl_summary.complaint = :yorn)
            AND (   rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl1
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl2
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl3
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl4
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl5
            AND (rp_qa_reported_device_codes.reported_dev_clarification NOT LIKE
                                                                              :dc1
            AND (a_compl_summary.incident_number =
                                               rp_qa_patient_codes.incident_number
            AND (a_compl_summary.case_number = rp_qa_patient_codes.case_number)
            AND (a_compl_summary.part_sequence = rp_qa_patient_codes.part_sequence
            AND (a_compl_summary.incident_number =
                                       rp_qa_reported_device_codes.incident_number
            AND (a_compl_summary.case_number =
                                           rp_qa_reported_device_codes.case_number
            AND (a_compl_summary.part_sequence =
                                         rp_qa_reported_device_codes.part_sequence
            AND (rp_qa_reported_device_codes.incident_number =
                                               rp_qa_patient_codes.incident_number
            AND (rp_qa_reported_device_codes.case_number =
                                                   rp_qa_patient_codes.case_number
            AND (rp_qa_reported_device_codes.part_sequence =
                                                 rp_qa_patient_codes.part_sequence
           )Can someone help me...maybe point out what I'm doing wrong.
    Note: I also tried creating this query in Microsoft Query (the simple way) and when I first create it...it works...But then if I go back in to edit the query, and refresh the query or try to Return data to Excel, it gives me a ORA-00936 error message.
    Why it works when I first create the query in Excel, I don't know. But I have to validate the queries I'm creating (SQL or not) and I can't validate it if every time I go into edit the query (which may have to happen; that's why I have to fix this before I can submit my validation).
    Anyway, any help would be greatly appreciated.

    Okay, I know I'm replying to my own threads here...but I want to add a little bit more information again.
    I was successful in figuring out that changing the :criteria to a ? worked.
    I tested this on 1 criteria at a time. Adding one more scenario ? at at time.
    It only worked up until about 3 scenarios of each criteria.
    Then when I refreshed the query in Microsoft Excel Query, I got an "out of memory" error, and then it ended up just erasing the SQL I had been using.
    Here's the SQL I had where it gave me this error. Am I possibly just making Excel work too hard? It just doesn't make sense because Toad for Oracle handled it in like 4 seconds. Which brings me back to an intial question I had. Can Excel use Toad for Oracle somehow?
    Here's the code:
    SELECT a_compl_summary.incident_number, a_compl_summary.case_number,
           a_compl_summary.part_sequence, a_compl_summary.part_number,
           a_compl_summary.lot_number, a_compl_summary.alert_date,
           a_compl_summary.entry_date, a_compl_summary.NAME,
           a_compl_summary.MONTH, a_compl_summary.product_family,
           a_compl_summary.complaint, a_compl_summary.reportable,
           a_compl_summary.product_returned, a_compl_summary.case_desc,
           a_compl_summary.failure_invest_desc, a_compl_summary.lhr_search,
           a_compl_summary.root_cause, a_compl_summary.corrective_action,
           a_compl_summary.region,
           rp_qa_reported_device_codes.reported_device_code,
           rp_qa_reported_device_codes.reported_dev_clarification,
           rp_qa_reported_device_codes.reported_dev_code_desc,
           rp_qa_patient_codes.patient_code,
           rp_qa_patient_codes.patient_code_clarif,
           rp_qa_patient_codes.patient_code_severity,
           rp_qa_patient_codes.description
      FROM chsuser.a_compl_summary,
           chsuser.rp_qa_patient_codes,
           chsuser.rp_qa_reported_device_codes
    WHERE (    (a_compl_summary.incident_number =
                                               rp_qa_patient_codes.incident_number
            AND (a_compl_summary.case_number = rp_qa_patient_codes.case_number)
            AND (a_compl_summary.part_sequence = rp_qa_patient_codes.part_sequence
            AND (a_compl_summary.incident_number =
                                       rp_qa_reported_device_codes.incident_number
            AND (a_compl_summary.case_number =
                                           rp_qa_reported_device_codes.case_number
            AND (a_compl_summary.part_sequence =
                                         rp_qa_reported_device_codes.part_sequence
            AND (rp_qa_reported_device_codes.incident_number =
                                               rp_qa_patient_codes.incident_number
            AND (rp_qa_reported_device_codes.case_number =
                                                   rp_qa_patient_codes.case_number
            AND (rp_qa_reported_device_codes.part_sequence =
                                                 rp_qa_patient_codes.part_sequence
    AND (a_compl_summary.product_division = 'CP')
            AND (    a_compl_summary.entry_date >= ?
                 AND a_compl_summary.entry_date <= ?
            AND (   a_compl_summary.product_family LIKE ?
                 OR a_compl_summary.product_family LIKE ?
                 OR a_compl_summary.product_family LIKE ?
                 OR a_compl_summary.product_family LIKE ?
                 OR a_compl_summary.product_family LIKE ?
            AND (a_compl_summary.region = ?)
            AND (   a_compl_summary.NAME = ?
                 OR a_compl_summary.NAME = ?
                 OR a_compl_summary.NAME = ?
                 OR a_compl_summary.NAME = ?
                 OR a_compl_summary.NAME = ?
            AND (a_compl_summary.complaint = ?)
            AND (   rp_qa_reported_device_codes.reported_dev_clarification LIKE
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
            AND (rp_qa_reported_device_codes.reported_dev_clarification NOT LIKE
               ))

  • I cannot debug with SQL server 2008 SSMS asks for Firewall permission?

    hi friends,
    I run SQL server 2008 R2 developer edition on windows 8 basic edition. SQL server is installed in my local machine. when I tried to debug a sql script it asked the firewall permission as show on image
    when googled I found this
    Article from MSDN with fix tool but it cannot installed on my Windows 8 OS, is there way to fix it without giving any unauthorized access to my system?
    thanks
    I use Visual studio 2012 Ultimate and SQL server 2008 developer edition!

    Hi,
    The hotfix you provide applies for Windows Server 2008.
    The windows firewall on this machine is currently blocking remote debugging.
    According the message, the following ports need to be enabled for remote debugging. Use the procedure that is described in the section
    Configuring a Port in Windows Firewall to enable the following ports through Windows Firewall:
    Ports
    Protocol
    135
    TCP
    Required
    500, 4500
    UDP
    Required if your domain policy requires   network communication to be performed through IPSec.
    See the below article for more information:
    How to: Enable Transact-SQL Debugging
    http://msdn.microsoft.com/en-us/library/vstudio/s0fk6z6e(v=vs.100).aspx
    Thanks.
    Tracy Cai
    TechNet Community Support

Maybe you are looking for

  • Reminders list frequently disappear,how can i get back my list whenever it suddently disapear?:(

    reminders list frequently disappear,how can i get back my list whenever it suddently disapear?:( I rely deeply on my reminders list, but a few times, the list just disappear and I have to rewrite my lists, but it is getting more and more annoying bec

  • Ical birthday calendar wrong dates

    Hello, I have an issue with iCal regarding the birthday calendar. It works pretty fine syncing with address book, but it ads the birthday obviously twice. The birthday itself and the day before the birthday. When refering the URL in iCal it directs m

  • Error in external tax system: SAX processing failed on input stream SAX pro

    Hi When I was posted in T.Code: FB70,  (Customer Invoice) I am getting below mentioned error. Error in external tax system: SAX processing failed on input stream SAX processi. I put tick mark on calculate Tax column and select O1(A/R Sales Taxable).

  • Dynamic configuration not working in Java mapping

    Hi All, I have a scenario where i  am using java mapping. In this i am doing following 1)Read file name from input message header 2)set file name in output message Header 3) set Directory name in output message Header i  have used following code .. b

  • Bridge CS3 not displaying images all of sudden

    So I use Bridge as my image browser and then open images in PS3 for editing. So today, folders full of photos that I have been working on no longer display in Bridge. It gives an accurate items count in the lower right hand corner, and most folders o