Dbms_parallel_execute.run_task of execution and pass several Params to the target procedure

Hello

I look for my hand on the dbms_parallel_execute package in Oracle 11 g Release 2 and needed help to find a way to pass additional parameters

the target procedure when it is called from dbms_parallel_execute.run_task.

Please see this link for an explanation of the use of the package:

https://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:4248554900346593542

Usage example:

declare
  l_var NUMBER := 0;
begin
  --Sample execution from above link
  dbms_parallel_execute.run_task
  ( task_name      => ‘PROCESS BIG TABLE’,
   sql_stmt       => 'begin serial( :start_id, :end_id ); end;',
   language_flag  => DBMS_SQL.NATIVE,
   parallel_level => 4 );

  --Desired execution
  dbms_parallel_execute.run_task
  ( task_name      => ‘PROCESS BIG TABLE’,
   sql_stmt       => 'begin serial( :start_id, :end_id, "HOW TO PASS l_var VARIABLE HERE" ); end;',
   language_flag  => DBMS_SQL.NATIVE,
   parallel_level => 4 ); 
end;
/

Now, for the procedure of series, apart from the parameters start_id and end_id, we have additional params such as l_var.

Can someone help me please to solve this problem?. Any help on this approach would be highly appreciated.

Thank you

Hardcode the parameters in the dynamic statement as literals. After all, these globals are set of constants for the task parallel, correct?

Just make sure that you are coding explicit data type conversions. For example

pqStatement := 'begin DoSerial( startRow => :start_id, endRow => :end_id, day=> to_date('''||||''',''yyyy-mm-dd'') ); end;';

Of course, also explicitly caste global parameter to a string when concat'ing in the dynamic instruction of the PQ.

Tags: Database

Similar Questions

  • How can I build and pass a variable to the function getField?

    I need to know how to build and pass a variable to the function getField():

    I have a form of several sections similar to a spreadsheet.  Each section contains 5 rows of 11 columns.  Currently I have calculations in the field I want to consolidate and move to the level of the document.  The field names in each column are identical except for a row identifier.  For example, in the 1st row: a_debtType1, a_debtTerm1, adebtRate1, etc.  I want to be able to pass to a function of level document line identifier and that connect a function "getField.  Here is an example:

    Document-level:

    function calculateLoan (lineNumber) {}

    var myDate = getField("a_debtType"+lineNumber).valueAsString;

    var myDate = getField("a_debtTerm"+lineNumber).valueAsString;

    .. few treatment

    return

    }

    Level of the form:

    change the information in the form is ready for line 1

    function calculateLoan("1");

    Thanks in advance for any help.

    It seems good except how you call the function of what you have. The calculation script should be something like:

    Custom calculate script

    calculateLoan("1");

    Note that you can also get the line number if it is contained in behalf of the field that calls the script if you don't disturb him passing as parameter, assuming you named the fields correctly.

    For example, to calculate the field is called "row_total.1", you can get the line number in the script like this:

    var no_lig = event.target.name.split(".") [1] ;

  • I missed the SHIFT key and press several keys in the lower corner of my keyboard LH. Firefox split up into several iterations, and I had to reboot.

    I missed the SHIFT key and press several buttons in the lower left corner of my keyboard. Firefox has lost the tab that I was using and divided into a separate iteration for each other (plus two I had closed). I could not recover and had to close all but one of them and restore all my tabs.

    What I had done and how I should have recovered?

    First, you need to update to Firefox 18.0.1 Firefox updated to the latest version. The version you are on is bug and little course.

    Second, it looks like you may have entered groups of tabs. Use tab groups to organize a large number of tabs is that look familiar?

  • My Firefox opens on a completely white screen with no menu bar or whatever it is. I uninstalled and reinstalled several times with the same problem. Help!

    I opened this morning with no problems, went to my g-mail account, pulled upwards an e-mail, click on answer, typed my respons, but when I hit send, everything went completely empty.

    I have not compressed, without... menu bars anything other than firefox upper-left logo and reduce it, full-screen/small screen and close / x buttons in the upper left corner... it's she.

    I uninstalled and reinstalled several times, but nothing works.

    What now?

    COR - el,

    Wow... that was well above my head... at least tonight. Laughing out loud

    After my last post, I did a little research and figured out how to import my favorites in IE8... so I uninstalled firefox again... but this time I had checked the "delete my personal Firefox and customizations" in the wizard, who did remove two addons (Ghosery and Ad Block Plus)... the relocation was different this time and the first time you start firefox He asked if I wanted to import my IE Favorites, which I did... I now added Ghosery and Ad Block... and if so far everything goes well... seems I got this back up and running.

    The mention of the malware in a madperson add-on has been helpful to my solve my problem.

    Thanks for the help...

  • How can I select more than one bookmark at a time so that I can open and then several bookmarks - without the aggravation of back to the list and selecting and opening each one.

    My dozens of bookmarks, I often want to open 5 or 6 of them at the same time - maybe a couple of weather reports, a couple of radio stations, a couple of other Web sites. But I see no way to do this without laboriously find a bookmark, select it, opening the site, then return to the Favorites, find the second bookmark, select it, open the site and so on. There is probably a way for me to select several independent bookmarks, then open them at the same time. Thanks a lot for your help. Don

    Oh I see, when I read your question, my understanding is that you have Web sites that you are opening regularly you would like to open all at once. This is why I have proposed to create a folder with these specific bookmarks.

    However, your clarification, it seems that you want to open Web sites randomly here and there. So, essentially, you want to SELECT favorite sites and then open them at the same time.

    There is a way to do it. Access your bookmarks by clicking on the menu button drop-down orange Firefox (upper-left). It is:

    • Go to \Firefox\Bookmarks\Show all bookmarks;
    • Click on "Bookmarks Menu" (in the sidebar);
    • Use the CTRL key to select your favorite Web sites.
    • Right click and choose "all open tabs.

    It's always a bit laborious, but it's the easiest way, I could find, especially if you want to open several tabs at the same time.

  • TC orange flashing: no internet connection and no DNS server.  We reset and reconnected several times.  The Wifi doesn't connect or internet not connecting

    We got a new TC yesterday and replaced our old.  We followed the instructions in the Quick Start Guide.  And we either do not have internet and green - or we have internet and the light flashes in orange.  We reset and rebooted several times.

    What it is connected to? Often, you need to reset a modem connected (that is, pull its power for 20 seconds) the modem to connect the new device. If the light is blinking orange error, you should be able to see what this indicates using the Airport on your Mac.

    Matt

  • Try to uninstall build Munki 3.1, does not work and leaves several entries in the registry

    When I try to remove build Munki 3.1 a few days ago. However, direct the directory uninstallation fails generally as the Build Munki 3.1 leaves several entries in the registry of the computer. How should I do?

    * original title - how should I do? *

    Hi jacob,

    If the standard uninstall process is not working (as seems to be the case), then try to use the free Revo: http://www.revouninstaller.com/revo_uninstaller_free_download.html that often works when the usual process does a complete job.  I know for a fact that in advanced mode, there's a special process which deals expressly with clean up the leftovers of the program register.  Personally, I use Revo to uninstall everything that I want to uninstall (more with AV products special removal tools) because almost all normal uninstall process leaves something behind (I had to remove the remains on almost each uninstall I made using Revo) and this will keep my own system.

    If you have already uninstalled to the point that it does not appear as an option in Revo, then reinstall again and then uninstall with Revo in advanced mode and this time and that should do the trick.

    I hope this helps.

    Good luck!

  • Why Windows asks me to install the same updates several times. Often several times the same updates and often several times in the same day?

    I install security updates and important. Sometimes in the same day, I wonder to install the same updates. When I check the history I see that they are already installed. This can happen several times in the same day.

    Troubleshooting Windows Update or Microsoft Update when you are repeatedly offered an update

    UTC/GMT is 00:34 Sunday, March 11, 2012

  • How to pass an object of the stored procedure?

    Hello.

    After reading the documentation online 'The JDBC Oracle9i developer reference Guide' how to use oracle.sql.STRUCT to pass the java classes to database objects and how do the same thing in the sense opposite, I still don't know how to do what I need, I would like to know a few resourse online where I could find more examples.
    I guess it must be quite easy to do.

    I learned to create a java class that will be used to call a stored procedure (9i database) that has a single input/output parameter whose type is a user-defined object.

    I'm trying to do something similar, by I was not able. This is my essay:

    CREATE OR REPLACE TYPE                  FERNANDO.TIPOBD AS OBJECT (   ID INTEGER,   NOMBRE VARCHAR2(50),   HORA TIMESTAMP ); / CREATE OR REPLACE PACKAGE FERNANDO.prueba_java AS   PROCEDURE prueba (objetoJava IN OUT TIPOBD); END prueba_java; / CREATE OR REPLACE PACKAGE BODY FERNANDO.prueba_java AS   PROCEDURE prueba (objetojava IN OUT TIPOBD)   AS   BEGIN       NULL;   END prueba; END prueba_java; /
    import java.sql.*; //import oracle.sql.*; import oracle.jdbc.*; import oracle.sql.*; public class Prueba { public static void main(String[] args) { Connection conexion = GestorConexion.getConexion(); if (conexion != null) {   try {     DatabaseMetaData meta = conexion.getMetaData();     System.out.println("JDBC driver version is " + meta.getDriverVersion()); int num = 0; String consulta = "select 1 from dual"; PreparedStatement ps = conexion.prepareStatement(consulta); ResultSet rs = ps.executeQuery(); if (rs.next()) { num = rs.getInt(1); } System.out.println("num == "+num); ObjetoOracle oo = new ObjetoOracle(1, "Fernando", new Timestamp(1) ); System.out.println("id: "+oo.getId()+"; nombre: "+oo.getNombre()); // Se llama al procedimiento almacenado String llamada = new String(); llamada += "BEGIN "; llamada += "  FERNANDO.prueba_java.prueba(?)"; llamada += "END;"; StructDescriptor structdesc = StructDescriptor.createDescriptor("FERNANDO.TIPOBD", conexion); STRUCT struct = new STRUCT(structdesc, conexion, null); OracleCallableStatement ca = (OracleCallableStatement)conexion.prepareCall(llamada); //ca.setObject(1, oo); ca.setObject(1, null); ca.registerOutParameter(1, OracleTypes.JAVA_OBJECT); ca.execute(); } catch (SQLException sqle) { System.out.println(sqle.toString()); } } else { System.out.println("CONEXIÓN con bd nula"); } } }

    My if intend to create an oracle.sql.STRUCT object that I'll pass to the procedure and then get back to the procedure, but I can not even create the StructDescriptor.
    It is the output that I get:

    Conexión con BD ok JDBC driver version is 9.2.0.8.0 num == 1 id: 1; nombre: Fernando java.sql.SQLException: Tipo no definido: get_next_type

    Any help would be welcome. Thanks in advance.

    You must add the name of the type of your call registerOutParameter (.).
    ca.registerOutParameter ("", OracleTypes.JAVA_OBJECT, FERNANDO. TIPOBD);

    You can consider using OracleTypes.STRUCT instead of JAVA_OBJECT.

    You must also change your call set *;.
    ca.setObject ("", FERNANDO of the object. TIPOBD, OracleTypes.STUCT);

    You can use the same string parameter "" to the two parameters or
    You can use the same parameter INT for both parameters.

    You cannot combine parameters named and numbered together. I was using both for a single method or both using the other.
    The syntax may be different according to the method you in order to verify the Java Doc.

  • date and time of transfer to the target fpga

    Hello world

    Can I transfer the date and time of real time on target fpga in a sbRIO?

    Thank you

    Hello

    You don't know why you would want to try this, can you clarify?  You cannot send the timestamp as it is, but according to what you want to do, there will be a solution.  This describes how a timestamp is stored in LabVIEW, but you probably want to send/receive something more easy to handle on FPGA.

    Michael.

  • How can I search and return several items from the table quickly (like Matlab find)?

    Hi, I'm a pretty experienced Labview programmer, and I've always wondered if there is a way to quickly search for pictures on several items that meet the selection criteria, equivalent to the Matlab find command.  While my inability to do in Labview has always annoyed me, I now have an application that requires this capability and I need to find a solution.

    Is the fastest way I've found to do this in labview to perform comparisons on the data vectors, then use the Boolean value that results from vector to analyze the table using a loop and shift registers.  I enclose an extract vi a analysis comparative vi to one of the simple searches that I need to do.  On my laptop, this research takes about 600 ms.  In comparison, the equivalent in Matlab:

    newArray=oldArray(find(oldArray(:,4)./oldArray(:,2)>1.5),;

    runs in about 1.2ms.  So, the way I am doing this in Labview is only 400 times slower

    Needless to say, I need to make these types of research many times, and these additional 599 ms start to add up pretty quickly!

    Thanks for your help,

    Aaron

    Hi Aaron,

    the slow part is probably "build group" of the node in the loop.

    Try this:

    Define an array the same size as the input data (or simply uses a copy of it) and the wire that to the shift register. Keep a counter of lines found in the loop. Use IndexArray and ReplaceArraySubset for the loop to move rows found at the beginning of the table (overwrite the 'bad' lines). After the loop simply ReshapeArray the number of found lines...

    Sorry, don't have LV (2009) on hand for editing your snippet.

  • Oracle 11g RAC and Clusterware several houses of the databases

    We plan to install grid 11 GR 2 Clusterware on several series P IBM AIX 5.3 servers and combine them together.

    Advising several of the DBA in my shop to install the clusterware and ASM under an AIX user id (for example, crsuser) and then implement various database houses (we plan 2 databases for this cluster) under different pseudos of AIX software (for example, users oradb1 and oradb2). So the clusterware will run on AIX user id crsuser, and the first database would be executed using AIX user id oradb1, the second database would use AIX user id oradb2. Will this work?

    I administered the RAC clusters in the past for 10 gr 2, but the clusterware and databases were all settled under the same AIX user id (for example, AIX 'oracle' user id).

    Any advice will be greatly appreciated. Thank you. :)

    CowTown_dba wrote:
    We plan to install grid 11 GR 2 Clusterware on several series P IBM AIX 5.3 servers and combine them together.

    Advising several of the DBA in my shop to install the clusterware and ASM under an AIX user id (for example, crsuser) and then implement various database houses (we plan 2 databases for this cluster) under different pseudos of AIX software (for example, users oradb1 and oradb2). So the clusterware will run on AIX user id crsuser, and the first database would be executed using AIX user id oradb1, the second database would use AIX user id oradb2. Will this work?

    I administered the RAC clusters in the past for 10 gr 2, but the clusterware and databases were all settled under the same AIX user id (for example, AIX 'oracle' user id).

    Any advice will be greatly appreciated. Thank you. :)

    Hello

    From 11 GR 2, Oracle recommends having the separation of roles for ASM / software grid infrastructure and database. Please have a read http://download.oracle.com/docs/cd/E11882_01/install.112/e17210/preaix.htm#CWAIX176 for more details

    See you soon

  • Warning against the closure of several tabs is no longer works and close several tabs. The possibility to set up is also a party!

    Why these people always TAKE AWAY THE BEST TOOLS?

    Searched online and found there one "add on" called 'Always asked' that he turned his back. Why Firefox has deleted something so obviously useful and kept the secret of fix is beyond me.

    Why is there so much of it in computers. They are stupid or just arrogant?

  • Why Firefox will automatically open a new tab and go several times to the same specific web page? I don't have this Web page in my "Favorites" folders

    I have my browser open, work writing / reading email and BOOM, another tab opens and it's always the same web page. Why Firefox opens a new tab without any input from me? I don't have the suspect web page saved as a "favorite."
    Nothing appears on no bug/virus/spyware/...et.al. programs. WHERE hides this pita? `

    I also have the problem. in my case that it is caused by an add-on, I installed recently. name of the add - on's Personas Rotator. I have just to disable the add-on and everything back to normal. just check your recent module, disable it and see if the problem persists.

  • I looked at my report system and have several that say "the system resumed stand-by", what happens almost every day. My computer worked fine, what is all this history?

    I use Uniblue to clean my mistakes, if he had a year now and didn't have not encountered any problems. But what is all the stuff 'recovery from sleep mode? Thanks for any help.

    I thought that you said in your first post that you have no problem.

    The release of the standby mode is the computer to wake. Normal.

    With EventIDs you need the source it's EventID + Source. There may be hundreds of EventID 302. And as there is no complete list, we also have the text. This is a partial list - http://www.eventid.net/display.asp?eventid=302

    Registry cleaners tend not to do much (if they are safe to use) or try things that the programmer does not understand and are not safe. Problems may not be noticed for long periods.

    If you plug device USB 2 (or 1) USB 3 (or 2), you will get the message to plug it into a faster port. My computer has USB 1 and 2 USB ports.

Maybe you are looking for