Running a pl/sql stored proc in parallel on Unix

Environment : Sun OS 5.6
Oracle 8.1.6
I have this unix shell (my_shell.sh) that runs every night
which has the following code snippet..
no_of_parallel_runs = <some integer>
while [ $param -lt $no_of_parallel_runs ]
do
y = 'my_sql_shell.sh $param' &
(increment param here)
done
wait
(other processing)
where my_sql_shell.sh is
sqlplus -s [username]/[passwd]@[dbname] <<!
exec my_stored_proc(&&param)
The above would kick off execution of my_stored_proc 'n' number of times
almost simultaneously..
How does this affect performance Vs running the above one after another for
each value of $param?
The procedure does a lot of selects, inserts, updates and deletes.
Thanks in advance.
null

Hi,
We are not having a Web Agent here. So i am unable to use PLSXML utility.
I installed XSU and is now able to create the XML, but with the table attribute names as the tags. So
1. Is there a way I can transform this XML to another XML with custom tags ( using an XSL ) in a PL/SQL procedure ?
2. Is there a way I can install and use PLSXML without the web agent ?
Thanks, Hari

Similar Messages

  • Cf caching ms sql stored procs,

    I'm having trouble with Cf caching ms sql stored procs,
    eg in this one:
      <cfstoredproc  procedure="getUser"   datasource="#datasource#" returncode="true">
          <cfprocparam type="in"  cfsqltype="CF_SQL_VARCHAR" value="#results.SAMAccountName[1]#">
          <cfprocresult name="sp">
        </cfstoredproc>
    I get the same 4 columns returned no matter what the actual sp is in the server.
    any ideas?

    Sorry, I'm not suggesting any corelation between a <cfquery> with a SELECT * in it and suggesting your proc had SELECT * in it.  Just perhaps that whatever mechanism in CF or the JDBC drivers that caches the expected columns from a SELECT * query might also cache them from a PROC call.  There's a loose parallel in that neither actually specify the expected column names, that's all I meant.
    Can you do me a favour? Can you do something like <cfquery datasource="yourDsn">THIS AIN'T VALID SQL</cfquery> and then re-run your proc.  Does that sort it out?  I seem to recall - and now I feel like I'm wasting your time a bit, because I'm really unsure of this - that if one caused an error over the JDBC connection, it cleared itself out and subsequent queries worked fine.  It might work the same for procs.  I'm not suggesting this as a solution: just more info gathering.  This is presupposing it is kinda related to the SELECT * issue.
    I'll try to do some experimentation when I get home tonight, but I've got some docs to write and stuff so not sure whether I'll get to it.
    Adam

  • Can we call a Java Stored Proc from a PL/SQL stored Proc?

    Hello!
    Do you know how to call a Java Stored Proc from a PL/SQL stored Proc? is it possible? Could you give me an exemple?
    If yes, in that java stored proc, can we do a call to an EJB running in a remote iAS ?
    Thank you!

    For the java stored proc called from pl/sql, the example above that uses dynamic sql should word :
    CREATE OR REPLACE PACKAGE MyPackage AS
    TYPE Ref_Cursor_t IS REF CURSOR;
    FUNCTION get_good_ids RETURN VARCHAR2 ;
    FUNCTION get_plsql_table_A RETURN Ref_Cursor_t;
    END MyPackage;
    CREATE OR REPLACE PACKAGE BODY MyPackage AS
    FUNCTION get_good_ids RETURN VARCHAR2
    AS LANGUAGE JAVA
    NAME 'MyServer.getGoodIds() return java.lang.String';
    FUNCTION get_plsql_table_A RETURN Ref_Cursor_t
    IS table_cursor Ref_Cursor_t;
    good_ids VARCHAR2(100);
    BEGIN
    good_ids := get_good_ids();
    OPEN table_cursor FOR 'SELECT id, name FROM TableA WHERE id IN ( ' &#0124; &#0124; good_ids &#0124; &#0124; ')';
    RETURN table_cursor;
    END;
    END MyPackage;
    public class MyServer{
    public static String getGoodIds() throws SQLException {
    return "1, 3, 6 ";
    null

  • Save prompted sql stored proc parm values in rpt file from designer

    How can I save the last prompted sql stored proc parameter values from within the CR designer.  In other words I want to hard code some of the parameter values (the rest are passed) so that CR does not prompt at run time.  I am running CR Developer XI R2 SP1 from within VS.Net 2005 (Winforms)

    Please re-post if this is still an issue to the .NET Development - Crystal Reports Forum or purchase a case and have a dedicated support engineer work with you directly

  • BPEL process to Insert XML into DB using pl/sql stored proc

    Hi,
    We have created a BPEL process in which we are taking input request and store it into Oracle Database using PL/SQL proc.
    We have been unsuccessful in doing so because the data stored in table has root element missing.
    Has any body done this (insert xml into DB using pl/sql stored proc) successfully ?
    We can so this successfully if we do not use stored procedure and store data directly in table.
    Regards

    I have done this, stored it as a CLOB.
    Also I received the payload as an opaque schema, so I had to convert the message from binary into string.
    This way the root element doesn't get removed.
    cheers
    James

  • Item Type Based on PL/SQL stored proc causing errors

    I am getting the following error when I add this item type based on a pl/sql stored proc that generates html based on the stored proc... the stored proc returns find but the other porlets get Error Message in there headers and in the porlet content I get:
    Error: The listener returned the following Message: 503 Service Unavailable....
    I also get the same error if I click on a link that is generated from my stored proc for the entire page I get the error:
    Error: The listener returned the following Message: 503 Service Unavailable
    and get nothing else returned...

    Greetings
    I suggest you take a look at the following page and have a look on how to create portlets. Since the PL/SQL PDK allows you to create your own portlets inside the Oracle Database there should be no problem for creating the content inside a portlet the way you want it.
    http://www.oracle.com/technology/products/ias/portal/pdk.html
    Best regards
    Johan

  • URGENT!! Generating XML in a PL/SQL stored proc

    Hi,
    I need to generate XML from a PL/SQL stored proc.
    I need to do it in Oracle 7.3.4 as well as 8.1.6 databases.
    I need to have my own defined tags in the xml.
    Say I have the table Person like
    Person (
    id number,
    fname varchar2(40),
    lname varchar2(40)
    I need a stored proc will will select * from Person and output the data in XML form as
    <Person Names>
    <Employee>
    <First Name personid="<<value from id field>>">
    <<value from fname field>>
    </First Name>
    <Last Name>
    << value from lname field>>
    </Last Name>
    </Employee>
    </Person Names>
    I want to minimise hard coding also.
    how can I do this ? any pointers ?
    Thanks in advance, Hari
    null

    Hi,
    We are not having a Web Agent here. So i am unable to use PLSXML utility.
    I installed XSU and is now able to create the XML, but with the table attribute names as the tags. So
    1. Is there a way I can transform this XML to another XML with custom tags ( using an XSL ) in a PL/SQL procedure ?
    2. Is there a way I can install and use PLSXML without the web agent ?
    Thanks, Hari

  • Arrays to pl/sql stored proc.

    How can I send a java array
    to a pl/sql stored proc.
    I've understood that I have to something like this
    ArrayDescriptor desc = ArrayDescriptor.createDescriptor(<sql_type_name>, conn);
    ARRAY newArray = new ARRAY(desc, conn, java_array);
    But what do I use as sql_type_name ?
    /guha
    null

    I trust you have tried using java.sql.array datatype. This is the SQL3 datatype supported by the 8.1.6 drivers.
    You would find detailed pointers at http://technet.oracle.com/tech/java/jroadmap/jdbc/listing.htm
    Narayan.
    null

  • Parsing Column Value. SQL / Stored Proc/ Function ?

    Hi,
    I just started writing SQL. Need your valuable input for the following query,
    Need to query a table and parse a column to produce a desired output.
    like suppose my column value is
    #ADFA
    /SDFGAS
    {ABC}: 123
    {BCA}: 456
    {DEF}: 789
    and i need to get an out put as follows
    {ABC} {BCA} {DEF}
    123 456 789
    so the patterns are defined.
    I some how tried and reached through SQL, but there should be better way than this. So posted this question.
    I tried using SQL itself (using substr, instr & decode functions in the select statement)... with out using stored proc/ function as i have not created one earlier.. I am just learning the syntax and trying it.
    The psuedo code i have planned is
    function substring(column_value, search_string)
    var start_index NUMBER;
    var end_index NUMBER;
    var result VARCHAR2;
    result = 'N/A';
    start_index = instr(column_value, search_string) + 4
    if start_index >= 4
    end_index = instr(substr(column_value, 0, start_index), CHR(13)-1)
    if start_index >= 4 && end_index >=0
    result = substr(column_value, start_index, end_index);
    return result;
    I just wrote it like writing in a programming language. Need to implement this through Stored Proc/ Function. Please let me know your comment on this

    Oops, I think regular expressions are not available in my current oracle version :-(
    I am having Oracle 9i.
    Got it.. Yes it is available from 10G onwards.. :-(
    Message was edited by:
    Thiru.Thiru

  • Passing int[] parameter to PL/SQL stored proc via SQLJ

    This should be easy. I want to pass an array of Java integers i.e. int[] as an IN parameter to a PL/SQL stored procedure that expects a TABLE OF INTEGER.
    But SQLJ keeps giving me an error when I try to call the procedure, saying that int[] is an unsupported Java type.
    Is this true? Is it really impossible to pass a simple int array into a PL/SQL procedure via SQLJ?
    All help will be gratefully received.
    Chris

    Yes, you cannot pass int[], since index-by-tables are not supported by either JDBC or by SQLJ.
    (Well, I lied just a little bit: if you use an 8.1.7 or later JDBC-OCI driver, then there is some support for scalar index-by-tables. But not with thin, kprb drivers, or with SQLJ.)
    null

  • Exposing/Publishing PL/SQL Stored Procs as Web Services

    Has anyone come up with a way to publish PL/SQL stored procedures as web services? Our team already has sufficient knowledge in deploying EJBs and exposing them as services but we're curious to see if we can create services without building and deploying an EJB as the provider mechanism.
    Any ideas/guidance are appreciated!

    In JDeveloper 10 you can do it. check that article
    But in 11g version they hide that option :(
    [some info|http://forums.oracle.com/forums/thread.jspa?messageID=3237164&#3237164]
    Edited by: August_ on Apr 19, 2009 11:52 PM

  • Passing parameters from Excel to SQL stored proc. to analyse resultset in PowerPivot

    Hi,
    Not sure if I posted this question at the right forum ...
    I would like to implement the following scenario:
    - Enter parameters @startdate and @enddate in cells in an Excel worksheet (i.e. cell A2 has the value for the startdate parameter; cell B2 has the value for the endate parameter).
    - Pass these parameters to a SQL stored procedure (using MSQuery?). See below.
    - Calling stored procedure in PowerPivot to get the resultset in PowerPivot.
    The SP calls some functions in SQL Server. See below.
    I have read several posts on several forums but I can't get the parameters from Excel (MSQuery?) to the SP.
    What's the best way to have PowerPivot picking up the resultset from the SP?
    How do I get the Excel cells A2 and B2 to the SP below?
    SP:
    USE [Test]
    GO
    /****** Object: StoredProcedure [dbo].[_Pink_SP_CapaciteitTest] Script Date: 29-7-2014 15:41:04 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER PROCEDURE [dbo].[_Pink_SP_CapaciteitTest]
    @startdate DATETIME,
    @enddate DATETIME
    AS
    BEGIN
    SET NOCOUNT ON
    SET DATEFIRST 1
    DECLARE @TempCapacity TABLE
    ResourceNo INT,
    ResourceName NVARCHAR(60),
    JobCode NVARCHAR(12),
    JobDescription NVARCHAR(50),
    CostcenterCode NCHAR(8),
    CostcenterDescription NVARCHAR(50),
    CostcenterClass NVARCHAR(30),
    CostcenterClassDescription NVARCHAR(60),
    Date DATETIME,
    Weekday INT,
    WeekNo INT,
    Month INT,
    Year INT,
    Capacity FLOAT,
    ConsultancyTot FLOAT,
    ConsultancyTotReserved FLOAT,
    Sick FLOAT,
    Doctor FLOAT,
    Pregnant FLOAT,
    Vacation FLOAT,
    VacationCancellation FLOAT,
    SpecialLeave FLOAT,
    CompHours FLOAT,
    Support FLOAT
    INSERT INTO @TempCapacity
    SELECT h.res_id AS ResourceNo,
    h.fullname AS ResourceName,
    h.job_title AS JobCode,
    j.descr50 AS JobDescription,
    h.costcenter AS CostcenterCode,
    cc.oms25_0 AS CostcenterDescription,
    ccc.CostcenterClassCode AS CostcenterClass,
    ccc.Description AS CostcenterClassDescription,
    CONVERT(VARCHAR(10), t.datum, 105) AS [Date],
    DATEPART(DW, t.datum) AS [Weekday],
    (SELECT [dbo].[ISOWeekNumber] (t.datum)) AS WeekNo,
    MONTH(t.datum) AS [Month],
    YEAR(t.datum) AS [Year],
    (SELECT ROUND([dbo].[HRCapacityHours] (h.res_id, t.datum, t.datum), 2)) AS Capacity,
    (SELECT ISNULL([dbo].[HRAbsenceHours] (50, h.res_id, t.datum, t.datum + 1), 0)) AS ConsultancyTot,
    (SELECT ISNULL([dbo].[HRAbsenceHours] (51, h.res_id, t.datum, t.datum + 1), 0)) AS ConsultancyTotReserved,
    (SELECT ISNULL([dbo].[HRAbsenceHours] (9538, h.res_id, t.datum, t.datum + 1), 0)) AS Sick,
    (SELECT ISNULL([dbo].[HRAbsenceHours] (8531, h.res_id, t.datum, t.datum + 1), 0)) AS Doctor,
    (SELECT ISNULL([dbo].[HRAbsenceHours] (9924, h.res_id, t.datum, t.datum + 1), 0)) AS Pregnant,
    (SELECT ISNULL([dbo].[HRAbsenceHours] (8501, h.res_id, t.datum, t.datum + 1), 0)) AS Vacation,
    (SELECT ISNULL([dbo].[HRAbsenceHours] (8551, h.res_id, t.datum, t.datum + 1), 0)) AS VacationCancellation,
    (SELECT ISNULL([dbo].[HRAbsenceHours] (8511, h.res_id, t.datum, t.datum + 1), 0)) AS SpecialLeave,
    (SELECT ISNULL([dbo].[HRAbsenceHours] (9518, h.res_id, t.datum, t.datum + 1), 0)) AS CompHours,
    (SELECT ISNULL([dbo].[HRAbsenceHours] (3200, h.res_id, t.datum, t.datum + 1), 0)) AS Support
    FROM humres h (NOLOCK)
    LEFT OUTER JOIN hrjbtl j (NOLOCK) ON h.job_title = j.job_title
    LEFT OUTER JOIN kstpl cc (NOLOCK) ON h.costcenter = cc.kstplcode
    LEFT OUTER JOIN CostcenterClasses ccc (NOLOCK) ON cc.Class_01 = ccc.CostcenterClassCode AND ccc.ClassID = 1
    CROSS APPLY (SELECT * FROM [dbo].[AllDays] (@startdate, @enddate)) t
    WHERE h.ldatindienst <= t.datum
    AND ISNULL(h.ldatuitdienst, t.datum) >= t.datum
    AND h.fullname NOT LIKE '%inhuur%'
    AND h.emp_type IN ('E', 'C')
    AND h.job_title IN ('F09CONS', 'F09PRIN')
    ORDER BY h.fullname,
    t.datum
    SELECT * FROM TempCapacity
    END
    Thanks!

    Hi,
    According to your description, I think you want to call a store procedure in PowerPivot with the parameters which are stored in the cells of an Excel workbook.
    Are you using the PowerPivot add-in in Excel or PowerPivot in SQL Server?
    This forum is to discuss problems of Office development such as VBA, VSTO, Apps for Office .etc. If you are using Excel PowerPivot, since it is an add-in for Excel and it doesn't publish API for us, we cannot automatically call a stored procedure in Excel.
    We can get the data from Cells A2 and B2 with code, but it's hard to set it as the parameters of a SP when calling it from PowerPivot. About calling a SP from Excel manually, you could post in
    Excel IT pro forum for more effective responses.
    If you are using PowerPivot in SQL Server, I'm afraid your issue is more related to the feature of PowerPivot. We can get data from SQL Server database into Excel workbook, but I'm not sure whether we can get data from Excel cells in SQL Server. So I suggest
    you posting in
    SQL Server PowerPivot forum for more effective responses.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to run a pl/sql stored procedure as a concurrent program

    Hi All,
    I created a package PURGE_DEAL_REQUESTS. It contains a procedure QPR_DELETE_CANCELLED_REQUESTS. I want to run this stored procedure as concurrent program in ebs suite....
    Can anyone tell me how to run this procedure as a concurrent program(in ebs suite).....?
    Thanks
    Swathi.

    You need to add the concurrent program to the group of the responsibility that will run the report. For more details, please refer to:
    Note: 73492.1 - Creating a PL/SQL Concurrent Program in Oracle Applications
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=73492.1
    Note: 133991.1 - How to Register a Custom Report
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=133991.1

  • Running scripts in a stored proc

    Does anyone know how to run a script within a stored procedure in Oracle on a Windows 2000 server. I have a script called test.sql which i want to run but when i execute the stored procedure I get an error stating that it is an invalid SQL statement. I have tried two different methods within the stored procedure. The first being
    execute statement := '@D:/file1/test.sql';
    EXECUTE IMMEDIATE execute_statement;
    The second was just
    @D:/file1/test.sql; OR
    start D:/file1/test1.sql;
    They all gave the same error. If anyone could provide some information on how to do this within the stored procedure it would be greatly appreciated. Thank you.
    null

    Troy, did you ever find them?
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Troy Pearce ([email protected]):
    Rick, would you be able to tell me specifically where these forums are located??<HR></BLOCKQUOTE>
    null

  • Select in pl/sql stored proc.

    Hi friends,
    I am new to oracle development and were trying to write some basic stored procedure,when i try to put a simple stored select statment in between my 'BEGIN' and 'END' clause it never let me do that,it says that 'INTO' clause is expected,I do not want to store andy specific value in any variable i just want a list of all records from that table,Is there any restriction regarding that,can't I do it,am I doing something wrong.?
    If any one of u gentalmen can help me,I will be obliged to u .
    Thanks a lot.

    This is somewhat basic.
    We always have to have a receptacle for the result set. In SQL*Plus that receptacle is the screen, hence we can dispense with an explicit INTO clause. PL/SQL is a batch process which doesn't write to the screen, so we have to define variables to hold the data.
    PL/SQL gives ius options. Wwe can define our SELECT statement as an explicit cursor, in case we don't need to include the INTO clause in our SELECT but we still have to FETCH the cursor INTO a record. Or we can use an implicit cursor, with an INTO clause.
    Those are the rules.
    You might find it helpful to read the manual. This link will take you to a page that includes some helpful info; one of the links will take you to the online Oracle documentation.
    Re: How to attach a java bean in forms6i
    Good luck, APC

Maybe you are looking for

  • Open Directory authentication question

    I have 2 Apple servers.  One is running 10.6 (server), the other is running 10.5 (server).  I have my Open Directory on the 10.6 server, and I have the 10.5 server use it via LDAP for user authentication.  What I'd like to do is to assign a home dire

  • A critical program error has occured while opening workbook

    Dear friends, A critical error has occured while opening workbook. The issue is that the same workbook is opening in some one machine but not in others.The following Dialog box is poping out when tried to open workbook: "A critical program error has

  • Suddenly I don't have any sound and the mute is not on

    I have checked the systems preference under sound and the only output device that shows is internal speakers   built in output.  The mute is not on either the system as a whole and in iTunes.  There is no voice, no music, no sound at all.  I have reb

  • Question abotu String.format() functionality

    Hello all, I am curious as to whether this functionality exists in the String.format method, or if there is any other class in the current version of Java that would allow for this. I want to construct a format string, where if one of the args contai

  • The Crystal Reports charting component (sscsdk80.dll) could not be found

    Here's our situation.  One of our accounting staff installed the upgrade to SP1 for CR 2008, after which Calculated Members & Embedded Summaries in Cross-Tab objects would not function.  He tells me he searched these forums and that the problem is a