Browser bug for package procedure named "delete"

One should not use a reserved word when naming stored procedures, but while Oracle allows one to create a packaged procedure or function named "delete" (at least in 9.2 through 11.2), an object so named prevents the object browser and outline window from properly displaying all procedure and function names.
Test case:
CREATE OR REPLACE PACKAGE my_pk
AS
PROCEDURE delete;
PROCEDURE p;
END my_pk;
The object browser shows the word "PROCEDURE" but not any of the procedure names.
- Doug

Hi Doug,
Thanks for reporting this issue. I logged a bug for it:
Bug 14474608 - FORUM - USING DELETE AS PACKAGE PROCEDURE NAME, NAV TREE RENDERS IMPROPERLY
Also note that using something like "PROCEDURE delete(key NUMBER);" prevents any member nodes from showing in the package's tree. Many other "reserved words" like select, create, insert result in compilation failure in both SQL*Plus and SQL Developer, but apparently your case should work.
Regards.
Gary

Similar Messages

  • Privilages for Package.procedure

    Hi all,
    can any one plzz help me out how to grant privilages for package.procedure.
    I had given grant execute on Package but its not working out.
    Thanks in Advance

    <FONT FACE="Arial" size=2 color="2D0000">
    The reason may be
    ORA-00942:     table or view does not exist
         ORA-06512: at line <number> ? check in that line number
       * the spelling of the table or view name.
        * that a view is not specified where a table is required.
        * that an existing table or view name exists.
      -SK
    Edited : See to that table/view used in the packages can be accessed by  granted user
    </FONT>

  • How to find the grants given to user for package/procedure?

    Hi all,
    how to find the grants in oracle for what all are the grants a user is having for package and procedure?
    Thanks & Regards,
    M.Murali..

    M. Murali
    Questions like this are asked over and over again on numerous sites on the Internet, including this forum, and answered.
    You are aware this forum has a 'Search Forum' button?
    PLEASE USE IT and STOP asking FAQ and DOC questions!!!!!!!!!!!!!!!!!!!
    Sybrand Bakker
    Senior Oracle DBA
    Experts: those who did read the documentation

  • Idea for package/procedure/function distribution ??

    Hi all
    We have multilple databases (10.2.0.3). And we have a lot of "utility" packages for both appl. util and for DBA utils.
    We have created a XXXUTIL schema on each database.
    How do we keep those schemas in sync automatically - apart from doing export/import? We will name on "master" and all other should be in sync with this one schema (packages/procedures/functions/views)
    Is there a smarter way of doing this, a pull or push replication solotiuon. We are on the 10g Enterprise verison.
    Ideas appreciated
    best regards
    Mette

    Hi,
    As you said you got a lot of utility Packages, I think you can directly compile those scripts one you changed in the master DB, there won't be any thing to Sync the Procedures from One DB to another DB.
    If it is a data then, you might gone for DB Link, Streams etc., for replicating the data.
    In order to automate your need to write a script for logging into DB and running set of scripts and disconnecting - a shell script.
    Just think is that your requirement.!!
    Pavan Kumar N

  • Synonyms for packaged procedures

    Heres something that is currently bothering me.
    Why are we not allowed to create synonyms for procedures and functions within packages ?
    Our database has too many individual procedures and functions for my liking and I would like to move some of them into packages. Consequently I want to create synonyms to avoid changing application code.
    I have found metalink note 1061643.6 which confirms this cannot be done, but it also goes on to say:
    "Oracle does this using the STANDARD package with overloaded functions and procedures such as TO_CHAR() and TO_DATE(), but how Oracle does this is proprietary information and is not available to the public."
    (Thanks Oracle)

    The basic reason for this restriction is that the Oracle synonyms are alternative names only for database objects, not for PL/SQL objects like packaged function and procedures.
    But moving stored procedures/functions to packages is a good idea, recommended by all the experts, with many benefits for you in the future.
    There is a simple solution for you problem, with very little impact on the continuity or performance of your applications:
    1. Copy the code of the DB stored procedures and functions to PL/SQL packages, mirroring them into packages subprograms.
    2. Replace the body of the DB procedures and functions with plain calls to their packages equivalents, transforming them effectively into wrappers behaving like synonyms.
    3. Change gradually the code of the application to call directly the packages functions and procedures
    4. When the change is completed, delete the wrappers.
    BTW If Oracle does not support a feature, than you it's better not to use it. Modifying the STANDARD package or using some volatile, undocumented features is not a clever move...

  • DB Link for packages/procedures

    Hello,
    Can I use use a dblink to invoke a procedure? If yes is it same same as workibg with a table using dblink?
    Thanks,
    NAG

    Hello Robert,
    It sounds exciting. Can you telll me the syntax for Pro*C. because I have people who are trying to do the same using Delphi and I believe what works for Pro*C should work for Delphi as well.
    Please do let me know.
    Thanks,
    Nandu

  • How to find out Unused Packages/Procedures/Functions/Triggers

    Hi,
    I have one database. This database is with 7 schemas. Around 1000 triggers are associated with each schema. But the application is using only some triggers.
    How to find out the used triggers? Apllications is developed in J2EE.
    Same way I want to find out the for Packages/Procedures and Functions.
    Any easy way is available?
    Please help me.
    regards
    Mathew

    Hi,
    >Audit the execution event on the objects by access.
    Kindly explain how to enable this auditing.
    regards
    Mathew

  • Serialized access for package compilation

    hi all,
    Especially for development environments i strongly need a concurrency mechanism for package, procedure, function, trigger compilation. I want to lock package, so that no one else can compile while i hold that lock. This will provide serialized access.
    Mostly developers use same database user for development, so grant will not do what i want. I assume there has to be a custom solution, ie using dbms_lock.
    Any help will be appreciated.

    Goman how are you, world is so little these days :)
    check these out, I hope they assist you -
    Is it Possible to lock a Package
    http://psoug.org/reference/dbms_lock.html
    http://asktom.oracle.com/pls/asktom/f?p=100:11:1044585173011869::::P11_QUESTION_ID:340617419132

  • How to know (package , procedures or functions) name for current sessions

    Hi all
    I'm DBA and i want to find way to get object name whatever (package , procedures or functions) for current running statement in active session.
    To clarify when i open session browser from toad i can see active sessions and see current statement for every session but without the name of the object.
    Is there any way to know this point.
    thanks in advance

    select *
      from dba_objects
    where object_id in (select nvl(t.PLSQL_ENTRY_OBJECT_ID,-1)
                           from v$session t
                          where sid = 452)
    Ramin Hashimzade

  • Naming convention for packages and classes

    Hi all,
    Is there any naming conventions for packages and classes which uses a design pattern ?. If yes what are the conventions used for business delegate,session facade, service locator,DAO and any other patterns.
    rgds
    Anto Paul

    Hi,
    that is a good question and one we have considered also. We dont yet cover the naming conventions for classes based on patterns but maybe will in the future. Currently, in the blueprints apps we tend to do some things like naminga class
    -AccountDAO etc for DAOs
    -For servicelocator we have a class called ServiceLocator viewable at https://adventurebuilder.dev.java.net/source/browse/adventurebuilder/ws/components/servicelocator/src/java/com/sun/j2ee/blueprints/servicelocator/web/ServiceLocator.java?rev=1.4&content-type=text/vnd.viewcvs-markup
    -for session facade, its a bit trickier since the name is so long and we cant add "SessionFacade" to the end of each facade class. I think in general we put "Facade" in the name, usually near the end
    -For Business Delegat, again it seems too long to add to each class name. So in the past we have added
    a "BD" to the names of the delegates. Some examples are at http://java.sun.com/blueprints/patterns/BusinessDelegate.html
    -For transfer objects we usually add a TO to the end of the name. Some examples at http://java.sun.com/blueprints/patterns/TransferObject.html
    Seems like something we could get a bit more consistent about.
    hope that helps,
    Sean

  • No packages, procedures and functions in Schema Browser

    Hi there,
    SQL Developer 2.1 Early Adopter 2:
    For Databases below 10g in Schema Browser no packages, procedures and functions are visible (no entries under these nodes).
    All other objects are shown correctly.
    Is this a known issue?
    Regards
    Andre

    The thread below seems to have an "official" response to this issue:
    SQL Develpoer EA - 9i Support
    Cheers,
    Chris

  • 942: error when trying to browse/refresh Packages, Procedures and Functions

    Hi,
    I'm using OSD 1.1 against 10g.
    I can create and compile functions in a certain schema but when I try to browse the Functions node I get "ORA-00942: table or view does not exist." and the node does not expand.
    The same thing happens with the Packages and Procedures nodes.
    Does anyone have any ideas?
    Thanks in advance
    Mike

    I've got the same problem with SQL Developer 1.1.0.23.64 against 9.2.0.4.0 and 10.1.0.4.0. This error occured only for a few package/procedure/function owners. I've found that these owners have SELECT ANY TABLE system privilege. In such case SQL Developer generates following SELECT:
    SELECT OBJECT_NAME, OBJECT_ID, DECODE(STATUS, 'INVALID', 'TRUE', 'FALSE') INVALID, 'TRUE' runnable, NVL( b.HAS_BODY, 'FALSE') HAS_BODY
    FROM SYS.DBA_OBJECTS a,
    (SELECT 'TRUE' HAS_BODY, object_name tmp_name FROM SYS.DBA_OBJECTS WHERE OWNER = :SCHEMA AND OBJECT_TYPE = 'PACKAGE BODY') b
    WHERE OWNER = :SCHEMA
    AND OBJECT_TYPE = 'PACKAGE'
    AND object_name = tmp_name (+)
    AND SUBOBJECT_NAME IS NULL
    AND OBJECT_ID NOT IN ( SELECT PURGE_OBJECT FROM RECYCLEBIN )
    Otherwise it generates
    SELECT OBJECT_NAME, OBJECT_ID, DECODE(STATUS, 'INVALID', 'TRUE', 'FALSE') INVALID, 'TRUE' runnable, NVL( b.HAS_BODY, 'FALSE') HAS_BODY
    FROM SYS.ALL_OBJECTS a,
    (SELECT 'TRUE' HAS_BODY, object_name tmp_name FROM SYS.ALL_OBJECTS WHERE OWNER = :SCHEMA AND OBJECT_TYPE = 'PACKAGE BODY') b
    WHERE OWNER = :SCHEMA
    AND OBJECT_TYPE = 'PACKAGE'
    AND object_name = tmp_name (+)
    AND SUBOBJECT_NAME IS NULL
    AND OBJECT_ID NOT IN ( SELECT PURGE_OBJECT FROM RECYCLEBIN )
    Both for 10g.
    So you could try to grant SELECT on DBA_OBJECTS to owner of your functions.
    I don't know why SQL Developer doesn't SELECT from ALL_OBJECTS in all cases.
    Jiri
    Message was edited by:
    Jiri Suchy
    You will need grant SELECT on DBA_SOURCE, too.

  • Check package/procedure level privileges for a user

    hi gurus,
    how to check the package/procedure level privileges for a user? like dba_tab_privs for tables.
    for eg: grant execute on dbms_scheduler to user1.
    now, i need to verify that user1 has execute privilege on dbms_scheduler or not.
    what's the view for this?
    thanks in advance,
    charles

    SQL> select privilege, count(*) from dba_tab_privs group by privilege order by 1;
    PRIVILEGE                       COUNT(*)
    ALTER                               19
    DEBUG                              256
    DELETE                              131
    DEQUEUE                            3
    EXECUTE                           19315
    FLASHBACK                          52
    INDEX                               14
    INSERT                              137
    MERGE VIEW                          36
    ON COMMIT REFRESH                     52
    QUERY REWRITE                          52
    PRIVILEGE                       COUNT(*)
    READ                                7
    REFERENCES                          54
    SELECT                                3752
    UNDER                                3
    UPDATE                              111
    WRITE                                5
    17 rows selected.DBA_TAB_PRIVS is for more than just tables.

  • How to check performance for Stored procedure or Package.

    Hi ,
    Can any one please tell me , how to check performance for Stored procedure or Function or Package
    Thanks&Regards,
    Sanjeev.

    user13483989 wrote:
    Hi ,
    Can any one please tell me , how to check performance for Stored procedure or Function or Package
    Thanks&Regards,
    Sanjeev.Oracle has provided set of Tools to monitor the Performance.
    Profilers being one of them; If you wish to understand more on PL/SQL Optimization, please read PL/SQL Optimization and Tuning.
    See example of DBMS_PROFILER.
    See example of PLSQL Hierarchial Profiler

  • Counting the number of lines for each procedure in a package

    Hi,
    I would like to write a query on USER_SOURCE that can display the number of code lines for each procedure/function in a package.
    Is it possible to write such a query? Maybe by using analytical functions?
    for example in the following example i would like to count the lines between "PROCEDURE proc1 IS" and "END proc1;" and between "PROCEDURE proc2 IS" and "END proc2;"
    SQL> select text  from user_source where name='PKG_TEST' and type='PACKAGE BODY';
    TEXT
    PACKAGE BODY PKG_TEST IS
      PROCEDURE proc1 IS
      BEGIN
        update t1 set EDITION_NAME = 'AAAAAAA';
        commit;
      END proc1;
    PROCEDURE proc2 IS
      BEGIN
       update t1 set EDITION_NAME = 'AAAAAAA';
        commit;
      END proc2;
    END PKG_TEST;thanks for helping

    onedbguru wrote:
    Hopefully some idiot manager isn't trying to use this sort of thing to base their decisions on developer productivity. If so, they ARE idiots. Number of code lines NEVER, EVER, EVER!!! translates into an efficient application. If I were paid by the line, my code would look like:
    select
    1
    from
    dual
    Based on the idiocy of this method of determining "performance" I would get paid $5.00 at $1.00/line. And trust me, I saw this back in the 80's and 90's and saw similar idiotic code and had to clean up the mess. Most of it wasn't efficient code to start with let alone the number of lines generated.Or the other extreme, when the PHB firmly believed that execution efficiency was gained by reducing the number of lines of code. So instead of nicely formatted, easy to read code:
          *GET NEXT ORDER NUMBER                                                               
                EXEC SQL                                                                        
                     SELECT (MAX(ORDER_NUM) + 1)                                                
                     INTO   :NEXT-NUM:IND-NULL                                                  
                     FROM   PART_ORDER                                                          
                END-EXEC.                                                                       
                IF IND-NULL < 0                                                                 
                  MOVE 1 TO NEXT-NUM.                                                           
                EXEC SQL                                                                        
                     INSERT                                                                     
                     INTO    PART_ORDER                                                         
                            (ORDER_NUM,                                                         
                             ORIGIN_LOC,                                                        
                             ORDER_TYPE,                                                        
                             ORDER_STAT,                                                        
                             CREAT_TIME)                                                        
                     VALUES (:NEXT-NUM,                                                         
                             :LOC, 'R', 'O',                                                    
                             CURRENT TIMESTAMP)                                                 
                   END-EXEC.                                                                    
                MOVE NEXT-NUM TO MASK0.                                                         
                PERFORM HEADER-PROC THRU HEADER-EXIT.                                           
            CREATE-ORDER-EXIT. EXIT.                                                     You got this:
           *GET NEXT ORDER NUMBER
            EXEC SQL SELECT (MAX(ORDER_NUM) + 1) INTO :NEXT-NUM:IND-NULL FROM
            PART_ORDER END-EXEC. IF IND-NULL < 0 MOVE 1 TO NEXT-NUM. EXEC SQL INSERT
            INTO PART_ORDER (ORDER_NUM, ORIGIN_LOC, ORDER_TYPE, ORDER_STAT,
            CREAT_TIME) VALUES (:NEXT-NUM, :LOC, 'R', 'O', CURRENT TIMESTAMP)
            END-EXEC. MOVE NEXT-NUM TO MASK0. PERFORM HEADER-PROC THRU HEADER-EXIT.
            CREATE-ORDER-EXIT. EXIT.                 Oh, wait! See the same thing all the time in this forum ... not because someone thinks fewer lines = faster code, but simply because people are sloppy.
    INSERT INTO PART_ORDER(ORDER_NUM,ORIGIN_LOC,ORDER_TYPE,ORDER_STAT,CREAT_TIME) VALUES (:NEXT-NUM,:LOC, 'R', 'O',CURRENT TIMESTAMP) ;

Maybe you are looking for

  • AfterEffects CC crashes on Startup

    Yesterday AE was working mostly fine; every hour or so it would crash. I'd start it up and it would work for another hour. This morning it was working fine for 5 minutes; I imported a .mov file and added it to the timeline and crash. Now it opens the

  • Workflow issue with Bridge and everything else

    Short and sweet. Well, not really. I use windows - so as a result, for some reason unknown to man (after a decade of waiting), I still cannot see "previews" of most, if not all of any adobe software in the windows dialogue boxes. think PDF's and the

  • Are there any SB cards that still use MME / WDM drivers?

    That's what I need to know; the company I contract for is replacing the audio recording PC and will need a sound card that's MME / WDM compliant? I have a recording PC in my home studio and it has an ASIO card (E-MU 0404 PCI) and I have to do retakes

  • Is it possible to save/export and load search queries?

    Currently, when I open the Find/Replace window (Apple+F), I see a long list over every query I have saved in the dropdown menu. This is not ideal for me because of the 100 queries, I might only use 1–10 for Project A, 11–20 for Project B, and so on.

  • Issues w/ LiveUpgrade from Solaris 10 x86 06/06 to 08/07 w/ SVMmetadevices

    Hello all... I am trying to upgrade a system from Sol 10 x86 6/06 to 8/07. For this example, we'll assume the following: * The system has only 2 disks mirrored with SVM * There are 0 free slices/partitions * /, /usr, /var are separate slices/filesyst