AP_VENDOR_PUB_PKG PACKAGE BODY issue...

Hi there
AP_VENDOR_PUB_PKG PACKAGE BODY become invalid can any one let me how to valid this package body because due to this we are facing problem in creating supplier.
Regards,
Mohsin

Hi Helios
Thanks for reply...please find below application & object info.
Application: R12(12.1.2)
Database: 11.1.0.7
STATUS OBJECT_NAME OBJECT_TYPE
INVALID FV_FACTS_TRANSACTIONS PACKAGE BODY
INVALID FV_FACTS_TBAL_TRANSACTIONS PACKAGE BODY
INVALID FV_BUDGET_DISTRIBUTION_HDR_V VIEW
INVALID FII_AP_INV_ON_HOLD_F_C PACKAGE BODY
INVALID FII_AP_HOLD_DATA_F_C PACKAGE BODY
INVALID FII_AP_INV_PAYMTS_F_C PACKAGE BODY
INVALID FII_AP_INV_LINES_F_C PACKAGE BODY
INVALID FII_AP_SCH_PAYMTS_F_C PACKAGE BODY
INVALID FII_AR_TRX_DIST_F_C PACKAGE BODY
INVALID FII_PA_COST_F_C PACKAGE BODY
INVALID FII_PA_REVENUE_F_C PACKAGE BODY
STATUS OBJECT_NAME OBJECT_TYPE
INVALID FII_PA_UOM_CONV_F_C PACKAGE BODY
INVALID FII_PA_BUDGET_F_C PACKAGE BODY
INVALID EDW_HR_ASG_CHNG_M_C PACKAGE BODY
INVALID EDW_HR_AGE_BAND_M_C PACKAGE BODY
INVALID EDW_HR_ASSGNMNT_M_C PACKAGE BODY
INVALID EDW_HR_GRADE_M_C PACKAGE BODY
INVALID EDW_HR_JOBS_M_C PACKAGE BODY
INVALID EDW_HR_SERVICE_M_C PACKAGE BODY
INVALID EDW_HR_MVMNT_TYP_M_C PACKAGE BODY
INVALID EDW_HR_PERSON_M_C PACKAGE BODY
INVALID EDW_HR_POSITION_M_C PACKAGE BODY
STATUS OBJECT_NAME OBJECT_TYPE
INVALID EDW_HR_REC_ACT_M_C PACKAGE BODY
INVALID EDW_ORGANIZATION_M_C PACKAGE BODY
INVALID EDW_HR_PRSN_TYP_M_C PACKAGE BODY
INVALID EDW_HR_RQN_VCNCY_M_C PACKAGE BODY
INVALID EDW_HR_REASON_M_C PACKAGE BODY
INVALID HR_EDW_WRK_CMPSTN_F_C PACKAGE BODY
INVALID EDW_MRP_DM_CLS_M_C PACKAGE BODY
INVALID EDW_MRP_FORECAST_M_C PACKAGE BODY
INVALID EDW_MRP_PLAN_M_C PACKAGE BODY
INVALID ISC_EDW_BOOK_SUM1_F_C PACKAGE BODY
INVALID EDW_MTL_INVENTORY_LOC_M_C PACKAGE BODY
STATUS OBJECT_NAME OBJECT_TYPE
INVALID OPI_EDW_COGS_F_C PACKAGE BODY
INVALID OPI_EDW_OPM_JOB_RSRC_F_C PACKAGE BODY
INVALID OPI_EDW_OPM_JOB_DETAIL_F_C PACKAGE BODY
INVALID OPI_EDW_OPMCOGS_F_C PACKAGE BODY
INVALID OPI_EDW_OPMINV_DAILY_STAT_F_C PACKAGE BODY
INVALID EDW_OPI_OPRN_M_C PACKAGE BODY
INVALID EDW_OPI_ACTV_M_C PACKAGE BODY
INVALID EDW_OPI_LOT_M_C PACKAGE BODY
INVALID EDW_OPI_PRDL_M_C PACKAGE BODY
INVALID OPI_EDW_UOM_CONV_F_C PACKAGE BODY
INVALID EDW_POA_SPLRITEM_M_C PACKAGE BODY
STATUS OBJECT_NAME OBJECT_TYPE
INVALID EDW_POA_LN_TYPE_M_C PACKAGE BODY
INVALID QP_BUILD_SOURCING_PVT_TMP PACKAGE BODY
INVALID FV_FACTS_TBAL_TRX PACKAGE BODY
INVALID FV_FACTS_TRX_REGISTER PACKAGE BODY
INVALID ITG_SYNCSUPPLIERINBOUND_PVT PACKAGE BODY
INVALID AP_VENDOR_PUB_PKG PACKAGE BODY
INVALID FV_SLA_PROCESSING_PKG PACKAGE BODY
INVALID PSA_AP_BC_PVT PACKAGE BODY
INVALID XLA_00201_AAD_S_000004_BC_PKG PACKAGE BODY
INVALID FV_SLA_UTL_PROCESSING_PKG PACKAGE BODY
INVALID XX_GET_PR_PO_INFO FUNCTION
STATUS OBJECT_NAME OBJECT_TYPE
INVALID AP_VENDOR_PUB_PKG_BK PACKAGE BODY
56 rows selected.
yes i have validated apps schema with adadmin utility as well
Regards,
Mohsin
Edited by: 920138 on Apr 26, 2012 4:13 AM

Similar Messages

  • Package body issue

    Hi ,I wrote a package body.
    I get following error.
    1/14 PLS-00201: identifier 'WOC_DELETE_MODEL_DATA' must be declared
    1/14 PLS-00304: cannot compile body of 'WOC_DELETE_MODEL_DATA' without its specification
    0/0 PL/SQL: Compilation unit analysis terminated
    CREATE OR REPLACE PACKAGE BODY Woc_Delete_Model_Data
    AS
    NAME: Woc_Delete_Model_Data
    PURPOSE:
    REVISIONS:
    Ver Date Author Description
    1.0 1/08/2008 mnettam 1. Created this package body.
    PROCEDURE DeleteUIRule(
    p_product_model IN VARCHAR2,
    p_request_status OUT VARCHAR2,
    p_err_mesg OUT VARCHAR2
    ) IS
    BEGIN
    DBMS_OUTPUT.ENABLE(1000000);
    /* delete UI Data rules */
    DELETE from WOC_CATEGORY_UI_INFO where product_Model_Name = p_product_model;
    dbms_output.put_line('product MOdel '||p_product_model||' from Woc_Category_UI_Info deleted');
    --EXCEPTION
    --WHEN OTHERS THEN
    --p_err_mesg := 'ERROR in CUSOR';
    --DBMS_OUTPUT.put_line ('ERROR in CUSOR')
    END DeleteUIRule;
    PROCEDURE delete_batch_woc_model(p_flag IN VARCHAR2,p_err_mesg OUT VARCHAR2)
    IS
    l_product_model VARCHAR2(30);
    p_request_status VARCHAR2(30);
    BEGIN
    l_product_model := v_header_rec.PRODUCT_MODEL_NAME;
    --DBMS_OUTPUT.put_line ('In loop l_product_number '|| l_product_number);
    IF(l_product_model IS NOT NULL ) THEN
    --DBMS_OUTPUT.put_line ('l_product_number '|| l_product_number);
    DeleteUIRule(l_product_model,p_request_status,p_err_mesg);
    END IF;
    --EXCEPTION WHEN OTHERS THEN
    -- p_err_mesg := 'ERROR in CUSOR';
    --DBMS_OUTPUT.put_line ('ERROR in CUSOR');
    -- RETURN;
    END delete_batch_woc_model;
    END Woc_Delete_Model_Data;

    I am new to oracle.Please can you explain what is package specification .
    I created package structure. Are you talking about package structure?
    whenever sqlerror continue
    SET SERVEROUTPUT ON SIZE 1000000;
    DECLARE
    P_FLAG VARCHAR2(200);
    P_ERR_MESG VARCHAR2(200);
    l_SDdate VARCHAR2(200);
    l_EDdate VARCHAR2(200);
    l_Tdate DATE;
    l_start NUMBER DEFAULT dbms_utility.get_time;
    BEGIN
    P_FLAG := NULL;
    P_ERR_MESG := NULL;
    DBMS_OUTPUT.PUT_LINE('Start Time: ' || l_start);
    Woc_Delete_Model_Data.DELETE_BATCH_WOC_MODEL( P_FLAG, P_ERR_MESG );
    dbms_output.put_line(round((dbms_utility.get_time - l_start) / 100,2) || 'seconds');
    COMMIT;
    END;
    show errors

  • Issue with viewing Package Body  in SQL Developer 2.1 RC1

    Were anybody able to see the package body of other user in 2.1 RC1.
    I had an issue since 2.1 EA 1 so... just curious.
    - Oracle 9i
    - Windows XP SP3
    Please do let me know if there is any hint or setting that can be change to view the package body.
    Thanks!

    Thanks for your msg.
    Below is the info:
    1.
    SQL: SELECT * FROM v$version;
    Result:
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
    PL/SQL Release 9.2.0.8.0 - Production
    "CORE     9.2.0.8.0     Production"
    TNS for Solaris: Version 9.2.0.8.0 - Production
    NLSRTL Version 9.2.0.8.0 - Production
    2.
    Result:
    The account has 'EXECUTE' privilege on the package.
    3.
    SQL: SELECT username "User"
    ,granted_role "Granted_Role"
    ,initcap(admin_option) "Admin_Option"
    ,initcap(default_role) "Default_Role"
    FROM user_role_privs
    ORDER BY username
    ,granted_role;
    Result:
    User``````````Granted_Role```````````Admin_Option``Default_Role
    ~~~~ ~~~~~~~~~ ~~~~~~~~~ ~~~~~~~~
    USER_NAME```SELECT_CATALOG_ROLE``No````````````Yes
    4.
    SQL:
    SELECT privilege "Privilege"
    ,initcap(admin_option) "Admin_Option"
    FROM user_sys_privs
    ORDER BY privilege;
    Result:
    Privilege````````````Admin_Option
    ~~~~~~ ~~~~~~~~~
    ALTER SESSION`````No
    CREATE SESSION````No
    CREATE SYNONYM```No

  • Bind variable issue in Package Body

    When I try to compile my package body, I get an error on the variables declared within the procedure. Bind variable not allowed. Any thoughts?

    Apparently the error was related to something else, and the message was mis-leading. When I re-structured the code for other reasons, the 'error' was no longer showing up. Sorry for the confusion.

  • Issue with viewing Package Body in SQL Developer 2.1 EA1

    I was able to view the package body from different schemas after I log in with user account in SQL Developer 1.5.5.
    But with SQL Developer 2.1 EA1, I could view only spec and I can see the package body only if I log in with DBO account.
    Is there any setting that needs to be configured to be able to view the package body?
    Thanks!

    Thanks for replying my message.
    It's Oracle 9i.
    What I meant 'spec' is you can see only the headers you defined in spec. You can expend the package and be able to see the all functions and procedures but you won't be able to see the '%packagename% Body' where all the detail code were written.
    As I mentioned in my previous post, with SQL Developer 1.5.5 version, you can see spec and package body if you expend the package.

  • 3.1EA2 bug still not fixed - Members of package body not listed in the tree

    Hi, I was working today with SQL Developer again and found that this bug is still not fixed even when it was reported more than 1 year ago!!!
    I did a quick search and found it here
    Package Body Tree not always showing
    The problem is when you expand the package specification or package body tree, not all members of the specification/body are listed. This is mostly observable in the package body, but it regards to the specification as well.
    Consider this case:
    CREATE TABLE EMP (
        ID               NUMBER(6,0) DEFAULT 0,
        NAME             VARCHAR2(20 BYTE) DEFAULT NULL,
        DEPT             VARCHAR2(20 BYTE) DEFAULT NULL,
        FUNCTION         VARCHAR2(20 BYTE),
        PROCEDURE        VARCHAR2(20 BYTE));
    CREATE TABLE LOOP (
      AREA    VARCHAR2(5),
      VALUE   VARCHAR2(2));
    CREATE OR REPLACE PACKAGE Test_Package1 AS
    gvc_const CONSTANT VARCHAR2(10) := 'xxx';
    PROCEDURE Test(p_RC OUT NUMBER,
                   p_ID IN NUMBER);
    END Test_Package1;
    CREATE OR REPLACE PACKAGE BODY Test_Package1 AS
    PROCEDURE Test(p_RC OUT NUMBER,
                   p_ID IN NUMBER)
    IS
    BEGIN
      --INSERT INTO EMP (ID, NAME, DEPT, PROCEDURE) VALUES (1, 'Tina', 'xxx', 'xxx');
      --INSERT INTO EMP (ID, NAME, DEPT, FUNCTION) VALUES (2, 'Jeff', 'xxx', 'xxx');
      --INSERT INTO LOOP(AREA, VALUE) VALUES('a','b');
      NULL;
    END;
    END Test_Package1;Compile the package specification and the body. Expand the spec + body in the tree. Uncomment any of the commented lines in the package body and compile the body again. Now expand the package body again and look what is displayed.
    Why? It is because SQL Developer handles words "Function", "Procedure" and "Loop" as keywords and according to them does the parsing.
    Another case
    CREATE OR REPLACE PACKAGE Test_Package1 AS
    gvc_const CONSTANT VARCHAR2(10) := 'xxx';
    TYPE Loop_rec IS RECORD(
      item1   LOOP.AREA%TYPE);
    PROCEDURE Test(p_RC OUT NUMBER,
                   p_ID IN NUMBER);
    END Test_Package1;Compile just this specification and try to expand it in the tree. Again, during parsing the package, SQL Developer takes the word "LOOP" into consideration and fails to parse the specification.
    There is exactly the same problem when you declare functions from external dll libraries in package body. Since there is no "END;" in this case, SQL Developer's parser fails...
    To me it seems you simply blindly took some keywords like "FUNCTION" and expect there will be some "END;" keyword corresponding with it.
    Can anyone have a look at this and finally fix it?

    Hi,
    Thanks for trying out SQL Developer 3.1 EA2 and providing a clear, reproducible test case for this issue. I logged an internal bug for it:
    Bug 13438696 - 3.1EA2: FORUM: CERTAIN KEYWORDS IN PKG BODY BLOCK MEMBERS FROM CONN VIEW TREE
    It seems the bug noted in the other forum thread you reference has been fixed, but really had nothing to do with problems discussed either here or there. That fix involved adding an Edit Body... item to the Package context menu in the Schema Browser, not displaying Package members correctly in the Connection view tree.
    Regards,
    Gary
    SQL Developer Team

  • Problem in package body creation

    Hello,
    I am a newbie in PL/SQL.I am sorry for posting a very silly question,but I am struggling since 2 days trying to get this PL/SQL code working.Dont know whats wrong with it.I consulated a lot of tutorials and online sources..But still couldnt figure out whats wrong.I get the following error
    LINE/COL ERROR
    6/1 PLS-00103: Encountered the symbol "CREATE"
    The code is like following
    CREATE or replace package test AS
         procedure extract_tmp_reifs ;
    end;
    CREATE OR REPLACE PACKAGE BODY test IS procedure extract_info(models IN varchar2,rulebases IN varchar2) is
    stmt varchar2(4000);
    model_name varchar2(4000);
    rulebase_name varchar2(4000);
         --Create table invocation
    begin     
         model_name := models;
         rulebase_name := rulebases;
         stmt := 'create table '|| model_name ||'_'||rulebase_name||'_t$'||'(id number primary key, triple_id number, sd date, ed date)';
         execute immediate stmt;
         commit;     
    end extract_tmp_reifs;     
    end temporal_reification;
    The line 6 is for the Create package body thing.
    WIll be grateful if some one can give a hint as to whats wrong wiith it.Please help me
    Thanks
    Regards
    Prateek!

    > The requirement is to have a procedure which when provided two parameters
    creates a table based on the parameters,and then values are inserted into the
    table by using data from other tables.Thats why the dynamic creation of table.
    I still don't like it. Besides the dynamic create issue, there is a relational design issue at stake here.
    Attribute data is to be carried in the columns of a table - and not in the table name. The correct relation (from the little code I've seen posted here) is:
    Model Rules = ( Model ID, Rulebase ID, Tripple ID, Start Date, End Date)
    And not multiple relations where the relational table's name is dynamic and the attribute data carried in the name of the table. To put it into context, it is the same as defining an Invoice Relation as:
    Invoices_20070305 = ( Invoice ID, Customer ID, Product ID, Quantity, Unit Cost, ..etc.. )
    Instead of putting the date as an attribute value into the relation:
    Invoices = ( Invoice ID, Invoice Date, Customer ID, Product ID, Quantity, Unit Cost, ..etc.. )
    Using this dynamic method you can wind up with 1000's of tables for Model Rules. How are you going to make use of referential integrity? What about indexing? What about the complexity of having all these many dynamic tables and attempting to query them with a single query?
    99% of the time, dynamically creating relations (tables) in a RDBMS is the wrong thing to do. And unless you can convince me that you have the 1% exception to the rule, I'm going to be very skeptical about the dynamic table create approach you have chosen. It is simply wrong.

  • "Read Only" open other schema's package body even have write permission

    Oracle SQL Developer 2.1 (2.1.0.63)
    I can view and modify package under my schema, but when I open other schema's package body, it show "Read Only" in status bar and can't type in code editor.
    I'm sure my connected user have write permission and it works fine in old sql developer version.
    Is there some toggle for "read only" view or some issue for new release?

    Not very helpful for you at the moment, but according to EA 2.1. Can't edit another users store procedures. this has been bugged and will hopefully get fixed soon.
    theFurryOne

  • SYSDBA - problem with viewing other users package body texts on sys account

    Hi,
    SQL Dev 1.0.0.15.27 has problem with correct display of other users package body texts on sys account. All bodies have "create or replace" text instead of all pck. bodies text.
    I guest it's problem with SYSDBA role. On system account text is displayed correctly. Quest SQL Navigator 5.x has no problem with this. Any ideas ?
    Regards,
    MM

    Hi Everyone,
    Just so I can close the case on this issue, although I was successful in
    using CSS to resolve the issue, actually, the issue was not really
    resolved. There was (for me) still the problem of rollover images not
    working in IE, and if I were ever to get another good night's sleep, I
    would need to resolve it -- so I did. Recall me saying earlier about the
    sizes being brought in to the javascript code by Dreamweaver? The original
    issue with having the size of the small image in the code caused the code
    to see the larger image as small also! However, when I deleted those size
    attributes' numbers, I failed to delete the words "width" and "height"
    along with the double quotes following each. So, while the other browsers
    ignored these "blank" attributes within these double quotes, IE apparently
    didn't, reading these "blank" values as some very small value, thus
    displaying the image in the absolutely smallest size possible! Wow! When I
    removed these two blank attributes, my problem went away! Live and learn!
    So, to all who were desperately trying to assist me, please accept my
    deepest and most sincere apologies. All the while I was blaming IE, I was
    the guilty one!!! Shame on me, and thanks for the wonderful responses I
    received from the Dreamweaver forum team. I will go and stand in the corner
    for 8 hours with my dunce cap on...
    Joe Dardard

  • ORA-04063:package body "APPS.AP_UTILITIES_PKG" has errors

    Hi,
    AP_UTILITIES_PKG is showing invalid status.when i m trying to compile giving below error.
    SQL> show error
    Errors for PACKAGE BODY AP_UTILITIES_PKG:
    LINE/COL ERROR
    1033/9 PL/SQL: Statement ignored
    1033/21 PLS-00905: object APPS.FND_FLEX_KEY_API is invalid
    1046/9 PL/SQL: Statement ignored
    1046/22 PLS-00905: object APPS.FND_FLEX_KEY_API is invalid
    1059/9 PL/SQL: Statement ignored
    1059/22 PLS-00905: object APPS.FND_FLEX_KEY_API is invalid
    1421/9 PL/SQL: Statement ignored
    1421/21 PLS-00905: object APPS.FND_FLEX_KEY_API is invalid
    1434/9 PL/SQL: Statement ignored
    1434/21 PLS-00905: object APPS.FND_FLEX_KEY_API is invalid
    1447/9 PL/SQL: Statement ignored
    What i know there is a synonym FND_FLEX_VALUE_SET this synonym dropped After that many forms of the application is getting error.when i m trying to create as below it is saying "cannot create a synonym with same name as object"
    It is PRODUCTION issue kindly update me it would be appreciated
    Thanks
    Edited by: userpat on Jul 18, 2010 5:49 AM

    issue occured: EBS 12.0.3 AIX 5.3 DB 10.2.0.2
    select owner,object_name,object_type from dba_objects where object_name like 'FND_FLEX_VALUE_SET%'
    OWNER     OBJECT_NAME     OBJECT_TYPE
    APPLSYS     FND_FLEX_VALUE_SETS_S     SEQUENCE
    APPS     FND_FLEX_VALUE_SETS_S     SYNONYM
    APPLSYS     FND_FLEX_VALUE_SETS     TABLE
    APPLSYS     FND_FLEX_VALUE_SETS_U1     INDEX
    APPLSYS     FND_FLEX_VALUE_SETS_U2     INDEX
    FYI there are two test server for above because of power failure the system went down so i m not able to connect right now so find below output of other PRODUCTION instance that is 11.5.9 AIX 5.2 DB 9.2.0.4
    select owner,object_name,object_type from dba_objects where object_name like 'FND_FLEX_VALUE_SET%'
    OWNER     OBJECT_NAME     OBJECT_TYPE
    APPLSYS     FND_FLEX_VALUE_SETS     TABLE
    APPLSYS     FND_FLEX_VALUE_SETS_S     SEQUENCE
    APPLSYS     FND_FLEX_VALUE_SETS_U1     INDEX
    APPLSYS     FND_FLEX_VALUE_SETS_U2     INDEX
    APPS     FND_FLEX_VALUE_SETS     SYNONYM
    APPS     FND_FLEX_VALUE_SETS_S     SYNONYM
    Kindly update me

  • SQL*Developer 3EA1 - Not Compiling package Body

    Don't know if this is best place to post this, if not tell me where.
    In some packages i'm getting: Error: ORA-06550: linha 1, coluna 64:PLS-00172: literal de cadeia de caracteres demasiado extenso; Sorry about the portuguese error message but it's cpopy paste from compiler log.
    The strange about this is that the package is compiling with no errors on Version 2.1.1.64 and also on others editors. In both packages i had this was after formatting the code.
    So far is the only bug i got, keep on the good work.
    António Cunha

    Just tried from pl/sql node. The package body does not compile from there either. The issue seems to be the size of the package. The package size is 35,000 characters and spaces. I can remove any combination of source lines to get it down to 32,000 characters and spaces and it will compile.
    Edited by: dagtech on Oct 21, 2010 9:34 AM

  • Can't see package body in SQL Developer version 2.1.1.64

    When I go to the object browser, I can see all of the package specs but can't seem to get to the package body. I can access the package body just fine through Toad, so I don't think it is an Oracle user issue. Help?

    I can see any user's Package Body when I'm logged into the database as a DBA, so it must be some privilege that you need. The privilege I would have guessed you need is SELECT ANY DICTIONARY but you say you have that privilege. If you were granted that privilege through a role, make sure that the role is active, or that it is a default role.
    Another role it might be looking for is EXECUTE ANY PROCEDURE, but I'm not sure. See if you can do these selects, since these are probably the views that SQL Developer is using:
    select * from dba_objects where owner = 'some owner' and object_type = 'PACKAGE BODY';
    select * from dba_source where owner = ' some owner' and type = 'PACKAGE BODY';Of course, if your database administrator is willing to grant you the DBA role, that ought to do the trick - works for me. Otherwise, you and your DBA may have to try different system privileges until you find the one that works.

  • Can't compile package body

    hello. i ran in to little issue today. After patch 13839550 was applied to one of our test enviroments, we get one invalid package body. but when i try to compile it shows warrning!
    SQL> alter package APPS.AP_ACCTG_DATA_FIX_PKG compile body;
    Warning: Package Body altered with compilation errors.
    SQL>
    SQL> show err
    Errors for PACKAGE BODY APPS.AP_ACCTG_DATA_FIX_PKG:
    LINE/COL ERROR
    3899/3 PL/SQL: SQL Statement ignored
    3899/3 PLS-00394: wrong number of values in the INTO list of a FETCH
    statement
    Could you please explain what should i do?
    Database - 11.2.0
    eBS - 12.1
    Linux x86
    Thx

    i dont understand how can ichange something here?In this case, you can't.
    If this is one of the standard packages built into an Oracle Apps database, you need to log a tar/sr with Oracle support. (which will probably result in more patches)

  • BUG 1.5:Can't edit package body in other user.

    This is getting ridiculous. I didn't really have time to do anything with pl/sql development during the EA period and now that I do, nothing seems to work.
    I have a package and package body owned by user x. I am connected as system.
    I can edit the package, but not the body. The edit window opens, and I can compile it but I can't make any changes in the editor.
    1.5 prod with jre
    windows xp sp2
    Oracle 11.1.0.6.0

    We don't have a date scheduled for the patch release. We're working on the key issues and will release the patch when these are done. We do not plan to make this a long drawn out process.
    Sue

  • Are PL/SQL Package Body Constants in Shared Area or Private Area

    Based on this it not clear to me if PL/SQL Package Body Constants are stored in shared area or private area.
    http://docs.oracle.com/cd/B28359_01/server.111/b28318/memory.htm
    "PL/SQL Program Units and the Shared Pool
    Oracle Database processes PL/SQL program units (procedures, functions, packages, anonymous blocks, and database triggers) much the same way it processes individual SQL statements. Oracle Database allocates a shared area to hold the parsed, compiled form of a program unit. Oracle Database allocates a private area to hold values specific to the session that runs the program unit, including local, global, and package variables (also known as package instantiation) and buffers for executing SQL. If more than one user runs the same program unit, then a single, shared area is used by all users, while each user maintains a separate copy of his or her private SQL area, holding values specific to his or her session.
    Individual SQL statements contained within a PL/SQL program unit are processed as described in the previous sections. Despite their origins within a PL/SQL program unit, these SQL statements use a shared area to hold their parsed representations and a private area for each session that runs the statement."
    I am also curious what are the fine grained differences from a memory and performance perspective (multi-session) for the two examples below. Is one more efficient?
    Example 1.
    create or replace
    package body
    application_util
    as
    c_create_metadata constant varchar2(6000) := ...
    procedure process_xxx
    as
    begin
    end process_xxx;
    end application_util;
    vs.
    Example 2.
    create or replace
    package body
    application_util
    as
    procedure process_xxx
    as
    c_create_metadata constant varchar2(6000) := ...
    begin
    end process_xxx;
    end application_util;

    >
    What i am asking is fairly granular, so here it is again, let's assume latest version of oracle..
    In a general sense, is the runtime process able to manage memory more effectively in either case, one even slightly more performant, etc
    ie does example 1 have different memory management characteristics than example 2.
    Specifically i am talking about the memory allocation and unallocation for the constant varchar2(6000)
    Ok, a compiler's purpose is basically to create an optimized execution path from source code.
    The constant varchar2(6000) := would exist somewhere in the parse tree/execution path (this is stored in the shared area?).
    I guess among the things i'm after is
    1) does each session use space needed for an additional varchar2(6000) or does runtime processor simply point to the constant string in the parse tree (compiled form which is shared).
    2) if each session requires allocation of space needed for an additional varchar2(6000), then for example 1 and example 2
    at what point does the constant varchar allocation take place and when is the memory unallocated.
    Basically does defining the constant within the procedure have different memory characteristics than defining the constant at the package body level?
    >
    Each 'block' or 'subprogram' has a different scope. So the 'constant' defined in your example1 is 'different' (and has a different scope) than the 'constant' defined in example2.
    Those are two DIFFERENT objects. The value of the 'constant' is NOT assigned until control passes to that block.
    See the PL/SQL Language doc
    http://docs.oracle.com/cd/E14072_01/appdev.112/e10472/fundamentals.htm#BEIJHGDF
    >
    Initial Values of Variables and Constants
    In a variable declaration, the initial value is optional (the default is NULL). In a constant declaration, the initial value is required (and the constant can never have a different value).
    The initial value is assigned to the variable or constant every time control passes to the block or subprogram that contains the declaration. If the declaration is in a package specification, the initial value is assigned to the variable or constant once for each session (whether the variable or constant is public or private).
    >
    Perhaps this example code will show you why, especially for the second example, a 'constant' is not necessarily CONSTANT. ;)
    Here is the package spec and body
    create or replace package pk_test as
      spec_user varchar2(6000);
      spec_constant varchar2(6000) := 'dummy constant';
      spec_constant1 constant varchar2(6000) := 'first constant';
      spec_constant2 constant varchar2(6000) := 'this is the second constant';
      spec_constant3 constant varchar2(6000) := spec_constant;
      procedure process_xxx;
      procedure change_constant;
    end pk_test;
    create or replace package body pk_test as
    procedure process_xxx
    as
      c_create_metadata constant varchar2(6000) := spec_constant;
    begin
      dbms_output.put_line('constant value is [' || c_create_metadata || '].');
    end process_xxx;
    procedure change_constant
    as
    begin
      spec_constant := spec_constant2;
    end change_constant;
    begin
      dbms_output.enable;
      select user into spec_user from dual;
      spec_constant := 'User is ' || spec_user || '.';
    end pk_test;The package init code sets the value of a packge variable (that is NOT a constant) based on the session USER (last code line in package body).
    The 'process_xxx' procedure gets the value of it's 'constant from that 'non constant' package variable.
      c_create_metadata constant varchar2(6000) := spec_constant;The 'change_constant' procedure changes the value of the package variable used as the source of the 'process_xxx' constant.
    Now the fun part.
    execute the 'process_xxx' procedure as user SCOTT.
    SQL> exec pk_test.process_xxx;
    constant value is [User is SCOTT.].Now execute 'process_xxx' as another user
    SQL> exec pk_test.process_xxx;
    constant value is [User is HR.].Now exec the 'change_constant' procedure.
    Now exec the 'process_xxx' procedure as user SCOTT again.
    SQL> exec pk_test.process_xxx;
    constant value is [this is the second constant].That 'constant' defined in the 'process_xxx' procedure IS NOT CONSTANT; it now has a DIFFERENT VALUE.
    If you exec the procedure as user HR it will still show the HR constant value.
    That should convince you that each session has its own set of 'constant' values and so does each block.
    Actually the bigger memory issue is the one you didn't ask about: varchar2(6000)
    Because you declared that using a value of 6,000 (which is 2 ,000 or more) the actual memory allocation not done until RUN TIME and will only use the actual amount of memory needed.
    That is, it WILL NOT pre-allocate 6000 bytes. See the same doc
    http://docs.oracle.com/cd/E14072_01/appdev.112/e10472/datatypes.htm#CJAEDAEA
    >
    Memory Allocation for Character Variables
    For a CHAR variable, or for a VARCHAR2 variable whose maximum size is less than 2,000 bytes, PL/SQL allocates enough memory for the maximum size at compile time. For a VARCHAR2 whose maximum size is 2,000 bytes or more, PL/SQL allocates enough memory to store the actual value at run time. In this way, PL/SQL optimizes smaller VARCHAR2 variables for performance and larger ones for efficient memory use.
    For example, if you assign the same 500-byte value to VARCHAR2(1999 BYTE) and VARCHAR2(2000 BYTE) variables, PL/SQL allocates 1999 bytes for the former variable at compile time and 500 bytes for the latter variable at run time.
    >
    So when you have variables and don't know how much space is really needed do NOT do this:
    myVar1 VARCHAR2(1000);
    myVar2 VARCHAR2(1000);
    myVar3 VARCHAR2(1000);The above WILL allocate 3000 bytes of expensive memory even if it those variables are NEVER used.
    This may look worse but, as the doc states, it won't really allocate anything if those variables are not used. And when they are used it will only use what is needed.
    myVar1 VARCHAR2(2000);
    myVar2 VARCHAR2(2000);
    myVar3 VARCHAR2(2000);

Maybe you are looking for

  • PO Goods Receipt

    Hi All Please give me the solution for the following scenario I want to place the order for ToolBox, it contains 5 different size of spanners Tool Box has the created as semi finished item spanners are created as Raw materials I placed the order for

  • Creating new user in AD

    Hi all, I am trying to write a script to create new user in Active Directory using power-shell $sam = "13653123" try{ get-aduser -Identity $sam -ErrorAction Stop catch [Microsoft.ActiveDirectory.Management.ADIdentityNotFoundException] $error1= [Syste

  • Abap code in start routine

    hi, i have a code in this way in update routine of that info object instead of writng that code in update routine i want to write in start routine can any one tell me what r the changes i have to made please suggest me i will assigfn points CASE COMM

  • Need to write on a document that i have received via email.  how do I do this??

    how do i enable a document that i have accessed on line so that i can write on it?????

  • Early model Mac Pro's Expansion Slot Utility not working with 10.5.6 update

    I'm reading that the 10.5.6 update may have crippled the Expansion Slot Utility for early Mac Pros. I have a 2.66 Mac Pro, and I just installed a Kona 3 card in slot 3. Already had an ATI 1900xt in slot 1. However, the Expansion Slot Utility program