Cannot access stored procedure parameters

Hello

We are at the point where you try to use a stored procedure from our Java through Toplink code but we seem to have a problem here I couldn't find an answer to. Maybe it's that my Google-Fu is miss you in this case.

Our problem is thto so that the procedure seems to be cited correctly, we get nothing to Java code. The procedure in question has been tested with the same input parameters of SQLDeveloper and the procedure returns values as it should.

The procedure signature is

create or replace PACKAGE FORM_METADATA AS

PROCEDURE FORM_LIST_GET)

P_USER_ID IN VARCHAR2,

P_CHANNEL_NO NUMBER,

P_START_FROM in NUMBERS, paging

P_COUNT_TO_RETURN in NUMBERS, paging

P_GET_TOTAL_COUNT in NUMBER, - if number must total be returned then 1, other wise 0

P_RESULT_SET ON SYS_REFCURSOR,

P_TOTAL_COUNT CERTAIN NUMBER);

end FORM_METADATA;


Java code invoking this procedure looks like this:

County of BigDecimal = new BigDecimal(-1);

A session = getSession().

session.setLog (new OutputStreamWriter (System.out));

session.setLogLevel (SessionLog.FINEST);

StoredProcedureCall procedureCall = new StoredProcedureCall();

procedureCall.setProcedureName "(FORM_METADATA. FORM_LIST_GET");

procedureCall.addNamedArgumentValue ("P_USER_ID", "name of user-1");

procedureCall.addNamedArgumentValue ("P_CHANNEL_NO", new BigDecimal (1));

procedureCall.addNamedArgumentValue ("P_START_FROM", new BigDecimal (1));

procedureCall.addNamedArgumentValue ("P_COUNT_TO_RETURN", new BigDecimal (1000));

procedureCall.addNamedArgumentValue ("P_GET_TOTAL_COUNT", new BigDecimal (1));

procedureCall.useNamedCursorOutputAsResultSet ("P_RESULT_SET");

procedureCall.addNamedOutputArgument ("P_TOTAL_COUNT", "count", BigDecimal.class);

DataReadQuery dq = new DataReadQuery();

dq.setCall (procedureCall);

dq.prepareForExecution ();

Object result = session.executeQuery (dq);

System.out.println ("result:" + result);

System.out.println ("result from StoredProcedreCall:" + procedureCall.getResult ());

The output we get looks like this:

[Warning TopLink]: 2015.08.31 16:11:30.781 - failed to get InitialContext for saving of MBean: javax.naming.NoInitialContextException: need to specify the class name in the environment or property of the system, as a cmdlet parameter or in a file of application resources: java.naming.factory.initial

[Warning TopLink]: 2015.08.31 16:11:30.797 - failed to get InitialContext for saving of MBean: javax.naming.NoInitialContextException: need to specify the class name in the environment or property of the system, as a cmdlet parameter or in a file of application resources: java.naming.factory.initial

[TopLink info]: 2015.08.31 16:11:31.685 - DatabaseSessionImpl (1827000661) - TopLink, version: Oracle TopLink - 11 g Release 1 (11.1.1.5.0) (Build 110305)

[TopLink info]: 2015.08.31 16:11:34.147 - DatabaseSessionImpl (1827000661) - dev connection successful

[TopLink Finest]: 2015.08.31 16:11:34.147 - DatabaseSessionImpl (1827000661) - wire (wire [main, 5, main])-Execute query DataReadQuery()

[TopLink Finest]: 2015.08.31 16:11:34.163 - DatabaseSessionImpl (1827000661) - wire (wire [main, 5, main])-re-connect to the external connection pool

[TopLink fine]: 2015.08.31 16:11:34.227 - DatabaseSessionImpl (1827000661) - connection (1635575430) - wire (wire [main, 5, main])-START FORM_METADATA. FORM_LIST_GET (P_USER_ID = >?, P_CHANNEL_NO = >?, P_START_FROM = >?, P_COUNT_TO_RETURN = >?, P_GET_TOTAL_COUNT = >?, P_RESULT_SET = >?, P_TOTAL_COUNT = >?); END;

link = > [name of user-1, 1, 1, 1000, 1, = > P_RESULT_SET = > P_TOTAL_COUNT]

[Result:]

Result of the StoredProcedreCall: null

Process has finished with exit code 0.


I'm pretty sure that our problem is with Java code invoking the procedure, but as I said, we were not able to find the right solution yet. Anyone have a pointer as to where we should begin to look for next?

Thank you in advance,

Mika Leino

One of my colleagues managed to find the reason why the procedure does not seem to return anything. For brevity, I've redacted a couple of settings that we were not used to this forum and we do not believe the reason for the perceived behavior. However, as well as the required parameters these have the value NULL. My colleague seems to try initialize parameters without value and after that the query returned a set of data that was expected.

Our change of code (in Java) was therefore to spend

procedureCall.addNamedArgumentValue("P_ORDER_BY", OracleTypes.NULL);

TO

procedureCall.addNamedArgument("P_ORDER_BY");

Now we're getting data from the cursor, as expected, but the second parameter value still eludes us.

Tags: Fusion Middleware

Similar Questions

  • Get the EXIT and the RETURN of a stored procedure parameters

    I have a stored procedure (SQL Server 2008 R2 MS) as in the following example.

    Thanks to the connectivity of database I get OUTPUT parameters, but I can't get the game DATA RECORDS and RETURN value.

    Someone knows how to do this?

    CREATE PROCEDURE [dbo]. [TS_Teste] (@T057_S_NOMEMAQUINA VARCHAR (20), @STATUS INT OUTPUT, OUTPUT OF NVARCHAR (500) OF @ERRO)

    AS

    BEGIN
    DECLARE THE TABLE @TABLE (CODE INT, DESCRIPTION VARCHAR (30))

    INSERT VALUES INTO @TABLE (51, 'A')
    INSERT VALUES INTO @TABLE (52, 'B')

    INSERT VALUES INTO @TABLE (53, 'C')

    SELECT * FROM @TABLE

    SET @STATUS = 1

    SET @ERRO = "Nenhum erro!

    RETURN 0

    END

    I finally found what was wrong... He had a line in the stored procedure only aditional. It should be like this:

    CREATE PROCEDURE [dbo]. [TS_Teste] (@T057_S_NOMEMAQUINA VARCHAR (20), @STATUS INT OUTPUT, OUTPUT OF NVARCHAR (500) OF @ERRO)

    AS

    BEGIN
    SET NOCOUNT ON;                                                                                               -NEW LINE!

    DECLARE THE TABLE @TABLE (CODE INT, DESCRIPTION VARCHAR (30))

    INSERT VALUES INTO @TABLE (51, 'A')
    INSERT VALUES INTO @TABLE (52, 'B')

    INSERT VALUES INTO @TABLE (53, 'C')

    SELECT * FROM @TABLE

    SET @STATUS = 1

    SET @ERRO = "Nenhum erro!

    RETURN 0

    END

  • How to use the nocopy with java stored procedures parameters

    
    --------------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE    11.2.0.3.0      Production
    TNS for Linux: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    
    

    I'm a PL/SQL programmer, but not a Java programmer. I have the following java function that does what it's supposed to add a pdf at the end of another pdf document:

    import oracle.sql.BLOB;
    import org.apache.pdfbox.util.PDFMergerUtility;
    import oracle.jdbc.OracleConnection;
    import oracle.jdbc.driver.OracleDriver;
    import java.io.OutputStream;
    
    public class PDFUtilities {
    public static BLOB appendPDF(BLOB pdfdoc1, BLOB pdfdoc2) throws Exception {
           
            //create a connection object to the current instance
              OracleConnection conn = (OracleConnection)new OracleDriver().defaultConnection();
            //create the output blob using the connection
              BLOB outPDF = BLOB.createTemporary(conn, true ,BLOB.DURATION_SESSION);
            //create an output stream to the output blob
              OutputStream os = outPDF.setBinaryStream(0);               
            //instantiate the pdf merger utility
              PDFMergerUtility mergerUtility = new PDFMergerUtility();       
            //connect the merger to the output stream
              mergerUtility.setDestinationStream(os);
            //stream from each input blob into the merger utility
              mergerUtility.addSource(pdfdoc1.getBinaryStream());
              mergerUtility.addSource(pdfdoc2.getBinaryStream());
            //merge the 2 input pdfs
              mergerUtility.mergeDocuments();             
            //do not close the output stream
            //return the blob
            return outPDF;
        }
    
    }
    

    CREATE OR REPLACE package PDFTOOLS.pkg_pdf_utilities
    as
    function f_get_merged_pdf (
              pi_pdf1       blob
            , pi_pdf2    blob
      )
      return blob;
    end pkg_pdf_utilities;
    /
    
    CREATE OR REPLACE package body PDFTOOLS.pkg_pdf_utilities
    as
    function f_get_merged_pdf (
              pi_pdf1       blob
            , pi_pdf2    blob
      )
      return blob
      as language java name 
      'com.mycode.pdftools.PDFUtilities.appendPDF(oracle.sql.BLOB, oracle.sql.BLOB) return oracle.sql.BLOB';
    end PDFTOOLS.pkg_pdf_utilities;
    /
    

    It's very basic, but doesn't seem to work. However, I want to my function from PL/SQL to a procedure that looks like this:

    CREATE OR REPLACE package PDFTOOLS.pkg_pdf_utilities
    as
    procedure sp_append_pdf (
              pio_pdf2append2   IN OUT NOCOPY blob
            , pio_pdf2append   IN OUT NOCOPY blob
      )
    end pkg_pdf_utilities;
    /
    

    What is important, what I'm trying to do is to NOCOPY the BLOBs. Otherwise, I have to read my PDF files into 2 BLOBs and create a 3rd blob as output. I prefer to be able to keep the pio_pdf2append2 as the final output. What I actually do call thing in a loop to gradually add a PDF file to a big. I'm not linking this in one operation because of concerns over the use of the system and because the pdfbox library java has would have been question after 850 in PDF format, which is not completely unrealistic in my approach.

    How could I achieve this?

    Post edited by: Pollocks01 only formatted code blocks because atlassian {code} tags didn't work.

    Passage of an argument as input/OUTPUT requires the mapping to a Java array.

    Simplified example that adds one FOR the other:

    create or replace and compile java source named blob_appender_src as
    import oracle.sql.BLOB;
    import java.sql.SQLException;
    import java.io.OutputStream;
    import java.io.InputStream;
    import java.io.IOException;
    
    public class BLOBAppender {
        public static void run (BLOB[] p1, BLOB p2) throws SQLException, IOException { 
    
            InputStream is = p2.getBinaryStream();
            OutputStream os = p1[0].setBinaryStream(p1[0].length()+1);                
    
            byte[] buffer = new byte[1024];
            int len;
            while ((len = is.read(buffer)) != -1) {
                os.write(buffer, 0, len);
            }
            os.close();
            is.close();
        }
    }
    
    create or replace procedure blob_append (
      p_lob1  in out nocopy blob
    , p_lob2  in            blob
    )
    as language java name 'BLOBAppender.run(oracle.sql.BLOB[], oracle.sql.BLOB)' ;
    /
    
    SQL> declare
      2    p_lob1  blob := utl_raw.cast_to_raw('ABC');
      3    p_lob2  blob := utl_raw.cast_to_raw('DEF');
      4  begin
      5    blob_append(p_lob1, p_lob2);
      6    dbms_output.put_line(utl_raw.cast_to_varchar2(p_lob1));
      7  end;
      8  /
    
    ABCDEF
    
    PL/SQL procedure successfully completed.
    
  • SQL stored procedure input and output parameters

    Hello Gang,

    My dead end trying to call a stored procedure in SQL Server 2008 with the LV database tool.

    for purposes of experimentation, I've created a small procedure with an input parameter that returns an integer as return value.  It works describing a query, but all attempts at LV produce an error-2147217900 when executing query VI.  I did find examples of that.

    Sending a bunch of parameters to a stored procedure and checking the value of return seems to be pretty common stuff.

    I'll appreciate any help.

    Thank you

    Roger

    Hi Roger,

    There are a few prerequisites which I will list below. If you have not checked these things, so don't hesitate, as your hiccups can be there.

    Prerequisites:

    1. Ensure that you can read from a table in the database to verify that you can access the database (user permissions) and ensure that your login details are correct. Among other things, make sure that the. DSN switches to the correct database. (See the simple example below, SQL Select.vi)
    2. Make sure that your user (if you use SQL authentication) has permissions to run the STORED procedure by running the procedure in SQL Server Management Studio (you seem to have already done this)

    Example by calling a procedure without parameters (attached as SPROC_No_Parameters.vi):

    Example by calling a procedure with parameters (attached as SPROC_Parameters.vi):

    An article on the execution of stored procedures is here:

    http://digital.NI.com/public.nsf/allkb/07FD130746083E0686257300006326C4

    Don't forget to download the example VI since it includes the cases where you want an output parameter of the procedure rather than a table.

    I tested these against two very simple SPROCs and it worked fine (on SQL Server 2005, but 2008 should be the same).  Stored procedures have been:

    CREATE PROCEDURE [dbo]. [GetContacts]

    AS
    BEGIN
    -SET NOCOUNT ON added to avoid additional results sets from
    -interfering with SELECT statements.
    SET NOCOUNT ON;

    -Controls insert for procedure here
    SELECT * FROM Contacts
    END

    and

    CREATE PROCEDURE [dbo]. [MultiplyAges]
    @param1 INT = 1
    AS
    BEGIN
    -SET NOCOUNT ON added to avoid additional results sets from
    -interfering with SELECT statements.
    SET NOCOUNT ON;

    -Controls insert for procedure here
    SELECT (age * @param1) OF Contacts
    END

    I would like to know if these examples work for you or if you have any other questions.  Don't forget to go through this KB article and articles related to it, they should cover other situations.

    Matt

  • Calling stored procedures with parameters with the database connectivity Toolkit

    Hi all

    I'm new to the forum and struggling to find a solution to a particular problem I have in this respect, using the LabVIEW Database Connectivity Toolkit on a project, I am currently working on my work.  I have a database in which I tables and stored procedures with parameters.  Some of these stored procedures have input, output and return parameters.

    I tried to follow this example, but to no avail: http://digital.ni.com/public.nsf/allkb/07FD130746083E0686257300006326C4?OpenDocument

    Such a stored procedure I am working on the implementation is named "dbo.getAllowablePNs", running "SELECT * from DeviceType" (DeviceType is the table).  In this case, it requires no input parameter, it has an output parameter that generates the table [cluster] and has a return parameter that returns an integer value (status code for execution) 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 surpassed many examples and I talk to the support OR try to implement this and similar procedures stored in LabVIEW but have not been successful.  I am able to connect to the database with the VI of open connection without error, but spin in some confusion as a result of this step.  I then try to use the VI of parameter query create to call the stored procedure and set the parameters.  I guess I would then use the Set parameter value for each parameter that is connected to the entry of parameters on the previous query with parameters VI VI?  I am also having some confusion during and after these steps as well.  I would greatly appreciate advice or suggestions that anyone could have in this situation because I am not a SQL expert.  Also, I would be happy to provide more information that might be useful.

    Kind regards

    Jon

    Here's what I use to do this.  I think I had to change him create parameterized query VI for him to work.  There is a post on the forum about this somewhere.

  • Error when you try to play audio files: Windows Media Player cannot access the file. The file may be in use, you won't have access to the computer where the file is stored

    Windows Media Player cannot access the file. The file may be in use, you won't have access to the computer on which the file is stored, or your proxy settings are may not be incorrect.

    I hope someone can help on Win 7 64 bit, music is taken on a disk usb2 external hard... I had no problem until today when the message in the title appeared next to each track, with a little red cross.

    I already deleted database library as suggested by some of the forums, also disabled the media as a feature of Win 7, rebooted and then re-enabled it.  I also disconnected externally and restarted that as well, I'm also the same mistake with a cd in the cd drive as well.

    Can anyone help?

    Hello

    This error may occur for one of the following reasons:
    The file is currently in use. Close the file and then try again.

    You are not allowed to access the location where the file is stored.

    Follow these steps to grant all permissions in the folder where the files are stored:
    1. right click on the folder on the external drive and click Properties.
    2. in the Properties window, click on Security tab.
    3. now, click Edit , and then click Add.
    4. now, type everyone in the box and click OK.
    5. check the full control box.
    6. click on apply and then click OK.

    You can also try the mentioned below as follows:

    1. click on start.
    2. go in Control Panel.
    3. Select "SOUND".
    4. double-click on speakers.
    5. click on the tab advanced and then uncheck the enable audio enhancements.

    Kind regards
    Amal-Microsoft Support.
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Error message: "Windows Media Player cannot access the file. The file may be in use, you won't have access to the computer on which the file is stored, or your proxy settings are may not be incorrect. »

    Original title: problems of residential group after system recovery

    I started a homegroup on my computer.  I added another computer to the homegroup.  Everything worked fine until I had to perform a system recovery on the laptop that I used to start the homegroup.  I implemented the homegroup again, but I can't access the files on the other computer via Windows Media Player.  I get an error message that says "Windows Media Player cannot access the file. The file may be in use, you won't have access to the computer on which the file is stored, or your proxy settings are may not be incorrect. "I can access all the music files via Windows Explorer.  I have to start over with a new password?  Can I just create a new homegroup?  What other options do I have?  You can provide any help would be greatly appreciated.  Thank you.

    Hello

    Please follow the methods and check the issue:

    Method 1:

    Open the homegroup troubleshooting utility:

    http://Windows.Microsoft.com/en-us/Windows7/open-the-HomeGroup-Troubleshooter

    Method 2:

    Why can't I access my homegroup? :

    http://Windows.Microsoft.com/en-us/Windows7/why-cant-I-access-my-HomeGroup

    For reference:

    Homegroup: frequently asked questions:

    http://Windows.Microsoft.com/is-is/Windows7/HomeGroup-frequently-asked-questions

    Method 3:

    See the steps in "include a folder shared in a library" from the link below:

    Access to files and printers on other homegroup computers: http://Windows.Microsoft.com/is-is/Windows7/access-files-and-printers-on-other-HomeGroup-computers

    I hope this helps.

  • Call the stored procedure, and bind parameters by name

    Hello

    I use the Oracle ODBC 12 c driver to pass values from one Interface to our database Oracle 11.2. The Interface software collects data from modbus protocoll and calls a stored procedure. Right now my syntax to call the stored procedure looks like this:

    CALL procedure-name ('STRING', 'Timestamp as String', numValue1);

    It works very well. Now, I have to add a default setting to my procedure. To stay flexible to make other changes, I want to call the procedure and bind the parameters by name. Release 10.2.0.1.0 ISC ODBC Notes:

    Added support for the named parameter, binding the parameters by name. ODBC Oracle driver now allows the application to specify the parameters of a stored procedure by name, in the procedure call. Named parameters are to be used in calls to stored procedures and should not be used in other SQL statements.

    So, it shouldn't be a problem to use named notation, but how do I do this in ODBC? I tried like this, but oracle returns an ora-00936 error of missing expression:

    call procedure-name (paramName1 = > 'STRING',= paramName2 > 'Timestamp as String',paramName3 = > numValue1).


    Thank you for your help.

    Finally, I was able to find the error. The syntax of the statement was very good. The problem was caused by another declaration that I edited before and the error has not attracted Attention immediately.

    Thanks for reading and looking for an answer.

  • What are the ways to access a remote database in a database completely different-schema - stored procedure?

    My source data in the remote database schema (say C3.case). And I am trying to insert data of this CASE table in my database table (for example SIMS.case) I use the stored procedure to load the data.

    I was going through the documentation and I thought that the creation of MV is not possible in this case is the source table in the remote database schema. Is this correct?

    or create a link DB is the only option available to access the remote database schema table.

    Thank you.

    Hello

    2929538 wrote:

    My apologies for the bad conventions help. I meant remote schema.

    the required data and the destination table, the two are in oracle, but in totally different schemas.

    Yes, you said a table is in a scheme called C3, and the other is in a schema called SIMS.  Are these schemas in the same database or in different databases?

    If they are in the same database, then you do not have a database link.  Or the other schema can reference tables in the other qualifying names correctly, for example

    SELECT *.

    OF C3. case_studies

    ...

    assuming that the right privileges have been granted.

    If the schemas are in different databases, a database link is the best way to access data in a database in a different database.

    Without a database link, you will probably use some kind of use outside the database to write the data to a database, the file if necessary, transport and read in other databases.  DataPump files of images or CSV files, as Paulzip said in answer to #1, could be used for this.

  • Access to the defined user compex types in stored procedure

    Hi all

    I have two complex types defined by the user which are defined as follows:

    create or replace

    TYPE 'MA_ROOT_OBJECT' AS THE OBJECT

    (

    USER_MACHINE VARCHAR2 (30),

    USER_DOMAIN VARCHAR2 (60),

    DATE OF EVENT_ACTIVITY_DT,

    USERCOLL MA_USER_TABLE,

    DATABASECOLL MA_DATABASE_TABLE

    )

    And USERCOLL and DATABASECOLL are again a different complex types defined by user 2. What should I do for the DATABASECOLL of the stored procedure?

    I am getting error below when I try to access:

    • Error (13.31): PLS-00302: component 'TMP_DATABASECOLL' must be declared

    ######################################################

    PROCEDURE SP_MSACCESS_METADATA)

    MSACCESSCOLL IN MA_ROOT_TABLE,

    STATUS OF THE VARCHAR2)

    AS

    TMP_DB_NAME VARCHAR2 (100);

    TMP_DATABASECOLL MA_DATABASE_TABLE;

    meter NUMBER (3);

    BEGIN

    SAVEPOINT INIT;

    TMP_DB_NAME: = MSACCESSCOLL. TMP_DATABASECOLL. DB_NAME

    EXCEPTION

    WHILE OTHERS THEN

    STATUS: = "ERROR BY STORING DEMAND MSACCESS."

    RAISE_APPLICATION_ERROR (-20001, SQLERRM);

    ROLLBACK TO SAVEPOINT INIT;

    END SP_MSACCESS_METADATA;

    Since MA_DATABASE_TABLE is a collection, you must tell Oracle item on which you want to:

    For example, if you want only one element in the collection:

    TMP_DB_NAME: = MSACCESSCOLL. DATABASECOLL (1). DB_NAME;

    otherwise, you will need to loop.

  • [BC] Call a stored procedure taking parameters of table

    Hello!

    I currently have a request of the OIC that makes thousands of calls per second stored procedure. The stored procedure runs a business logic that I want my client application to stay informed.  I want to reduce the cat of the database and instead to call the stored procedure from thousands of times per second, call the procedure (for example) once per second, but with values of one mile.

    I used OCIBindArrayOfStruct successfully to perform inserts bulk, where my OCI application executes a () INSERT INTO using the function "iters" and it might be possible to do something similar with the stored procedure, but I want to do something slightly different, because the procedure stored something like this:

    * If a specific condition is set, call a secondary stored procedure

    * If another special condition is set, insert a row into a table of some

    I so wanted to do was to pass a table (or a series of tables) in the stored procedure, then the stored procedure to use optimal methods that are available, such as FORALL, to perform each of the tasks, the more effectively.

    So I thought to create a type, such as a TABLE OF VARCHAR2, or a VARRAY and possessing of the parameters for the stored procedure based on this type, something like:

    create or replace TYPE 'NTT_VARCHAR2' AS TABLE OF VARCHAR2 (32700);

    create or replace FUNCTION bulk_process_values)

    p_error_message OUT NOCOPY VARCHAR2,

    p_module_context_name OUT NOCOPY VARCHAR2,

    p_sql_error OUT NOCOPY VARCHAR2,

    p_count in NUMBERS

    p_non_array_var_1 IN VARCHAR2,

    p_non_array_var_2 IN VARCHAR2,

    p_array_var_1 IN NTT_VARCHAR2,

    p_array_var_2 IN NTT_VARCHAR2,

    p_array_var_3 IN NTT_VARCHAR2

    < etc. for all the variables in table >)

    RETURN NUMBER

    .. .but I am struggling to find an example of how call the procedure "bulk_process_values" stored, and even if I use a TABLE OF VARCHAR2 or a VARRAY as a parameter type.

    I searched the Internet and found this: OIC - how to bind an array to a stored procedure? - and binding table of the structs (OCIBindArrayOfStruct) sample code

    - but they take different approaches and a bit confused (the second example spoke of OTT).

    I think that the first approach is more likely to be the solution I need - but I can't help thinking - it is a bunch of stuff to move if it does not end up significantly improve performance!

    My questions are:

    * Moves to a call-SP-thousands-of-times-per-second to call-SP-fewer-times-but-with-array-parameters sensitive?

    * Should the table or VARRAY, TABLE OF VARCHAR2 parameters or something else?

    * Should I use for my case OTT?

    Samples I found are both very old - and the second example indicators that the optimal approach evolves with the OCI versions - I'm on 11.2, what is the optimal approach these days?

    * < added later > why is there no official useful example?

    Thank you very much

    Much appreciated. https://community.oracle.com/message/4528528#4528528 has actually worked, with VARRAY, with a proof of concept. Now I just need to shake a little and then get my PL/SQL for optimal PC experts. I think I was really discouraged by the lack of official documents, with the Community (Paradise) is the only way to get real results.

    Thank you JJ.

    I intend me to use the binding enforcement of the table and the table and avoid N back and forth, but I do not then get the opportunity to do something clever in the PL/SQL.

    In the PL/SQL, there is no logic occurring - I don't call the same SP tons of times, but then I want to be able to use PL/SQL optimizations such as FORALL, BULK COLLECT, reduce the number of validations and others.  There is a commit after each SP run, because otherwise the nature of demand means that the application hangs occur; However, there is a way (I think) be smart on the part that is likely to deadlock (making a shape on the Bay First, then applying the updates in the order sorted and then failed to get a blocking theoretically), and then FORALL insert for the second part of the stored procedure.

    I guess I may apply the single return, passing a table (to a commit in the SP)-which will reduce back and forth, so gain in performance, but it will not reduce the number of validations that I do - and Oracle said that commits too frequent is not good for performance. I already have code in my framework that does - by making a simple INSERT INTO.

    Good to hear that OTT is not explicitly required - and VARRAY resembles the approach to try first.

  • I created a pdf file on my computer that has several links to to other PDFs, word documents, etc. When I send this to people that they cannot access the links. Probably because the files in the links are only stored on my computer. Any ideas?

    I created a pdf file on my computer that has several links to to other PDFs, word documents, etc. When I send this to people that they cannot access the links. Probably because the files in the links are only stored on my computer. Any ideas?

    Of course, it's an option as well. You can attach files to the main PDF file, or you can merge all files into a single PDF portfolio.

  • setting report parameters fails for the report that runs the stored procedure in QMR FDM 2.1.1

    Hello

    Can someone help us please on this issue we have; If a solution is already available somewhere on the forum please link me to it.

    Please see our situation;

    The script below was part of the customization of a colleague to a script of Oracle FDM ("AftFileImport").

    There are no screenshots at this stage that came back to us with a temporary workaround.

    More detailed description:

    We built a custom report of FDM ("FSBValidationErrorsforAllLocations") that accepts two parameters (CatKey, period) and which calls a procedure stored in SQL Server with the same two parameters. FDM SQL statement of the report is:

    RUN FSBValidationErrorsforAllLocations ' ~ time ~', ~ Cat Key ~

    It works through the User Interface.

    When you try to put the two settings by customizing the event Oracle 'AftFileImport'script, the report fails. Below the part of the code in the 'AftFileImport', where we tried to fill values:

    • objReport.mParametersClear
    • objReport.mParametersAddNew "CatKey", RES. PstrCat
    • objReport.mParametersAddNew 'Period', RES. PstrPer

    We must understand why the way above to the definition of the parameters does not work with stored procedures, as seems to be the only documented way Oracle of setting parameters.

    Please let me know if that's enough.


    Thank you in advance.

    Hello

    which is the error when you run the script?

    • objReport.mParametersAddNew "Cat Key", RES. PstrCat

    Try again with the white space as it is how you named your parameter in the report definition, didn t you?

    Also try to use the built like the following examples:

    objRP.mParametersClear
    objRP.mParametersAddNew 'Period', CDate (dtePeriod)
    objRP.mParametersAddNew 'Loc', CLng (lngLocation)
    objRP.mParametersAddNew 'CatKey", CLng (lngCatKey)
    objRP.mParametersAddNew "TargAcct", CStr (strAutoMapAcct)

    Concerning

  • ORA-06565: cannot run the ROLE VALUE from stored procedures

    Hello!

    I'm trying to call a procedure from a function. Among the statements in the procedure stored is of dbms_session.set_role ('HAVE');

    I get the error "Cannot run a DEFINED ROLE less stored proceduers". I joined the call in an anonymous block above, but the error still exists.

    Any idea will really help me.

    Thank you

    >
    I'm trying to call a procedure from a function. Among the statements in the procedure stored is of dbms_session.set_role ('HAVE');

    I get the error "Cannot run a DEFINED ROLE less stored proceduers". I joined the call in an anonymous block above, but the error still exists.

    Any idea will really help me.
    >
    This will work only if the procedure is defined for the APPELLANT's rights.

    Roles are disabled in named PL/SQL blocks unless you use of the APPELLANT's rights by setting the code with AUTHID CURRENT_USER.

    The Oracle documentation provides a very clear explanation - based restriction is for the NAMED PL/SQL blocks rights DEFINER of this use (the default):
    >
    Roles used in the appointed with rights to define blocks

    All roles are disabled in any PL/SQL block named (stored procedure, function, or trigger) that runs with the rights of the author. Roles are not used to privilege control, and you cannot define roles within the procedure of a DEFINER rights.
    >
    The database Security Guide has the information in the section "operation of the roles in PL/SQL blocks (which, of course, wouldln was necessary if they didn't work.).
    http://docs.Oracle.com/CD/B28359_01/network.111/B28531/authorization.htm#i1007304
    >
    The use of roles in a PL/SQL block depends on if it is an anonymous block, or a block named (stored procedure, function, or trigger), and if it runs with the rights of the author or the rights of the applicant.

    Roles used in the appointed with rights to define blocks
    All roles are disabled in any PL/SQL block named (stored procedure, function, or trigger) that runs with the rights of the author. Roles are not used to privilege control, and you cannot define roles within the procedure of a DEFINER rights.

    The SESSION_ROLES view shows all roles that are currently enabled. If a named PL/SQL block that runs with DEFINER SESSION_ROLES rights issues, the query returns no rows.

    See also:

    Oracle database reference

    Roles used in blocks named with the rights of the plaintiff and anonymous PL/SQL
    Named PL/SQL blocks that run with the rights of the applicant and the anonymous PL/SQL blocks are executed at the end of the privileges granted through active roles. Current roles are used for verification within rights Summoner of privilege the PL/SQL block. You can use dynamic SQL statements to define a role in the session.

  • Maximum number of parameters sent to the stored procedure

    I have a web form where I insert data in Oracle. There are at least 20 fields on the form. For the INSERT, I want to use the stored procedure. But in this case for the section of the VALUES in the INSERT statement, I need to send that many - in this case 20 settings. Is it normal for a procedure to receive 20 parameters? If this isn't the case, then should how I follow to do? I know that technically there is only no problem but isn't normal programming or database managementwise? I think it's the basic thing any developer web do it all the time.

    Is it normal for a procedure to receive 20 parameters?

    Sure. It is very good.

    But what is normal programming or database managementwise

    If you need to insert values for 20 fields then normal.

Maybe you are looking for

  • Air play works, but its hit or miss...

    Hi all: I'm sure that this issue is not unique, but if you can give me any advice or let me know what I am doing wrong that would be great. OK, so I use Amazon Premium Video on my iPhone and I'm trying to cast to my Apple TV. When I select the Apple

  • Tecra M9: What is the "PCI Simple Communications controller"?

    Hello I just rolled back a Tecra M9 - 12R (T7300) to XP Pro.I found all the drivers on the site but now I installed all and yet, I get a non recognized "PCI Simple Communications Controller" in Device Manager.I installed the card ethernet and wi - fi

  • Downloas Internet speed question

    Hello I was recently told by my ISP Cox that they increased the speed of download of 100 MB to 150 MB. When I tried testing this change with my computer connected to the Linksys E1000 router only, I could connect to 94 mb. When I connect my Motorola

  • Windows installation power edge 2650 and 2550

    Hello, I received recently 2 servers working on an installation an operating system however both these server with the same problem where you set the boot device in the bios to cd/dvd drive and reboot and insert a windows install cd in the drive, but

  • Police fixed-pitch, or including the own font files

    Hello community! Is it possible to define the type of insurance a LabelField to a minivan one? I searched the forum and I could not find the comments about the font size... If this is not possible: is there a way to include my own fonts with the appl