Debugging PL/SQL with parameters

Hi,
I can successfully debug a PL/SQL procedure that takes no parameters. However when I choose a procedure that takes parameters and choose "Debug", as soon as the dialog that builds the PL/SQL block that calls my procedure opens, it displays "An error was encountered performing the requested action"
Any ideas as to what I'm doing wrong

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

Similar Messages

  • [1.1.2.25.79] Program hangs after starting long runnin SQL with parameters

    Hello Forum,
    I'm currently tuning some SQLs with parameters that run some minutes. When I enter the SQL in the worksheet and press F9, SQL Developer asks for the parameters. But after clicking "Apply" (or whatever it is called in the english version, I'm using german ;-)
    I get the elapsed time of 0.018 seconds displayed and the whole program hangs until the SQL is completed. The elapsed time is not updated so I don't get the real elapsed time.
    I run SQL Developer against an Oracle 9.2 Database on Win2k. The client runs WinXP.
    I hope this is not a double post but searching the forum for "parameters" gave too many hits to check. ;-)
    Regards,
    dhalek

    Sqldev hangs when issuing an action that requires the previous action to be completed first.
    Sqldev could open a new connection for this, or at least display a message telling the action isn't possible until the previous one completes, instead of just hanging. Vote for the requests for this on the SQL Developer Exchange if you want this getting addressed sooner.
    Thanks,
    K.

  • Error at debug PL/SQL with object types

    Hi, can someone help me.
    My context is:
    Database: Oracle 9.2.0.5.
    O.S. Solaris 9
    SQL Developer: 1.2.1 build 3213
    I am trying to debug a package and I am getting this error:
    Connecting to the database ADMINEW_SERVICIOS.
    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( '10.70.10.69', '3673' )
    Debugger accepted connection from database on port 3673.
    Processing 56 classes that have already been prepared...
    Finished processing prepared classes.
    ORA-00600: internal error code, arguments: [15419], [severe error during PL/SQL execution], [], [], [], [], [], []
    ORA-06544: PL/SQL: internal error, arguments: [2603], [], [], [], [], [], [], []
    ORA-06553: PLS-707: unsupported construct or internal error [2603]
    Process exited.
    Disconnecting from the database ADMINEW_SERVICIOS.
    Debugger disconnected from database.
    When I call the debugger the parameters were:
    DECLARE
    P_SERIE VARCHAR2(200);
    P_SUSI NUMBER;
    P_EMPSUSI NUMBER;
    P_TX NUMBER;
    P_TIPO VARCHAR2(200);
    P_GRUPO NUMBER;
    P_CARGA SERVICIOS.TP_CONT;
    P_SERVICIOS SERVICIOS.TP_SERVICIOS;
    P_NUM NUMBER;
    v_Return VARCHAR2(200);
    BEGIN
    P_SERIE := 'M7';
    P_SUSI := 305;
    P_EMPSUSI := 1;
    P_TX := 153;
    P_TIPO := 'UNIFICADO';
    P_GRUPO := 48;
    -- Modify the code to initialize the variable
    P_CARGA := TP_CONT('M7', '4049', 'LLENO', '20', '15', '1500');
    -- Modify the code to initialize the variable
    P_SERVICIOS := TP_SERVICIOS(
    TP_SERVICIO('PAQUETE', 'SUSI', 'CREDITO', 'NACIONAL', NULL, '13423', '1', '89', '48', 'SI')
    P_NUM := 1;
    v_Return := PKG_TOOLS_SERVICIO_WEB.FN_ACTUALIZA_SUSI(
    P_SERIE => P_SERIE,
    P_SUSI => P_SUSI,
    P_EMPSUSI => P_EMPSUSI,
    P_TX => P_TX,
    P_TIPO => P_TIPO,
    P_GRUPO => P_GRUPO,
    P_CARGA => P_CARGA,
    P_SERVICIOS => P_SERVICIOS,
    P_NUM => P_NUM
    DBMS_OUTPUT.PUT_LINE('v_Return = ' || v_Return);
    END;
    The type definition is:
    create or replace TYPE TP_SERVICIOS AS
    VARRAY(20) OF TP_SERVICIO;
    create or replace
    TYPE TP_SERVICIO AS OBJECT(
    /* TODO enter attribute and method declarations here */
    TIPOSERV VARCHAR2(20),
    TIPOFACT VARCHAR2(15),
    FORMAPAGO VARCHAR2(10),
    MONEDA VARCHAR2(10),
    REFERENCIA VARCHAR2(15),
    CLIENTE VARCHAR2(6),
    EMPRESA VARCHAR2(2),
    ZSECLAVE VARCHAR2(5),
    GSRCLAVE VARCHAR2(3),
    CODIFICA VARCHAR2(2),
    MEMBER FUNCTION GET_TIPOSERV RETURN VARCHAR2,
    MEMBER FUNCTION GET_TIPOFACT RETURN VARCHAR2,
    MEMBER FUNCTION GET_FORMAPAGO RETURN VARCHAR2,
    MEMBER FUNCTION GET_MONEDA RETURN VARCHAR2,
    MEMBER FUNCTION GET_REFERENCIA RETURN VARCHAR2,
    MEMBER FUNCTION GET_CLIENTE RETURN VARCHAR2,
    MEMBER FUNCTION GET_EMPRESA RETURN VARCHAR2,
    MEMBER FUNCTION GET_ZSECLAVE RETURN VARCHAR2,
    MEMBER FUNCTION GET_GSRCLAVE RETURN VARCHAR2,
    MEMBER FUNCTION GET_CODIFICA RETURN VARCHAR2
    create or replace TYPE TP_CONT AS
    OBJECT(
    /* TODO enter attribute and method declarations here */
    SERIE VARCHAR2(2),
    CLAVE VARCHAR2(10),
    ESTADO VARCHAR2(5),
    DIM VARCHAR2(2),
    CANT VARCHAR2(8),
    PESO VARCHAR2(12)
    );

    This doesnt look good. You've got an ora600 in your trace which means your database has become unstable somehow. You really need to talk with the db support folks to figure out what the problem is.
    Barry

  • Debugging PL/SQL with [User] Types

    I am using SQL Developer 1.2.0 against Oracle 10.2.0.3.0 running on Linux. I run SQL Developer on the database server through Xterm 32 on my windows PC (too many firewalls, closed ports and a locked up db server).
    I have several Types that I use in my stored procedures. I have compiled all the Types for debug, but I still get "Opaque" for some of them in the Data tab when debugging.
    variables of this Type:
    create or replace TYPE "NUM_LIST" as table of number;
    with variable defined as:
    LineList NUM_LIST := NUM_LIST();
    I can expand the nested table variable and see each [element] and its key and value
    variables of this Type:
    create or replace type SUB_LIST as table of SUB_REC;
    with:
    create or replace type SUB_REC as object(
    STATION varchar2(5),
    FIND varchar2(10),
    REPLACE varchar2(10));
    and variable defined as:
    AllSubList SUB_LIST := SUB_LIST(NewSubRec);
    where:
    NewSubRec SUB_REC := SUB_REC('', '', '');
    I can expand the nested table variable and see each [element] and its key, but the value is OPAQUE.
    I've tried compiling for debug the objects before the tables and the tables before the objects.
    The workaround of looping through the table (array) and putting the values in a varchar to see the data is annoying at best.
    Any ideas??
    Thanks

    Oops. Am I ever embarrassed. - I just thought I had compiled all the Types but I hadn't because of the dependencies the RECs had with the LISTs.
    Sorry...
    Jean

  • Error in remote debugging pl/sql with JDeveloper 10.1.3

    I'm doing remote debugging of some of my pl/sql packages with JDeveloper and I get the following error:
    DECLARE
    ERROR at line 1:
    ORA-00600: internal error code, arguments: [15419], [severe error during PL/SQL
    execution], [], [], [], [], [], []
    ORA-06544: PL/SQL: internal error, arguments: [2603], [], [], [], [], [], [],
    ORA-06553: PLS-707: unsupported construct or internal error [2603]
    When I run this code without the debugger, everything works fine.
    Any idea how to solve this problem?
    Thanks and kind regards
    Uwe

    Hi Lee,
    thanks for your reply.
    My java_pool_size is 32M, and I found out that this seems to be sufficient (means, the pl/sql internal error does not show up) as long as some of my pl/sql packages are not compiled in DEBUG mode.
    The pl/sql package I'm debugging are owned by user A and it calls procedures of a pl/sql package that is owned by a different user B. Calling B's procedures from within A causes the error, if the packages of B are compiled in DEBUG mode. If they are compiled ordinary, debugging A's packages works fine, even with the small java_pool_size.
    During the checks I repeately increased java_pool_size up to 256M, but the problem was persisting, as long as B's packages were compiled DEBUG.
    As I get the whole picture only if A's and B's packages are debugged together, I like to ask for further help.
    Thanks and Kind Regards
    Uwe

  • Query sql with parameters

    Hi. I create a ViewObject with the query
    SELECT Tblagenda.idagenda,
    Tblagenda.data_agenda,
    Tblagenda.dono
    FROM TBLAGENDA Tblagenda
    WHERE Tblagenda.idagenda = ?
    Please, how to setup the query parameter in runtime? Somebody could show me a example or tutorial?
    I´m using MySQL.
    Thanks

    Hi,
    this is what we have developer guides for. Please have a look at bind parameter usage in
    http://download-uk.oracle.com/docs/html/B25947_01/toc.htm
    Frank

  • Debugging PL/SQL with VS 2005

    I just saw this awesome article:
    http://www.oracle.com/technology/obe/odt/debugging/debugging.htm?msgid=5375573
    I strongly recommend that everyone read this - this is sweet!

    Hi,
    Just out of curiousity, do people find this format (i.e. "article" format) preferable to the "viewlet" format?
    Thanks,
    Mark

  • Unable to debug procedure with parameters

    I have created following dummy procedure to reproduce my problem
    create or replace
    procedure dummy_proc (p_no number, p_name varchar2)
    is
    v_date date;
    begin
    select sysdate into v_date from dual;
    end;
    I am following these steps for debugging
    1. Open procedure in edit mode
    2. Compile it for debug with an icon “compile for debug”
    3. Add breakpoint on select.
    4. Click on lady bug icon to start debugging.
    5. Parameter window pop-up with following pop-up error message i.e.
    An error was encountered performing the requested operation:
    Fail to convert to internal representation
    Vendor code *17059*
    What I understand about problem is:
    It is related to data type conversion of parameters. When Oracle SQL Developer tries to create anonymous PL/SQL block for debugging any procedure with parameters it does not able to translate parameters data types properly. I have checked Tool--> Preferences -- > Debugger but did not find any help. Any one who could able to solve this issue?

    Dear K,
    What I understand from your reply is. This is not Oracle SQL Developer issue is this issue with Oracle configuration?
    Tell me would you able to debug procedures with parameters? Parameter window would successfully generate anonymous pl/sql block with correct data type translation?
    I have noticed one more thing kindly see this might give you any clue to solve my issue.
    DECLARE
    v_Return UNKOWN TYPE;
    BEGIN
    v_Return := db_dummy_pkg.set_dummy_date();
    -- Modify the code to output the variable
    -- DBMS_OUTPUT.PUT_LINE('v_Return = ' || v_Return);
    END;
    This PL/SQL block is generated by OSD for a procedure, not function, without parameters. I have to edit it like following to move on with debugging.
    BEGIN
    db_dummy_pkg.set_dummy_date();
    END;
    It means Oracle SQL Developer might not configure to understand data types like number, varchar2 in debugging mode only. Kindly see above bold text
    kind regards,
    Vitality

  • 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

  • T-sql 2008 r2 place results from calling a stored procedure with parameters into a temp table

    I would like to know if the following sql can be used to obtain specific columns from calling a stored procedure with parameters:
    /* Create TempTable */
    CREATE TABLE #tempTable
    (MyDate SMALLDATETIME,
    IntValue INT)
    GO
    /* Run SP and Insert Value in TempTable */
    INSERT INTO #tempTable
    (MyDate,
    IntValue)
    EXEC TestSP @parm1, @parm2
    If the above does not work or there is a better way to accomplish this goal, please let me know how to change the sql?

    declare @result varchar(100), @dSQL nvarchar(MAX)
    set @dSQL = 'exec @res = TestSP '''+@parm1+''','' '''+@parm2+' '' '
    print @dSQL
      EXECUTE sp_executesql @dSQL, N'@res varchar(100) OUTPUT', @res = @result OUTPUT
    select @result
    A complicated way of saying
    EXEC @ret = TestSP @parm1, @parm2
    SELECT @ret
    And not only compliacated, it introduces a window for SQL injection.
    Erland Sommarskog, SQL Server MVP, [email protected]

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

  • Calling stored procedures with parameters with the Database Connectivi​ty Toolkit

    Hi all,
    I am new to the forum and am having difficulty finding a solution to a particular problem I am having regarding using the LabVIEW Database Connectivity Toolkit on a project I am currently working on at my job.  I have a database in which I have tables and stored procedures with parameters.  Some of these stored procedures have input, output, and return parameters.
    I have been trying to follow this example but to no avail:  http://digital.ni.com/public.nsf/allkb/07FD1307460​83E0686257300006326C4?OpenDocument
    One such stored procedure I am working on implementing is named "dbo.getAllowablePNs", which executes "SELECT * from DeviceType" (DeviceType is the table).  In this case, it does not require an input parameter, it has an output parameter that generates the table [cluster], and has a return parameter which returns an integer value (execution status code) to show if an error occurred.  The DeviceType table has 3 columns; ID (PK, int, not null), PN (nvarchar(15), null), and NumMACAddresses (int, null).  I have gone over many examples and have talking to NI support to try to implement this and similar stored procedures in LabVIEW but have not been successful.  I am able to connect to the database with the Open Connection VI without error, but am running into some confusion following this step.  I am then trying to use the Create Parameterized Query VI to call the stored procedure and set the parameters.  I assume I would then use the Set Parameter Value VI for each parameter that is wired into the parameters input on the previous Parameterized Query VI?  I am also having some confusion during and following these steps as well.  I would greatly appreciate any advice or suggestions anyone might have in regards to this situation as I am not a SQL expert.  Also, I would be happy to provide any more information that would be helpful.
    Regards,
    Jon
    Solved!
    Go to Solution.

    Also, I don't know if this would be helpful but here is the actual stored procedure in SQL:
    CREATEPROCEDURE [dbo].[getLastSequenceNumber]
    @p1 nvarchar(10)='WO-00000'
    AS
    BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SETNOCOUNTON;
    -- Insert statements for procedure here
    selectmax(SequenceNumber)from Devices where WorkOrderNumber= @p1
    END
    GO

  • Calling Stored procedure with Parameters in PowerPivot DataModel

    Hi All,
    I wanted to call a SQL stored procedure from PowerPivot(Excel) on based on changing slicer's value. 
    Currently, we can call stored procedure wihtout any parameter from Data Model tab using 
    Exec stored_proc_name in Table Properties window.
    What if I want to call the same procedure with a parameter whouse value will come by changing slicer's value. I  meant, changing slicer value will act as a parameter to that stored procedure & it should return updated results. 
    Is this possible in PowerPivot?

    Hi Rameshwar,
    According to your description, you call a SQL Server stored procedure in PowerPivot data model, now the problem is that you need to pass a parameter to the stored procedure, right?
    Based on my research, it seems that we cannot achieve this requirement directly in current version of PowerPivot data model. Here is a similar thread for you reference.
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/5350228d-bc62-4a3b-a1a6-e847483e2858/powerpivot-for-excel-2013-call-execute-stored-procedure-with-parameters?forum=sqlkjpowerpivotforexcel
    If you have any concern about this behavior, you can submit a feedback at
    http://connect.microsoft.com/SQLServer/Feedback and hope it is resolved in the next release of service pack or product. Your feedback enables Microsoft to make software and services the best that they can be, Microsoft might consider to add this feature
    in the following release after official confirmation.
    Regards,
    Charlie Liao
    TechNet Community Support

  • How to create a view with parameters; read the documentation but nothing!

    Hello!
    I'm new to the Oracle world but together with my coworkers we need to very quickly study Oracle to figure out whether we'll add Oracle to our list of supported databases or not.
    Question: How do I create a view with parameters?
    I've read the documentation but I could not find this! I found the sql syntax to create a view but no parameters whatsoever...
    I have found on the web some very complicated way of doing this, but doesn't Oracle support Views with parameters?
    The goal here is to return a recordset, don't forget, so,please don't speak about stored procedures unless you are going to tell me how to get a recordset out of a stored procedure! ;)
    Thanks for all your help and attention!
    Jorge C.

    You can set up a parameterized view via context as follows:
    1. Set up a procedure to set your context values:
    create or replace procedure p_set_context (p_context IN VARCHAR2,p_param_name IN VARCHAR2,p_value IN VARCHAR2)
    as
    BEGIN
    sys.dbms_session.set_context(p_context,p_param_name,p_value);
    END;
    2. Create your context using the procedure you just created
    create or replace context my_ctx using p_set_context
    3. This is the test table I'll use
    create table my_table(col1 number)
    and populate it:
    begin
    for v_index in 1..10
    loop
    insert into my_table values(v_index);
    end loop;
    end;
    and the view that will be parameterised
    create or replace view v_my_table as select col1 from my_table where col1 between sys_context('my_ctx','start_range') and sys_context('my_ctx','end_range')
    4. Now set the parameters using the procedure above.
    begin
    p_set_context('my_ctx','start_range','1');
    p_set_context('my_ctx','end_range','5');
    end;
    5. Selecting from my_table will give you 1 to 10 (no surprise there :-) )
    selectng from v_my_table will give you 1 to 5
    You can use the context to set formats etc using the same principle. A common gotcha to watch for is trying to set the context directly using DBMS_SESSION.SET_CONTEXT instead of creating a procedure. This belongs to SYS and SYS won't have the privileges to set your context so you get an insufficient privileges result leading to much headscratching and unnecessary grants (at least that's my understanding of it).
    Sorry Jorge, as you're new to Oracle I should also have pointed out for completeness sake, that you can change the parameters at any time through recalling the p_set_context, for example, following on from above, after your "select * from v_my_table" and seeing 1 to 5, you could then do
    begin
    p_set_context('my_ctx','start_range','3');
    end;
    and when you requery 'Select * from v_my_table' you will now see rows 3 to 5.
    Bit of a simplistic example, but you can see how easy it is. :-)
    Message was edited by:
    ian512

  • Compile PL/SQL with JDEV 11g TP4 - Compile button missing ?

    Hi
    I have been working through the database development with Jdeveloper tutorial:
    http://www.oracle.com/technology/obe/obe11jdev/11/db_dev/obe_%20databasedevmt.htm
    this, as name suggests, discusses db development with jdev 11g TP4.
    However I seem to have an issue with the section named 'Creating and Debugging PL/SQL Objects in the Database'.
    In section 9 of 'creating a pl/sql package' the tutorial talks about a compile for debug button on the code editor. This essentially compiles the package against the DB, however in my Jdev, this button is does not exist. Is this just because this is only a tech preview version or is there some further config I need to do?
    Versions are..
    OS: Vista SP1
    JDEV: 11.1.1.0.0
    DB: 10.2.0.1.0
    Thanks in advance
    Will

    hi Will
    Maybe this is a beter forum for your question:
    "JDeveloper and OC4J 11g Technology Preview"
    JDeveloper and OC4J 11g Technology Preview
    success
    Jan Vervecken

Maybe you are looking for

  • I cannot install itunes. The error message telss me I need a CD

    I am unable to install itunes 10.5.  I am asked for the CD to provide a needed file.  I cannot uninstall the prior version of itunes. 

  • Formatted my new iPod Nano 4Gb and my application can't find the Device ID

    Hi, Just bought a new Nano 4Gb, updated it to 2006-06-28 (1.2) and of course it couldn't be recognized by Windows after that. Followed the instruction and formatted the Nano and made a Restore, worked fine! Now to my problem, when using my applicatio

  • Email of Purchase Order coming with Standard Form

    Hi, I have configured NACE. I am able to generate the PO through email. But, the problem is, system always picking of standard form instead of "customized form", (though I have configured customized form for emailing). Whereas, in case of printing, t

  • XML import/export in inDesign

    Hello, I am new to inDesign so please bear with me if I am asking something basic. I have been searching for an answer on Google, but could not find it. Here's what I am trying to do: We have a lot of existing inDesign files in our company. Our inten

  • XI pre-prd (distributed system) is very slow

    Hi, Our XI pre-prd which is on distributed configuration is very very slow. CI host is having 8 GB RAM, db host is having 6 GB RAM. When we look at SM50, all the dialog proceses gets occupied by PIAPPLUSER user even though we run a single interface.