DBMS_PARALLEL_EXECUTE package of oracle
Gurus,
Can anyone guide me how to use this oracle supplied package (DBMS_PARALLEL_EXECUTE) in a genric way
what I am looking for is a generic process which uses this package and triggers off by_rowid or by_col, or by_sql processes.
Also can this package execute any of the pl7sql blocks also in parallel?
Please help me understand this with some examples....
Thanks in advance!
Regards,
Manik
Manik wrote:
Can anyone guide me how to use this oracle supplied package (DBMS_PARALLEL_EXECUTE) in a genric way
what I am looking for is a generic process which uses this package and triggers off by_rowid or by_col, or by_sql processes.The basic concept behind this package (and the Oracle PQ feature) is take loads and loads of I/O, break it up into distinct (rowid) ranges, and process these ranges using separate and parallel processes.
So I'm not sure what "generic feature" you see in this. The data is read (I/O'ed) for a reason. That reason is specific. Not generic. E.g. scan all rows in large table and find rows that match a certain filter condition. That means a very specific SQL statement that is run in parallel. Such as selecting all blue widgets with a foo attachment, that are 2mm in diameter and are between 10 - 20mm in length, and were manufactured during the last month, and shipped from factory to shop in the truck with registration ca 12345.
This is is specific. Not generic.
So perhaps you need to explain what you imply with generic.
Also can this package execute any of the pl7sql blocks also in parallel?Not really. The SQL engine does parallel processing. Not the PL/SQL engine. Different languages. Different concepts.
You can call SQL from PL/SQL. You can call PL/SQL from SQL.
So the latter, if run in parallel, can call and use PL/SQL, in parallel. The PL/SQL code unit that supports being called like that is known as a pipeline table function.
It seems to me that you are approaching parallel processing in Oracle with some client threading preconceptions. PL/SQL and SQL are server side languages and the environment is different than that of a client language and environment. Maybe you should empty your cup of these preconceptions first, to understand what Tubs said quite rightly, and to understand what server-side parallel processing is about in Oracle.
Similar Messages
-
Call to a procedure in DBMS_PARALLEL_EXECUTE package
Hi All,
I have a procedure that takes an input parameter, I need to call this procedure in parallel. I am going to use DBMS_PARALLEL_EXECUTE package to parallize the process. Here is a example of what I want to do, please note that there is a third parameter newParameter.
l_sql_stmt := 'BEGIN process_update(:start_id, :end_id, ' || newParameter || ' ); END;';
DBMS_PARALLEL_EXECUTE.run_task(task_name => l_task,
sql_stmt => l_sql_stmt,
language_flag => DBMS_SQL.NATIVE,
parallel_level => 10);
I create the task and chunck using SQL, but this run task does not start processing. Can we do this?
Thanks in advance?>
I have a procedure that takes an input parameter, I need to call this procedure in parallel. I am going to use DBMS_PARALLEL_EXECUTE package to parallize the process. Here is a example of what I want to do, please note that there is a third parameter newParameter.
l_sql_stmt := 'BEGIN process_update(:start_id, :end_id, ' || newParameter || ' ); END;';
DBMS_PARALLEL_EXECUTE.run_task(task_name => l_task,
sql_stmt => l_sql_stmt,
language_flag => DBMS_SQL.NATIVE,
parallel_level => 10);
I create the task and chunck using SQL, but this run task does not start processing. Can we do this?
>
We have no way of knowing if you can do what you are trying to do since you didn't post the code you are using to do it.
You can use a stored procedure to process the workload if that is what you are asking.
See this Oracle-base article for an example of using a stored procedure for the workload.
http://www.oracle-base.com/articles/11g/dbms_parallel_execute_11gR2.php#create_chunks_by_sql
>
The following example shows the processing of a workload chunked by a number column. Notice that the workload is actually a stored procedure in this case.
>
You did NOT provide any code that shows how you plan to provide that 'third' parameter so maybe that is where your problem is. -
How to call a package in Oracle
I'm trying to call a package in oracle
(this is the oracle way of calling it :
begin pck$xl.get_year_low_high_to_date(:compid, 20010801 , 20020108 ",:year_low,:year_high,:year_average,:low_date,:high_date); end;)
but i can't get it right.
I'm new to package calling in Oracle from Java, till now i only worked with SQL statements without parameters of that kind, can someone help me with this?
ps the ":compid" is a parameter i have to fill in and provide...
thank you very muchok here is a test i do...
but still doesn't work something about the bindvariables (check errorlog). I know a bit jdbc and i understant what you mean, but the problem is i don't know how this should go :(
please advise
import java.sql.*;
import java.util.*;
import java.text.*;
import java.io.*;
* @author U97488
public class test {
public static void main(String[] args) {
try{
ConnectionSherpa cs = ConnectionSherpa.getInstance("ConnectionSherpa");
Connection conn = cs.getConnObj();
String sSQL = "begin?; pck$xl.get_year_low_high_to_date(?, 20010801, 20020801 ,:year_low,:year_high,:year_average,:low_date,:high_date); end;";
CallableStatement stmt = conn.prepareCall(sSQL);
stmt.setString(1, "BRU10");
System.out.println(stmt.toString());
if(stmt.execute(sSQL)){
System.out.println(stmt.getString(2));
}catch (Exception e){
e.printStackTrace();
}StackTrace:
java.sql.SQLException: ORA-06550: Regel 1, kolom 6:
PLS-00110: Bindvariabele '1' is niet toegestaan in deze context..
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1451)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:862)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1839)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1764)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2354)
at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:909)
at com.kbcsecurities.taminoupdate.servlets.test.main(test.java:28) -
How call procedure or package from Oracle BI Publisher 10.1.3.2.1
Hi Gurus,
I need to call a procedure or package from Oracle BI Publisher 10.1.3.2.1 by passing parameters, I do it because it would be easier to fill a table as the report that asks for is too complex (8 breaks, 5 dblinks, 20 tables, etc).
I'm not using the Oracle XML. Review include the following solutions:
Re: Stored procedures and dynamic columns
Re: Is it possible to use Stored Procedures in BI Publisher GUI?
Re: PL/SQL Stored Procedure w/ XML Template?
But none of them useful for me was the level of complexity.
Best regards.Hi Vetsrini,
I write the sentence as it showed in the previous thread
select from whc_kk_v2.whc_p_kk_publisher (pv_msgerror =>: msgerror,*
pv_pro1 =>: prov_1,
pv_pro2 =>: prov_2)
run when I get the error BIP
ORA-00933: SQL command not properly ended
Show me I'm doing wrong, or who may be causing the error. I tried everything but does not leave, please your help.
Best regards -
Error executing a package on Oracle 10G database
Hi,
I've a package on Oracle 10G database which accepts xml string as input,loads it into XMLDOM and does some processing.
When I execute this package from .Net 2.0 client,I get the following error:
**Error**
err ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00216: invalid character 0 (0x0)
Error at line 1
**Error**
But when I execute the same package from .Net client 2.0 on Oracle 9i database, it seems to work fine.The xml which I am sending is well-formed one.
Where am i going wrong?
Please help.
Thanks in advance...!
Regards,
AmitCheck the xml strings passed as input . One of the xmls may be malformed.
-
Unwrapping a Package in oracle 10g
Hi,
I would like to view the code of dbms_scheduler package in oracle 10g. When i tried to see the package body it shows me that the package has been wrapped. Could anyone let me know how to unwrap the package and see the contents.That is all you can see, no more.
SQL> desc dbms_scheduler ;
....more
FUNCTION GET_JOB_STEP_CF RETURNS RE$VARIABLE_VALUE
Argument Name Type In/Out Default?
IEC VARCHAR2 IN
ICN VARCHAR2 IN
VNAME VARCHAR2 IN
IEV RE$NV_LIST IN
PROCEDURE GET_SCHEDULER_ATTRIBUTE
Argument Name Type In/Out Default?
ATTRIBUTE VARCHAR2 IN
...moreSs -
Maximum size of a package in oracle 10g ?
Hi,
I am using Oracle 10g, version-10.1.0.4.2 and OS- Windows XP.
What should be the maximum size of a package in oracle 10g ?
Thank u....!
Ravihttp://download.oracle.com/docs/cd/B14117_01/server.101/b10755/limits003.htm#sthref3594
Nicolas. -
Dear All,
We are calling Web services using UTL_http through one of our custom package in Oracle 10.2.0.5 .. & it is giving correct result/output..
But if we are calling web services using the same custom package from oracle 11.2.0.2 & it is giving us error..
utl http handling in custom package as :
soap_request :=
'<?xml version = "1.0" encoding = "UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SOAP-ENV:Body>'
|| v_request_xml -- input xml that we are sending
|| '</SOAP-ENV:Body></SOAP-ENV:Envelope>';
http_req :=
UTL_HTTP.begin_request (fx_service_url, -- fx_service_url is URL web service which are calling
'POST',
'HTTP/1.1'
UTL_HTTP.set_header (http_req,
'Content-Type',
'text/xml'
UTL_HTTP.set_header (http_req,
'Content-Length',
LENGTH (soap_request)
UTL_HTTP.set_header (http_req, 'SOAPAction', '');
UTL_HTTP.write_text (http_req, soap_request);
http_resp := UTL_HTTP.get_response (http_req);
DBMS_OUTPUT.PUT_LINE('HTTP response status code: ' || http_resp.status_code);
DBMS_OUTPUT.PUT_LINE('HTTP response reason phrase: ' || http_resp.reason_phrase);
UTL_HTTP.read_text (http_resp, soap_respond);
UTL_HTTP.end_response (http_resp);
Output in 10g :
HTTP response status code: 200
HTTP response reason phrase: OK
Output in 11g :
HTTP response status code: 400
HTTP response reason phrase: Bad Request
Query :
1. is there any difference of handling utl_http in oracle 10.2.0.5 to 11.2.0.2 ?
2. we recently upgraded oracle database from 10.2.0.5 to 11.2.0.2.. is/are there any setting which we need to take care while passing xml from oracle database to web service ..?
3. do we need to change any setting in we-services server also in case database upgraded from ..?
Thanks,For SQL Developer, see my advices in Re: Oracle 10g - Chinese Charecter issue and Re: insert unicode data into nvarchar2 column in a non-unicode DB
-- Sergiusz -
How to register Package in oracle apps?
Hi All
How to register package in oracle apps?
If package contains 3 procedure, i want to call 2nd procedure of the package when i submit the concurrent program in srs window.. Can any one give the registration for the sameTo add to Gyan's comment:
Go to system adminstration responsibility
Create a conc. executable. Select execution method as pl/sql stored program and then enter your second procedure name as follows
package_name.procedure_name.
Then create conc. program that uses the above executable.
Add the program to a request group.
Add the request group to a responsibility.
Now you will be able to run your procedure.
Hope this helps,
Sandeep Gandhi -
How to list dependencies of stored procedure in a package in oracle
hi gurus,
can any body help me to solve the below issue?
how to list dependencies of stored procedure in a package in oracle?
advanced thanks...It sounds like you're going to have trouble because you're trying to track dependencies at a more fine-grained level than Oracle does (at least prior to 11g, which I know does finer-grained dependency tracking for columns, so there may be something that would help you there).
In Oracle, the entity is the package body. The procedure within the package does not have dependencies and does not depend on anything, it is part of the package body, which does have dependencies. You can see what tables are used by the package body via DBA_DEPENDENCIES. But if you're trying to track the dependencies for a particular procedure in a package, you'd either have to manually examine the code or you'd have to write your own PL/SQL parser.
Justin -
Pros and cons of using email sending package in oracle 8.1.6
hi ,
i would like to know the advantages /disadvantages of using email sending package from oracle 8.1.6
compared to sending the same using say perl or php.
iam developing a site in php/oracle8.1.6 , in which iam supposed to create a payement module.whenever a user
register(for free trial or subscribing the site) i'll have to send him a welcoming mail.In addition to this iam also supposed to find out wether subscribers are paying cash at right time and if not send them reminder mails and other for related scenarios . i can do the same in Perl or PHP.but if iam not gaining much(say based on server performance or load) then i think i can go ahead with oracle package. when i tested it i found that its slow . what about the load that it may cause for the server (ours is linux ).
please do give inputs on thisHi Ravi,
Thanks for your reply.
But I am specifically looking at pros and cons for web services. So the thread which you passed to me won't help.
Regards
Nitin. -
How to remove comments in packages in oracle
hi gurus,
can any body help me to remove commented code in packages in oracle?
thanks in advance...The obvious suggestion would be to edit the package (or package body) in whatever editor you prefer and recompile. I'm assuming you know that, however, since you managed to create the package in the first place. If that's not what you're looking for, can you explain a bit more what you're asking?
Justin -
Hi All,
i've been using oracle thin driver for oracle 9i server since a long. but now it gives error like
package import oracle.jdbc.driver.* not found
it seems some problem in classpath.
but i've inludeed classes111.zip/classes12.zip to classpath and with this was working fine. dunno what's the problem . kindly mail me at the earliest to:[email protected]
also i'm working with Tomcat server.
to run the servlet i don't want to type the absolute url like
http://localhost:8080/servlet/test rather http://localhost/test .so how to config it . can ne one tell me asap.
with thanx abd rgds
Sayed
so can u tell me1. Copy classes12.zip to %TOMCAT_HOME\common\lib
2. Go to %TOMCAT_HOME\common\lib dir, rename classes12.zip to classes12.jar
I think someone else has reply same problem before, next time you can do a search before post your problem. -
Installation Deployment Package for Oracle ?
Dear all OTN Members,
I wonder if there is/are any Installation Deployment Package for Oracle just like Deployment Package I ever saw in Visual Basic ?Dear Andrew,
Thx for your suggestion, but actually I had try Project Builder for building the deployment package and I only can install from from Oracle Installer, also I can't create custom shortcut nor icons on desktop (not mention the registry settings yet). For information, me and my customer are using Win2k, so I try to find an executable deployment package. Any further suggestion ?
Thanks in advance.
Regards,
Franko -
Error while sending a mail using UTP_MAIL package in Oracle 10g
Hi,
We are using UTP_MAIL package to send a mail from Oracle 10g.We have follwed the following steps ...
SQL> connect sys/password as sysdba
Connected.
SQL> @$ORACLE_HOME/rdbms/admin/utlmail.sql
Package created.
Synonym created.
SQL> @$ORACLE_HOME /rdbms/admin/prvtmail.plb
Package body created.
SQL > alter system set smtp_out_server = '<mail_server_ip:25>' scope =spfile;
System altered..
Now we try the code
begin
utl_mail.send(
sender => 'sender's mail',
recipients => 'receiver mail',
CC => 'optional',
subject => 'Testing utl_mail',
message => 'Test Mail'
end;
But we get the following error...
ERROR at line 1:
ORA-29278: SMTP transient error: 421 Service not available
ORA-06512: at "SYS.UTL_SMTP", line 21
ORA-06512: at "SYS.UTL_SMTP", line 97
ORA-06512: at "SYS.UTL_SMTP", line 139
ORA-06512: at "SYS.UTL_MAIL", line 405
ORA-06512: at "SYS.UTL_MAIL", line 594
ORA-06512: at line 2
We also tried connecting to the mail server through telnet .But it is not getting connected..
Please help us to solve the issue.From your own posting you may have the clue, if you try to access your mail server through telnet and it is not successful, it means the service is down or there are networking issues.
On pre 10gR2 versions there was a bug 4083461.8. It could affect you if you are on 10gR1
"Bug 4083461 - UTL_SMTP.OPEN_CONNECTION in shared server fails with ORA-29278 Doc ID: Note:4083461.8"
This was fixed on 10gR2 base and on 9.2.0.8.0
~ Madrid
Maybe you are looking for
-
Problem while posting to accounts.posting period 002 2010 not open
Hi experts, Im facing problem while posting to accounting. I ran the live payroll run and while posting im got the incorrect document. System is showing the error message that ""Posting period 002 2010 is not open""" How we have to open the periods
-
HR-ABAP-want user exit for pa30 for creation 2001 infotype for sick leave
Hi ALL, My requirement like, whenever I try to create a sick leave through PA30 Tcode for infotype 2001 then the has to be trigger like, if the personnel joing date will be from Feb-Dec any date of the year then, the SL will be valid for nex
-
Purchase Requisition Release strategy for MRP based Requisition
Hello Gurus We want to set up the urchase Requisition Release strategy for MRP based Requisition ..Any can one Please share your experience about the impact down the road? Thanks Nick
-
System error in program CL_RSMD_RS
Dear gurus, I am gettng an error messg "System error in program CL_RSMD_RS and form IF_RSMD_RS~_READ_META_DATA-02--- BRAIN--- 299",when i try to Clik the Details button for Workcenter in my Query Input Selection screen and do
-
ZEN 4.0.1 server. Regional servers' inventory working, trying to send to our root server. Message in log states Message: 329: The receiver service on the server ZEN1_ZenInvService is currently down. I've tried to start it at the console , but it does