Why can't I grant execute on a directory?

Why can't I grant execute to a directory?
I have carried out the following:
Login as SYS
Prove that the oracle directory exists SELECT * FROM all_directories WHERE directory_name = 'dir_name';
GRANT EXECUTE ON DIRECTORY dir_name TO role_name;
The following documentation at the following address says that I can grant execute:
http://www.morganslibrary.org/reference/directories.html
And yet when I directed the dba to do it and when I query the database to see if He did it it shows me that he did:
GRANTOR                        GRANTEE                        TABLE_SCHEMA                   TABLE_NAME                     PRIVILEGE                                GRANTABLE HIERARCHY
SYSTEM                         role_name                    SYS                            dir_name                     EXECUTE                                  NO        NO       
SYSTEM                         role_name                    SYS                            dir_name                     READ                                     NO        NO       
SYSTEM                         role_name                    SYS                            dir_name                     WRITE                                    NO        NO       
3 rows selectedWhen I try it in my xe environment it throws the error:
Error starting at line 1 in command:
GRANT EXECUTE ON DIRECTORY dir_name TO role_name
Error report:
SQL Error: ORA-22928: invalid privilege on directories
22928. 00000 -  "invalid privilege on directories"
*Cause:    An attempt was made to grant or revoke an invalid privilege on a
           directory.
*Action:   Only CREATE, DELETE, READ and WRITE privileges can be granted or
           revoked on directories. Do not grant or revoke other privileges.What is going on?
Benton

Benton wrote:
Why can't I grant execute to a directory?Because you can't, according to the 10g documentation...
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9013.htm#BGEJEBCJ
However in 11g, it can be done...
http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/statements_9013.htm#BGBCIIEG

Similar Messages

  • Why doesn't the "grant execute any procedure" work?

    Hi to all.
    I want to grant the execute privilege for all SYS schema functions/procedures. To achieve it I do the following:
    SQL> connect sys/*****@orcl
    Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.4.0
    Connected as SYS
    SQL> create user test identified by test;
    User created
    SQL> grant create session to test;
    Grant succeeded
    SQL> grant execute any procedure to test;
    Grant succeeded
    According to the [http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9013.htm] the "grant execute any procedure" - grants Execute procedures or functions, either standalone or packaged.
    So, the steps seem to be right. Then, I try to connect to the test user and execute any procedure from the SYS schema, for example, dbms_lock.sleep:
    SQL> connect test/test@dizzy/orcl
    Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.4.0
    Connected as test
    SQL> begin
    2 sys.dbms_lock.sleep(1);
    3 end;
    4 /
    begin
    sys.dbms_lock.sleep(1);
    end;
    ORA-06550: line 3, column 1:
    PLS-00201: identifier 'SYS.DBMS_LOCK' must be declared
    ORA-06550: line 3, column 1:
    PL/SQL: Statement ignored
    So, the execution fails due to insufficient rights. However, the direct grant on the sys.dbms_lock works!
    SQL> connect sys/*****@dizzy/orcl as sysdba
    Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.4.0
    Connected as SYS
    SQL> grant execute on dbms_lock; to test;
    grant execute on dbms_lock; to test
    ORA-00911: invalid character
    SQL> grant execute on dbms_lock to test;
    Grant succeeded
    SQL> connect test/test@dizzy/orcl
    Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.4.0
    Connected as test
    SQL> begin
    2 sys.dbms_lock.sleep(1);
    3 end;
    4 /
    PL/SQL procedure successfully completed
    So, to be sure that the grant on any procedure from the definite scheme is given, should I avoid giving the execute any procedure grant?
    P.S. Is there any special tag for code?
    Thanks in advance.

    Sybrand, thank you for the reply.
    You are right. I tried to connect by another user NOT SYS and created the function:
    SQL> create user testic identified by i;
    User created
    SQL> grant create session, execute any procedure to testic;
    Grant succeeded
    SQL> create or replace function get1 return number is
      2  begin
      3  return 1;
      4  end;
      5  /
    Function created
    SQL> connect testic/i@orcl
    Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.4.0
    Connected as testic
    SQL> select get1 from dual;
    select get1 from dual
    ORA-00904: "GET1": invalid identifier
    SQL> select kaisa_rgali.get1 from dual;
          GET1
             1Thank you for the tag. This's exactly what I asked about.
    Finally, I tried t open the hyperlink http://download.oracle.com/docgs/cd/B10501_01/server.920/a96521/privs.htm but it failed.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • What is the "ImporterArib.bundle and why can't my system execute it?

    Most of us Mac Users that watch the Console have seen the following error:
    Adobe Premiere Pro CS6 [ ] Cannot find executable for CFBundle 0x1138e7da0 </Applications/Adobe Premiere Pro CS6/Adobe Premiere Pro CS6.app/Contents/Plug-Ins/Common/ImporterArib.bundle> (not loaded)
    ... as it appears several times when launching PP.
    What is it and why is it still a error even past the last few updates?
    The file size is 200 bytes .. when other similar bundles are many KB.
    Upon package inspection ... it is missing a info.plist, Code_Resources, and a Mac_OS file.
    What is going on Adobe?

    Expert PDF 7 Reader is legal application by Avanquest. Often it comes bundled with search hijackers, coupon adware and badware. Thus it was included in SecurityStronghold's database. Expert PDF 7 Reader itself is non-harmful.
    Expert PDF 7 Reader intrusion method
      Expert PDF 7 Reader copies its file(s) to your hard disk. Its typical file name is PDFReader.exe. Then it creates new startup key with name Expert PDF 7 Reader and value PDFReader.exe. You can also find it in your processes list with name PDFReader.exe or Expert PDF 7 Reader
    It's NOT an Adobe™ product.

  • Why can't I get Execute permission?

    Hi, sorry for what may be a simple question, but I'm very new to Macs.
    First let me say I'm working on a MacBook Pro with OS X 10.4.8 and I currently have the only account on the machine. I am the sole administrator and the sole account. Yet, when I download some programs, I can't install them. For instance, when I recently downloaded MPlayer, I mounted the DMG file and went to open what seems to me the installer - MPlayer OSX (Universal).pkg - only to have a small icon flash in the dock for a second, then nothing happens. I checked the info for the file, and I only have permission to "Read and Write", and this field is greyed so I cannot change it. The dmg file itself is also "Read and Write", though it is not greyed out. Yet, I still cannot change it because there is no option to execute.
    What might be the strangest thing though is that this doesn't happen with all applications. I successfully installed VLC player instead, as well as Firefox and a few others, while a few others have given me the same issues as MPlayer, like an installer from Microsoft to let QT play wmv files (a .mpkg file). The same thing just happened with a bittorrent client I just downloaded - Bits on Wheels. I successfully unzip the archive I downloaded to get 1 and only 1 file - Bits on Wheels.app - and when I go to open it, something flashes in the dock and then nothing. It too is "Read and Write".
    Again, sorry for my ignorance, but I've literally been using Macs for about 24 hours, and I've been combing through forums all day with no luck.

    jgibbons72
    Your missing file should be at this location: "/Applications/Utilities/Installer.app/Contents/Resources/English.lproj/PagedIn staller.nib" (or maybe a different language).
    Since you have already used Pacifist, I suggest you use this to extract a new copy of the complete Installer.app from your Install disks. It can be found in the BaseSystem.pkg. The current version is 2.1.0—if the version on the Install disk is earlier, I would then download the Mac OS X 10.4.8 Combo Update (PPC) (149MB), or Mac OS X 10.4.8 Combo Update (Intel) (294MB) as appropriate.
    If it comes to that, does anyone know of any guides on how to do this?You could do worse than read this KB article: Mac OS X 10.4: About installation options. But ask again if you're not sure. Apple won't do this for you (for free, at least) but they might guide you through it.

  • GRANT EXECUTE ON SCHEMA.PACKAGE.PROCEDURE TO USER

    Hi,
    GRANT EXECUTE ON SCHEMA.PACKAGE.PROCEDURE TO USER
    returns:
    ORA-00905, do you know why? Can I grant privileges on procedure inside package?
    thanks

    As per my knowledge of oracle, we cannot grant privileges on procedure inside a package.
    <br><br>
    Raj<br>
    <b>www.oraclebrains.com<a>
    <br><font color="#FF0000">POWERED by the people, to the people and for the people WHERE ORACLE IS PASSION.</font></b>
    <br>
    Sorry Leonardo Horikian & Kamal Kishore, I was late and didn't know that you guys have already posted the answer.
    Message was edited by:
    rajs

  • Grant execute to all procedure to a user / public

    hey!
    simple question:
    how can i gran execute on all the procedures belong to a given user - for another user (or to public)?
    should i use a roll or can i do it without it?
    thanks
    yair

    I'm thinking that I read in 11G there was a new utility that allows you to grant all from one schema to another, but why in the world would anyone want to do that? (okay... no answer required on that one)
    Sounds like you might have to write some dynamic SQL.
    For tables and views, you will need to grant all on the object to the other schema.
    For packages and procedures, you can grant execute to them.
    Or, another option would be (arg... I hate to suggest this), grant a select any table, delete any table, insert any table, execute any procedure, etc... to the user.
    This is really bad, and I don't recommend this, only noting that it is an option. If this is just for some kind of temporary purpose (e.g., testing), then this might be acceptable, however, revoke these privileges immediately.
    The better option is to write dynamic SQL and grant directly to the other schema owner. You may run into problems with views and procedures if you use a role which is why I would recommend granting directly to the user. I've also run into problems with GLOBAL_LEXARs and things related to Oracle text when granting via roles.
    But now, I have to still wonder why you would not just grant the necessary privileges that the other schema needs rather than granting everything?
    Ji Li

  • Why can not freeze book inventory Storage location and Posting block?

    Hello,
    I tried to freeze book inventory storage location and posting block at storage location level in SAP.
    1) OMBP -> "Freeze book inventory storage' is checked at that storage location.
    2) MI01 -> the 'Posting Block' and 'Freeze book inventory' in the Physical Inventory Document  is checked.
    3) Post the Physical Inventory Document by using MI02.
    But, I am still able to post inventory movement at that storage location after executing the above.
    (I run MB1C with movement type 501 at that location.
    I input the material number which are in the created Physical Inventory document.
    The posted manterial document is created after I run MB1C.
       The document date and the posting date in MB1C are the same date of Physical Inventoery Document.
    I can see this material inventory movement from MB51!! )
    My question is:  Why SAP is allowed to execute the inventory movement after the 'freeze book inventory storage location' and 'Posting block' are checked at OMBP and MI01 ?
    Any idea?
    Help me, thank you.
    Regards,
    Sylvia Chen

    Problem solved.  Thank you for all help!!

  • Grant execute on javaclass is not working

    I have successfully compiled a java class in schema two which provides a connection to an OEM data source. I subsequently compiled another java class, also in schema two, that uses the connection in the connection class and loads a temp table. Now, the connection class should really be in a different schema, so I recompiled it in schema one, changed the class name in schema two and then recompiled the one in schema two to essentially remove it from the picture.
    When I tested my call specification to the second class, which loads the temporary table, I get an error, as expected because the connection class no longer exists in schema two.
    On page 2-15 of the Java Developer's Guide 11g Release 1, it says:
        You can provide other users the right to run your class in the following ways:
            Using the loadjava -grant option:
            Using the following command:
                SQL> grant execute on myclass to scott;However, when using the second option (as the user of schema one where I just recompiled it), I get a message that the class does not exist. I have done everything I can think of to confirm that the name I have entered is correct including:
    select dbms_java.shortname('long classname') from dual;Is this not really an acceptable way to grant execute privileges on a java source to another schema?
    Thanks,
    Gregory

    Hi,
    you can use quotation mark, because the grant internally transform your javaclass in uppercase.
    So :
    grant execute on "myclass" to scott ;
    will succeed as
    grant execute on myclass to scott ;
    will not ;o)
    regards,
    Virgile CREVON
    Edited by: user513154 on 12 juil. 2011 04:58

  • Grant execute on DBMS_CRYPTO package (11R1)

    I figured out I needed to grant my user access to this SYS package using:
    SQL> grant execute on DBMS_CRYPTO to lob_demo;
    Grant succeeded.
    yet after doing this, I still get this error:
    SQL> select DBMS_CRYPTO.HASH(bytes, DBMS_CRYPTO.HASH_SH1) from blobslicer where id=1;
    select DBMS_CRYPTO.HASH(bytes, DBMS_CRYPTO.HASH_SH1) from blobslicer where id=1
    ERROR at line 1:
    ORA-06553: PLS-221: 'HASH_SH1' is not a procedure or is undefined
    Yet if I use the numeric constant for DBMS_CRYPTO.HASH_SH1 (3), it works:
    SQL> select DBMS_CRYPTO.HASH(bytes, 3) from blobslicer where id=1;
    F5A7338EFFEB15A49AFC9545393EF685BB51F931
    So what am I missing that prevents me from having access to a constant in the package when I can successfully use one of the function of that same package?
    Thanks, --DD                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Maybe, that makes a little bit clearer the difference
    between usage of package constants in sql and pl sql...That's what I suspected, thank you for hammering the point home Maxim.
    The taken away for me is that package constants are not available to SQL code, only to PL/SQL code. (irrelevant of their type most likely).
    I actually tried to grant my user SELECT privileges on the package, because accessing a constant from a package is more akin to SELECT than EXECUTE, but of course one cannot do that.
    Thank you both again for the help. --DD                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Why can not I see the name of a child process?

    Hi,
    I implemented a program for my project.
    My program has two processes. One is a parent process. Another is a child process.
    The parent process forks its child process. The child process is executed by execl() system call.
    The program code implemented is followed.
    === abbreviation ===
    switch(itmr_forkid = fork()) {
    case 0:
    RCode = execl("./itmr", "itmr", (char *) 0);
    exit(0);
    break;
    === abbreviation ===
    I executed the program. And then I pressed "ps -ef" on command line.
    [stp1ggsn1][user/shlim] ps -ef
    UID PID PPID C STIME TTY TIME      CMD
    root 29402 29376 38 Mar 06 pts/0 11376:36 ibgfb
    root 29403 29402 0 Mar 06 pts/0 0:15
    However, why can not I see itmr process name for the child process?
    When I executed the program for the parent process and the program for the child process respectively, I can see itmr process name for the child process.
    I tried to look for the cause. But I could not find out the answer.
    Please, give me your answer. Thank you for your answer in advance.

    Hi,
    I am sorry that I loaded my question two times by mistake.

  • Why can't we have a real 'finalise'

    Hi :)
    As we know, all advice about the 'finalise' method is to never
    use it, don't override it, pretend it doesn't exist, and if you ever
    actually do write code in it, make sure it doesn't throw an exception,
    and make sure (can't remember if this is just a 'myth') that it
    executes in a very small time period.
    Now, i don't have a problem with the requirement for this implementation,
    but why can't we have a 'finalise' method that we can implement code
    in.
    Personally, I would love to have such a method where I can close my
    resources, even do other things to conceptually 'end' my objects life.
    Consider how ridiculous it would be if an OO language said: "yes,
    there is a constructor, but don't write code in it ..., oh, you wan't to
    'initialise' your object you say? well, create a pattern or interface or
    whatever, implement an 'init' method, and always call that'. Anyone
    who had a programming language tell him that would drop it for
    a more sensible one.
    So come on ... we have a method (even as many as we feel like, assuming
    signatures) to 'establish' our object, why are we disabled and disallowed the
    option of having one to finalise it (even; not sure of the appropriateness: ones
    matching the constructor signatures).
    who's with me? :) !

    Where is your problem ?
    Use a finally clause...Hence the fragileness. Out of the population of
    developers, what percentage do you suppose remember to
    do that? It would be MUCH better for the VM to take
    care of it, destructing/finalizing objects either as
    soon as they are no longer strongly reachable (hard to
    implement), or at least at SOME point before the app
    dies (the GC COULD have been designed to GUARANTEE
    running before app termination)What I mean was that you can do something (clean up used connections, streams etc.) but let the GC do the rest. By the way it isn't guaranteed that the GC will run a full garbage collection before you close.

  • Does GRANT CREATE ANY PROCEDURE auto grants EXECUTE on created obj to user?

    I have a User ABC which has GRANT CREATE ANY PROCEDURE on schema XYZ. Now, I create a new Function in schema XYZ using my ID ABC named "func123". My question is, would my User ID ABC being creator of func123 be able to EXECUTE it by default ???
    Note: ID ABC has not been explicitly given GRANT EXECUTE on this func123 function, neither it has GRANT EXECUTE ANY PROCEDURE on schema XYZ.
    Thanks in advance.

    There is no such thing as 'create any procedure on schema xyz'. When an user has create any procedure, he can create a procedure in any schema, including SYS.
    You have an unprotected and unsecured database by granting this powerful privilege to multiple users.
    Also when you create a procedure in a different schema, that schema becomes the owner, not the user creating it.
    Kindly brush up your basics and (re)read documentation.
    Sybrand Bakker
    Senior Oracle DBA

  • To grant execute on a specific procedure in a package

    is there a way to grant execute on a specific procedure in a package without granting execute to the package itself.

    Case 1: If you have package function,
    ->Then you can create a view on it and give access to specific user.
    Case 2: If you have package procedure
    -> I think, there is no direct method to GRANT part of package.
    -> Make GLOBAL procedure only the one that you want to grant to the user. Now if you grant the package (having few global), user only able to access the GLOBAL's only..
    So how do u implement?
    PACKAGE global_pkg
    Procedure first_global_procedure;
    Procedure second_global_procedure;
    END global_pkg;
    Now You create Package as per user access:
    Package user_1_pkg
    call first_global_procedure;
    END;
    Package user_2_pkg
    call second_global_procedure;
    END;
    Now, you Grant user_1_pkg to USER1 and user_2_pkg to USER2

  • Error granting EXECUTE on DBMS_JAVA:-4042:ORA-04042: procedure, function,

    Hi .
    I 'm experiencingn the following problem when granting acess to the sys user can any one help please in this issue.I 'm using an oracle 10 g on a solaris system.
    Granting EXECUTE on DBMS_JAVA to SYSTEM WITH GRANT OPTION
    Error granting EXECUTE on DBMS_JAVA:-4042:ORA-04042: procedure, function,
    Thanks.

    You need to execute this with user "sys"
    see my test please:
    oracle@myserver:~> sqlplus "/ as sysdba"
    SQL*Plus: Release 11.2.0.1.0 Production on Tue Aug 17 13:24:28 2010
    Copyright (c) 1982, 2009, Oracle. All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    sys@MYSID> grant EXECUTE on DBMS_JAVA to SYSTEM WITH GRANT OPTION;
    Grant succeeded.
    sys@MYSID>as I check ORA-04042: procedure, function, package, or package body does not exist
    I can see that you issue is that you don't have Oracle JVM option installed in your database.
    start database configuration assistant (dbca) choose configure database options operations select your DB SID and install Oracle JVM for your database (find it under Standard database components button)
    HTH, Regards

  • Grant execute any function or package

    Hi,
    Does the below command give execute priviliges on functions and packages too ?
    grant execute any procedure to <user>;
    When i give same for fucntion it gives following error,
    SQL> grant execute any function to user2;
    grant execute any function to user2
    ERROR at line 1:
    ORA-00990: missing or invalid privilege
    Thanks.

    EXECUTE ANY PROCEDURE grants permission to all procedures and all functions, whether stand alone or packaged.
    Hopefully, you're well aware of this, but the various ANY privileges, like EXECUTE ANY PROCEDURE, are exceptionally powerful. You want to be very cautious about granting those privileges because they can introduce a number of security holes.
    Justin

Maybe you are looking for