Remove Invocation to a Function or Stored Procedure

Hi,
This is regarding invoking functions, stored procedures remotely, from Oracle database to another Oracle database. This call is going to be made from databases set in different networks, and using plain PL-SQL. When the remote database receives the call it will start processing thousands of records, this operation is estimated to last at least an hour.
Our question is related to session's time out, would the database that made the call time out because the remote database is taking too long to respond (in this case, too long to process the records)?
Thank you.

user3112983 wrote:
Hi,
This is regarding invoking functions, stored procedures remotely, from Oracle database to another Oracle database. This call is going to be made from databases set in different networks, and using plain PL-SQL. When the remote database receives the call it will start processing thousands of records, this operation is estimated to last at least an hour.By thousands do you mean hundreds of thousands, millions or more? If your application can only process a thousand records in an hour i'd say there's some process tuning to be done :)
Our question is related to session's time out, would the database that made the call time out because the remote database is taking too long to respond (in this case, too long to process the records)?
Thank you.If you expect the duration to be that long, why not have the client (database A) submit a job to the server (database B) ? You could achieve that by creating a procedure on database B which submits a job via DBMS_JOB.
One option anyway.

Similar Messages

  • Function in stored procedure

    Hello,
    I'm using RPAD function in stored  procedure 4 times in one query and then inserting to another table. from dm_exec_sql_text table I see that every time that procedure approach to Rpad function it's open and closing in the and so it's open and closing
    function 4 times per one row, If I have 1000 rows to insert the function will open and close 4000 times and it's very slow.
    My question if there is some way to change this functionality of open / close function every time ?
    Thank You
    Daniel

    Yes, avoid using UDF  , means especially a scalar udf... See how you can re-write a scalar udf  as table valued udf.
    http://sqlblog.com/blogs/alexander_kuznetsov/archive/2008/05/23/reuse-your-code-with-cross-apply.aspx
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Trouble referencing return values of a Function in Stored Procedure

    Hello all,
    I have the following Function and Stored Procedure (simplified for this post). The error I am getting is in the SELECT, WHERE clause of the UPDATE command. My function is returning a sys_refcursor and I am trying to reference column names but keep getting the error
    ORA-00904: "PUBLISHEDDOCVERSIONID": invalid identifier
    What am I doing wrong?
    Function
    CREATE OR REPLACE FUNCTION &HKDB_Schema_Name..QueryKnowdeDocVersion(aKGID int)
    RETURN sys_refcursor
    IS
    aCur sys_refcursor;
    BEGIN
    OPEN aCur FOR
    SELECT pkd.KnowdeID as "PublishedKnowdeID", pkd.DocumentID as "PublishedDocID", pkd.VersionID as "PublishedDocVersionID"
    FROM KnowdeDocument pkd
    WHERE pkd.KGID = aKGID;
    RETURN aCur;
    END;Stored Procedure
    UPDATE KnowdeDocument
    SET DocumentID = (SELECT PublishedDocID FROM (SELECT QueryKnowdeDocVersion(aKGID, aPublishedKGID, aTextVersionID) FROM DUAL)
                      WHERE PublishedKnowdeID = KnowdeDocument.KnowdeID
                      AND PublishedDocID = KnowdeDocument.DocumentID
                      AND ((PublishedDocVersionID is NULL and KnowdeDocument.VersionID is NULL) OR (PublishedDocVersionID is not NULL AND
                               PublishedDocVersionID = KnowdeDocument.VersionID)))Regards,
    Toby

    Hi redeye,
    Your select is from:
    (select queryknowdedocversion(akgid
                                  ,apublishedkgid
                                  ,atextversionid)
                         from dual)This has no publisheddocversionid. Unfortunately I cannot figure out what you are trying to do with that ref_cursor.
    Edit:
    Or perhaps publisheddocversionid is a column in KnowdeDocument? Could this be case sensitive as well? (Bad idea to use quotations when naming things)
    Regards
    Peter
    Edited by: Peter on Aug 24, 2009 3:39 AM

  • Create a View, function or stored procedure for query?

    Hi All,
    I like to know how I can create a view or function for the query below. If its going to be a function or stored procedure will I be able to union it with another view?
    DECLARE
    @BegDate DATE,
    @EndDate DATE
    SELECT
    @BegDate = MIN(vl.VoidStartDate),
    @EndDate = MAX(vl.LetDate)
    FROM #VoidLoss vl
    ;WITH d(d) AS (
    SELECT TOP (DATEDIFF(dd, @BegDate, @EndDate))
    DATEADD(dd, ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) -1, @BegDate)
    FROM sys.all_objects o
    ), cal AS (
    SELECT
    d.d,
    MONTH(d.d) AS m,
    YEAR(d.d) AS y
    FROM d
    SELECT
    vl.History_IND,
    vl.PropCode,
    vl.VoidCategory,
    vl.ControlGroup,
    CASE WHEN vl.VoidStartDate < MIN(cal.d) THEN MIN(cal.d) ELSE vl.VoidStartDate END AS VoidStartDate,
    CASE WHEN vl.LetDate > MAX(cal.d) THEN MAX(cal.d) ELSE vl.LetDate END AS LetDate,
    vl.MarketRent,
    DATENAME(mm, CAST('1900-' + CAST(cal.m AS VARCHAR(2)) + '-1' AS DATE)) AS [Month],
    cal.y AS [Year],
    COUNT(*) AS DaysVoid,
    COUNT(*) * vl.MarketRent AS VoidLoss
    FROM
    #VoidLoss vl
    JOIN cal
    ON cal.d BETWEEN DATEADD(dd, 1, vl.VoidStartDate) AND vl.LetDate
    GROUP BY
    vl.History_IND,
    vl.PropCode,
    vl.VoidCategory,
    vl.ControlGroup,
    vl.VoidStartDate,
    vl.LetDate,
    vl.MarketRent,
    cal.m,
    cal.y
    ORDER BY
    vl.History_IND,
    vl.PropCode,
    vl.VoidStartDate
    Thanks

    A view or an inline-function is a single query, so this part does not fit in:
    DECLARE
    @BegDate DATE,
    @EndDate DATE
    SELECT
    @BegDate = MIN(vl.VoidStartDate),
    @EndDate = MAX(vl.LetDate)
    FROM #VoidLoss vl
    And you cannot have it multi-statement function either, since you cannot refer to temp tables in such a function. In any case, using a multi-statement function in a view definition or nest it in another function definition is likely to be a performance disaster.
    The sole alternative that remains as long as you have the temp table is a stored procedure. You cannot use a stored procedure in a view or a function.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Function calling stored procedure that returns a cursor into a LOV

    Hello,
    Is it possible in HTML DB to implement a process that has a function that calls a stored procedure that returns a cursor, used to then populate a select list?
    Or can I do a function call to a stored procedure in the 'List of values definition' box for the item itself that returns a cursor to populate the item's select list?

    Hi Vikas,
    Actually, I just found another posting that shows how to do what I'm looking for:
    Re: Filling a LOV with a cursor
    Check it out. I posted another question in response to that discussion...maybe you could answer that? Thanks!
    Laura

  • Calling Function in Stored Procedure

    Hi all,
    I've created table below,
    CREATE TABLE TEST
      ID                  NUMBER(3)    NOT NULL,
      selectcode          VARCHAR2(10),
      value_use           VARCHAR2(10),
      bin_no              NUMBER(10),
      markup              VARCHAR2(40),
      descr               VARCHAR2(100),
      value_imp           VARCHAR2(90)
    create sequence idseq;
    insert into test values (idseq.nextval,'rel','C1',1,'master','test1');
    insert into test values (idseq.nextval,'rel','C1',1,'masterdir','test2');
    insert into test values (idseq.nextval,'rel','C1',2,'master','test3');
    insert into test values (idseq.nextval,'rel','C2',2,'masterdir','test4');
    insert into test values (idseq.nextval,'rel','C2',2,'master','test5');
    insert into test values (idseq.nextval,'rel1','C2',1,'master','test6');
    insert into test values (idseq.nextval,'rel1','C2',1,'masterdir','test7');
    select * from test;
    ID     SELECTCODE     VALUE_USE      BIN_NO     MARKUP                  DESCR
    1         rel                C1              1     master                  test1
    2         rel                C1              1     masterdir          test2
    3         rel            C1              2     master                  test3
    4         rel                C2            2     masterdir          test4
    5         rel                C2              2     master                  test5
    6         rel1        C2              1     master                   test6
    7         rel1           C2              1     masterdir            test6There is an existing function called valcon which returns data for value_imp based on value_use and markup in the table.
    SQL>select valcon ('C1','master',' ','VALUE',' ') output from dual;
    OUTPUT
    Value In County
    I created a stored procedure, to insert values to this table using this function.. But I'm not sure how to pass the value inside the function..
    CREATE OR REPLACE PROCEDURE test_sp
      ( in_selectcode    IN varchar2,
        in_valueuse      IN varchar2
    AS
    cursor val_cur is
        select *
        from test
        where ....;
    TYPE val_typ IS TABLE OF val_cur%ROWTYPE;
    val_arr  val_typ;
    begin
    open cursor..
    fetch cursor into val_arr;
    FOR ..
      LOOP
         insert into test (id, selectcode, value_use, selectval,value_imp)
         select  id_seq.nextval, in_selectcode, 'C1',  Nvl2(Trim(in_selectcode),'Y','N'),
         valcon ('val_arr.value_use','val_arr.markup',' ','VALUE',' ')
         from dual;
    end loop;
    close cursor;
    end;
    end test_sp
    / Since i'm using an array, can you please tell me how I can pass 'val_arr.value_use' as a string in the function? I researched a lot to find this, but I couldnt find how I can do this.
    Thank you

    I've used an update query to update test.bin_no in a sequence for the same selectcode and value_use. But I'm trying to see if I can do this within the insert query so I dont have to duplicate the work with one insert and one update.
    The procedure below works with update query:
    CREATE TABLE TEST
      ID                  NUMBER(3)    NOT NULL,
      selectcode          VARCHAR2(10),
      value_use           VARCHAR2(10),
      bin_no              NUMBER(10),
      markup              VARCHAR2(40),
      descr               VARCHAR2(100),
      value_imp           VARCHAR2(90)
    create sequence idseq;
    insert into test (id,selectcode,value_use,bin_no,value_imp) values (idseq.nextval,'rel','C1',1,'Y');
    insert into test (id,selectcode,value_use,bin_no,value_imp) values (idseq.nextval,'rel','C1',1,'Y');
    insert into test (id,selectcode,value_use,bin_no,value_imp) values (idseq.nextval,'rel','C1',2,'Y');
    insert into test (id,selectcode,value_use,bin_no,value_imp) values (idseq.nextval,'rel','C2',2,'Y');
    insert into test (id,selectcode,value_use,bin_no,value_imp) values (idseq.nextval,'rel','C2',2,'Y');
    insert into test (id,selectcode,value_use,bin_no,value_imp) values (idseq.nextval,'rel1','C2',1,'Y');
    insert into test (id,selectcode,value_use,bin_no,value_imp) values (idseq.nextval,'rel1','C2',1,'Y');
    select * from test;
    ID     SELECTCODE     VALUE_USE      BIN_NO     VALUE_IMP     
    1         rel                C1              1     Y           
    2         rel                C1              2     Y         
    3         rel            C1              2     Y          
    4         rel                C2            2     Y  
    5         rel                C2              2     Y                
    6         rel1        C2              1     Y            
    7         rel1           C2              1     Y      
    CREATE OR REPLACE PROCEDURE test_sp (in_selectcode   IN VARCHAR2,
                                         in_valueuse     IN VARCHAR2
                                        ) AS
      msg   VARCHAR2 (4000);
    BEGIN
      INSERT INTO test (id, selectcode, value_use, bin_no, selectval, value_imp
        SELECT   id_seq.NEXTVAL,
                 in_selectcode,
                 'C1',
                 bin_no,
                 NVL2 (TRIM (in_selectcode), 'Y', 'N'),
                 valcon (value_use, markup, ' ', 'VALUE', ' ')
        FROM     kn_job
        WHERE    scode= in_selectcode;
         update test t
         set t.bin_no = (select t1.r from
                  (select rowid, ROW_NUMBER() OVER(PARTITION BY in_selectcode, in_valueuse ORDER BY id asc) r from test) t1
                  where t.rowid=t1.rowid);
    end test_sp
    select * from test;
    ID     SELECTCODE     VALUE_USE      BIN_NO     VALUE_IMP     
    1         rel                C1              1     Y           
    2         rel                C1              2     Y         
    3         rel            C1              3     Y          
    4         rel                C2            1     Y  
    5         rel                C2              2     Y                
    6         rel1        C2              1     Y            
    7         rel1           C2              2     Y       But is it possible to do this without an update query? Updating bin_no in a sequence for selectcode,value_use?
    Thanks

  • Difference between Function and Stored Procedure

    Hi guys, i don't understand the exact difference between a function and a stored procedure. I did lot of google but still. Can somebody explain in simple words. Thanks.

    Hi,
    Here's an example of a user-defined function:
    CREATE OR REPLACE FUNCTION     factorial
    (      in_num       IN     PLS_INTEGER
    RETURN     PLS_INTEGER
    DETERMINISTIC
    IS
    BEGIN
         IF  in_num IS NULL
         THEN
              RETURN     NULL;
         ELSIF in_num <= 1
         THEN
              RETURN  1;
         ELSE
              RETURN  in_num * factorial (in_num - 1);
         END IF;
    END     factorial;
    SHOW ERRORSThis function retruns an integer. You can use the function (or, more properly, the integer that it returns) anywhere an integer expression is allowed.
    For example
    SELECT     ROWNUM
    ,     factorial (ROWNUM)     AS f
    ,     loc
    ,     SUBSTR ( loc
                , 1
                , factorial (ROWNUM)
                )          AS s
    FROM     scott.dept;Output:
    `   ROWNUM          F LOC           S
             1          1 NEW YORK      N
             2          2 DALLAS        DA
             3          6 CHICAGO       CHICAG
             4         24 BOSTON        BOSTON

  • Where are User Defined Functions and Stored Procedures kept in SQL Server?

    Hi,
    I have a growing list of Stored Procedures and User-Defined Functions in SQL Server, and would like to be able to list all my user SP and UDF easily.
    Is it possible to write a query to list all SP and UDF?
    I saw the following specimen code in an SQL book, but am not sure this is what I need because I could not make it work.
    SELECT *
        FROM INFORMATION_SCHEMA.ROUTINES
    WHERE SPECIFIC_SCHEMA = N'CustomerDetails'
        AND SPECIFIC_NAME = N'apf_CusBalances'
    I tried:
    SELECT *
        FROM INFORMATION_SCHEMA.ROUTINES
    but it does not work.
    Suppose all my SP are named following this pattern:
        dbo.usp_Storeproc1
    How would I modify the above code? or is there a better code?
    Thanks
    Leon Lai

    Hi ,
    try this to get list of all stored procedures:
    SELECT *
    FROM sys.procedures where name like 'dbo.usp%'
    Thanks,
    Neetu

  • How to call CLOB to BLOB conversion function within stored procedure?

    I have a tiny APEX application from which I need to be able to print. I’ve used these two resources: (Is there an inexpensive APEX report printer for invoices/checks/statements? and http://download.oracle.com/docs/cd/E14373_01/appdev.32/e13363/up_dn_files.htm#CJAHDJDA)
    I guess that in order to be able to download the RTF document stored in CLOB, I need to convert it into BLOB. I’ve found this function for this purpose on Oracle forums:
    CREATE OR REPLACE FUNCTION     c2b( c IN CLOB ) RETURN BLOB
    -- typecasts CLOB to BLOB (binary conversion)
    IS
              pos PLS_INTEGER := 1;
              buffer RAW( 32767 );
              res BLOB;
              lob_len PLS_INTEGER := DBMS_LOB.getLength( c );
    BEGIN
         DBMS_LOB.createTemporary( res, TRUE );
         DBMS_LOB.OPEN( res, DBMS_LOB.LOB_ReadWrite );
    LOOP
         buffer := UTL_RAW.cast_to_raw( DBMS_LOB.SUBSTR( c, 16000, pos ) );
         IF          UTL_RAW.LENGTH( buffer ) > 0
         THEN
                   DBMS_LOB.writeAppend( res, UTL_RAW.LENGTH( buffer ), buffer );
         END IF;
         pos := pos + 16000;
         EXIT WHEN pos > lob_len;
    END LOOP;
    RETURN res; -- res is OPEN here
    END c2b;And I am trying to use it in the modified download procedure that I also have found on Oracle forums:
    CREATE OR REPLACE PROCEDURE DOWNLOAD_WO(v_id IN NUMBER)
    AS
            v_mime          VARCHAR2(48);
            v_length     NUMBER;
            v_file_name     VARCHAR2(2000):= 'WO_Download.rtf';
            lob_loc          CLOB;
              v_blob      BLOB;
              v_company        jobs_vw.company%TYPE;
              v_project        jobs_vw.project%TYPE;
              v_description     jobs_vw.description%TYPE;
              v_date_          jobs_vw.date_%TYPE;
              v_job_no          jobs_vw.job_no%TYPE;
              v_apqwo               jobs_vw.apqwo%TYPE;
    --          v_mime           VARCHAR2(48) := 'application/msword';
    BEGIN
            SELECT     mime_type, report, DBMS_LOB.GETLENGTH(report)
              INTO     v_mime,lob_loc,v_length
              FROM     report_layouts
              WHERE     rl_id = 22332925279634283;
    -- JOB_VW record:
        SELECT     job_no
                   ,date_
                   ,description
                   ,apqwo
                   ,project
                   ,company       
         INTO     v_job_no
                   ,v_date_
                   ,v_description
                   ,v_apqwo
                   ,v_project
                   ,v_company
         FROM     jobs_vw
         WHERE     id = 214;
    -- Replace holders with actual values:
        lob_loc := REPLACE(lob_loc, '#COMPANY#', v_company);
        lob_loc := REPLACE(lob_loc, '#PROJECT#', v_project);
        lob_loc := REPLACE(lob_loc, '#DESCRIPTION#', v_description);
        lob_loc := REPLACE(lob_loc, '#DATE_#', TO_CHAR(v_date_, 'DD/MM/YYYY'));
        lob_loc := REPLACE(lob_loc, '#JOB_NO#', v_job_no);
        lob_loc := REPLACE(lob_loc, '#APQWO#', v_apqwo);
                  -- set up HTTP header
                        -- use an NVL around the mime type and
                        -- if it is a null set it to application/octect
                        -- application/octect may launch a download window from windows
                        owa_util.mime_header( nvl(v_mime,'application/octet'), FALSE );
                    -- set the size so the browser knows how much to download
                    htp.p('Content-length: ' || v_length);
                    -- the filename will be used by the browser if the users does a save as
                    htp.p('Content-Disposition:  attachment; filename="'||replace(replace(substr(v_file_name,instr(v_file_name,'/')+1),chr(10),null),chr(13),null)|| '"');
                    -- close the headers           
                    owa_util.http_header_close;
                    -- download the BLOB
    --                wpg_docload.download_file( Lob_loc );
                             v_blob := c2b(lob_loc);
                             wpg_docload.download_file( v_blob );
    end DOWNLOAD_WO;
    /Unfortunately when I try to compile the download_wo stored procedure I am getting this error:
    Error at line 64: PL/SQL: Statement ignoredThe 64th line is:
    v_blob := c2b(lob_loc);How should I correctly call c2b within download_wo? Any advice is greatly appreciated.
    Thank you for your time.
    Daniel

    Hello there,
    Well, its invalid :(
    Object C2B is Invalid. I didn't know since when I run the create ... function, I only get this feedback:
    Statement processed.
    0.19 secondsI am investigating.
    Daniel

  • Oracle function in stored procedure to retreive particular table name

    Hi,
    I need to delete a table 'xxsys_dram_flatproperties' from database given model name as 'dram-model'.
    the model name can be any thing.corresponding table name will be[i] 'xxsys_<modelname>_flatproperties'.
    I wrote stored procedure .I am able to retrieve all the tables in the database using user_tables.Is there any funtion in oracle like
    if table name contains letters that are there in model name.
    Pleasehelp.

    Suppose all your tables created in the schema 'temp'
    and you are absolutly sure you want to drop only tables which have for example '_model3_' in its name (nothing else should have same part in your schema)
    then try a simple solution:
    CREATE TABLE temp.xx_model3_01 (col1 NUMBER)
    CREATE TABLE temp.xx_model3_02 (col1 NUMBER)
    SELECT table_name from all_tables where OWNER = 'TEMP' and table_name LIKE '%_MODEL3_%'
    TABLE_NAME                   
    XX_MODEL3_01                 
    XX_MODEL3_02
    DECLARE
       CURSOR c1
       IS
          (SELECT table_name
             FROM all_tables
            WHERE owner = 'TEMP' AND table_name LIKE '%_MODEL3_%');
    BEGIN
       FOR rec IN c1
       LOOP
          EXECUTE IMMEDIATE 'DROP TABLE ' || rec.table_name;
       END LOOP;
    END;

  • Call Oracle function from Stored Procedure

    Hi,
    I have function Which returning one number. I want to use that number in a procedure. How to call the Oracle Function from the Procedure
    Create procedure
    AS
    Begin
    Check number;
    Select Function1 into check from dual;
    It is giving error.
    Can anyone provide me example for this.
    Thanks in advance

    Put the Check Number; before begin
    SQL> create or replace procedure abc as
      2 begin
    3 val number;
      4  select abcd into val from dual;
      5  dbms_output.put_line(val);
      6  end;
      7  /
    Warning: Procedure created with compilation errors.
    Elapsed: 00:00:00.00
    SQL> show error
    Errors for PROCEDURE ABC:
    LINE/COL ERROR
    3/5      PLS-00103: Encountered the symbol "NUMBER" when expecting one of
             the following:
             := . ( @ % ;
             The symbol ":=" was substituted for "NUMBER" to continue.
    SQL> create or replace procedure abc as
      2 val number;
    3 begin
      4  select abcd into val from dual;
      5  dbms_output.put_line(val);
      6  end;
      7  /
    Procedure created.
    Elapsed: 00:00:00.00
    SQL> exec abc;
    100.22
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.00
    SQL>

  • Importing function with multiple ref cursors in Stored Procedure of Oracle 12c database Using EF6

    Hi Good day!
    I can able to import function for stored procedure of oracle db and able to add the complex type and get the output but i tried to import the procedure which having two ref cursors and unable to retrieve the column information. Only able to retrieve the
    columns of first ref cursor.  Please help me to get the result of two ref cursors which acting as out parameters.

    Having to ref cursors return mutiple recordsets in an Oracle package is like haveng two resultsets return from a MS SQL Server sparc.
    The link may point you in the right direction.
    http://www.codeproject.com/Articles/675933/Returning-Multiple-Result-Sets-from-an-Entity-Fram

  • LEXICAL REFERENCES IN STORED PROCEDURES

    CAN I TO DO LEXICAL REFERENCES IN STORED FUNCTIONS AND STORED
    PROCEDURES ?
    THANK'S FOR ANY HELP.

    What is your application release?
    Not sure if I understand you correctly, but have you reviewed (How To Use Oracle.Apps.Fnd.Flex.Kff.Select To Retrieve Particular Segments And Not All Segments from a Flexfield [ID 1267032.1]) and see if it helps?
    Thanks,
    Hussein

  • How stored procedure get executed when called from java

    When we create a stored procedure or function in oracle, it is compiled and stored there. From java when we call them no compilation is performed its a simple call. When a function or stored procedure is invoked from multiple instance of java objects(for a single session), does the stored procedure clone it self so that it can be called by different java objects which I think not possible at all. In such cases when one java object is interacting with the stored procedure, does other java objects go on a wait state. What happens if sessions are different.
    Please help.

    >
    does oracle creates multiple instance of a particular stored procedure for different sessions or connections. if not then there might be some kind of waiting principle followed.. what happens exactly
    >
    What happens exactly is detailed in Chap. 14 Memory Architecture ni the Database concepts doc
    http://docs.oracle.com/cd/E14072_01/server.112/e10713/memory.htm#i21266
    The code is shared but the data isn't (see the lone exception to this below).
    See the section on the Library Cache
    >
    Program Units and the Library Cache
    The library cache holds executable forms of PL/SQL programs and Java classes. These items are collectively referred to as program units.
    The database processes program units similarly to SQL statements. For example, the database allocates a shared area to hold the parsed, compiled form of a PL/SQL program. The database allocates a private area to hold values specific to the session that runs the program, including local, global, and package variables, and buffers for executing SQL. If multiple users run the same program, then each user maintains a separate copy of his or her private SQL area, which holds session-specific values, and accesses a single shared SQL area.
    >
    The exception is when code uses the SERIALLY_REUSABLE pragma. In that case the memory for package state is in the SGA and users do not have their own copy in their UGA.
    See the SERIALLY_REUSABLE pragma in the PL/SQL Language doc
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/seriallyreusable_pragma.htm
    >
    The global memory for serially reusable packages is pooled in the System Global Area (SGA), not allocated to individual users in the User Global Area (UGA). That way, the package work area can be reused. When the call to the server ends, the memory is returned to the pool. Each time the package is reused, its public variables are initialized to their default values or to NULL.
    Serially reusable packages cannot be accessed from database triggers or other PL/SQL subprograms that are called from SQL statements. If you try, the database generates an error.

  • Need to call funtion in stored procedure to run one customized report

    Hi,
    I need to call one function in stored procedure for our customized report. Can anyone please help me in calling the function in stored procedure and provide the syntax for the same.
    Thanks,
    Kalpana.

    Either open an existing report. You'l see so many examples.
    or
    http://www.google.co.in/#hl=en&source=hp&biw=1024&bih=586&q=call+function+in+stored+procedure+sql&aq=1&aqi=g2g-m2&aql=&oq=Call+function+in+stored&gs_rfai=&fp=dbefe777997d3915

Maybe you are looking for

  • Error when starting tomcat in win2000 pro

    I have set up the required variables in order to run the startup.bat file and I get the following error when attempting to start it: java org.apache.tomcat.startup.Tomcat Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tomcat/st

  • Mail doesn't work in Mountain Lion

    After upgrading Lion to Mountaun Lion, first start of Mail is fail. It porpose me updaiting the Mail database and ask few minutes for that, but still is about 4 or 5 hours with internet working and do nothing. I shut down it, and start it a lot of ti

  • Flash Builder 4.5 can't find Flash imports

    Hi everyone, Not sure if this question has been answered elsewhere in the forum but I'm using Flash Pro CS5.5 together with Flash Builder 4.5 which are supposed to integrate well (I'm led to believe anyway). After importing my Flash Pro project and o

  • Airport express refuses to connect to extreme network.

    I have an extreme network set up with 2 g5 imacs connected to a router. I wish to add an express base station to wirelessly connect to the established network as a client so I can stream music from either imac to the remote speakers plugged into the

  • How do I solve a memory problem in regard to downloading Firefox?

    Firefox almost completly downloaded but stopped. It said I have 0 space left, yet the computer still has about 35MG left. The computer met the requirements for the download I believe. I tried to free up space by archiving stuff and deleting, but noth