Grant execute on a Package

I am trying to grant on a package and I am getting this error, what key word is missing.
1* GRANT EXECUTE ON PACKAGE MDRXML.mx_submit_message_pkg_raj to MDRCENTRAL
SQL> /
GRANT EXECUTE ON PACKAGE MDRXML.mx_submit_message_pkg_raj to MDRCENTRAL
ERROR at line 1:
ORA-00905: missing keyword
Will appreciate all the help

Hi,
you can try this.
GRANT EXECUTE ON MDRXML.mx_submit_message_pkg_raj to MDRCENTRAL
thanks

Similar Messages

  • 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 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                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • 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

  • "GRANT EXECUTE ANY PROCEDURE TO " does not work in some cases

    Hello,
    I some of my PL/SQL-packages I'm using DBMS-packages.
    Because I don't want to grant access for every single package, I granted EXECUTE ANY PROCEDURE to the user/schema of my packages.
    This did work in several installation.
    But for what reason ever, in one installation DBMS_RANDOM cannot be used (DBMS_RANDOM must be declared). If I explicitly grant execute on this package, it works. When I revoke it and renew the ANY PROCEDURE, it doesn't again.
    What's wrong.
    Version 11.2.0.2 on Win2008R2
    Regards,
    Mynz

    Mynz wrote:
    Hello,
    I some of my PL/SQL-packages I'm using DBMS-packages.
    Because I don't want to grant access for every single package, I granted EXECUTE ANY PROCEDURE to the user/schema of my packages.
    This did work in several installation.
    But for what reason ever, in one installation DBMS_RANDOM cannot be used (DBMS_RANDOM must be declared). If I explicitly grant execute on this package, it works. When I revoke it and renew the ANY PROCEDURE, it doesn't again.
    What's wrong.privilege acquired via ROLE do NOT apply within named PL/SQL procedures/functions

  • 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

  • Grant Execute on package Specification

    How to give grant to package specification to another user?
    The package has only specification and no package body
    in package specification i have defined some constants variables which i need to access from another user?
    Current if i give grant execute from the other user it is shwoing up only blank body......

    Works for me...
    As test_user...
    SQL> create or replace package test_vars is
      2    g_number number := 100;
      3  end;
      4  /
    Package created.
    SQL> grant execute on test_vars to scott;
    Grant succeeded.As scott...
    SQL> create synonym test_vars for test_user.test_vars;
    Synonym created.
    SQL> set serverout on
    SQL> begin
      2    dbms_output.put_line(test_vars.g_number);
      3  end;
      4  /
    100
    PL/SQL procedure successfully completed.
    SQL>

  • 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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Grant permission to all packages in another schema

    Is there a way I can grant access to all the packages in another user's schema?
    Please guide me.
    Thanks!

    The one way is to use cursor :
    BEGIN
      FOR Rec IN (SELECT object_name, object_type FROM all_objects WHERE owner='SOURCEUSER' AND object_type IN ('PACKAGE')) LOOP
          EXECUTE IMMEDIATE 'GRANT EXECUTE ON SOURCEUSER.'||Rec.object_name||' TO TARGETUSER';
        END IF;
      END LOOP;
    END;Edited by: Radrigez on 13.07.2011 21:38

  • Grant execute

    Hi
    the following command gives error ORA-00905: missing keyword
    i am trying to run the command from xoe schema
    Xadv is another user.
    GRANT EXECUTE
         ON
         PACKAGE
         xoe.xoe_utils_pkg.Get_Status_Desc TO xadv
    thanks in advance
    Mani

    In other words, If you want to expose only this method a "UserA", create a procedure/function that access only this method and grant it to "UserA".
    Otherwise, Once you ganted the package to a "UserA", user has access to all methods and properties declared in the package spec.
    Hope this helps.

  • 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 on schema.pakage.procedure.........

    i need to grant execute permission to a user on a procedure that is part of a package, i give this command which return error. What should i do
    grant execute on  CORE_BUSINESS.PKG_CORE_BUSINESS_IP.ALTER_TEMP_INSURED_PERSON_DATA to cb_softdata;
    [Error] Execution (3: 53): ORA-00905: missing keyword

    malhi wrote:
    i need to grant execute permission to a user on a procedure that is part of a package, i give this command which return error. What should i do
    grant execute on  CORE_BUSINESS.PKG_CORE_BUSINESS_IP.ALTER_TEMP_INSURED_PERSON_DATA to cb_softdata;
    [Error] Execution (3: 53): ORA-00905: missing keyword
    Hi
    Its not possible to grant at procedure level which exists inside a package.
    Try
    grant execute on  CORE_BUSINESS.PKG_CORE_BUSINESS_IP to  cb_softdata;Regards,
    Achyut
    Edited by: Achyut K on May 9, 2011 3:09 AM
    Nanu Kannadiga
    Edited by: Achyut K on May 9, 2011 3:17 AM

  • Grant command to view package body

    I sent a request for the DBA's to grant me rights to the package body but I only see the spec with the grant execute command.
    Here is the command I just sent:
    grant create any procedure to DEVELOPER1;
    But the DBA changed my grant command to:
    grant create procedure to DEVELOPER1;
    But I still cannot see the package body. This is on a test environment.
    Would the "create any procedure" command help me see the package body of different schema owners package bodies?
    Or is there another grant command to see different schema package bodies?

    primefsu wrote:
    My dba say that you cannot use debug in this grant because session belongs right after debug.I have no clue what your dba is talking about. Anyway:
    SQL> create or replace
      2    package pkg1
      3      is
      4        procedure p1;
      5  end;
      6  /
    Package created.
    SQL> create or replace
      2    package body pkg1
      3      is
      4        procedure p1
      5          is
      6          begin
      7              null;
      8        end;
      9  end;
    10  /
    Package body created.
    SQL> grant execute on pkg1 to u1
      2  /
    Grant succeeded.
    SQL> connect u1@orcl
    Enter password: **
    Connected.
    SQL> exec scott.pkg1.p1;
    PL/SQL procedure successfully completed.
    SQL> select  text
      2    from  all_source
      3    where owner = 'SCOTT'
      4      and name = 'PKG1'
      5      and type = 'PACKAGE BODY'
      6    order by line
      7  /
    no rows selected
    SQL> connect scott@orcl
    Enter password: *****
    Connected.
    SQL> grant debug on pkg1 to u1
      2  /
    Grant succeeded.
    SQL> connect u1@orcl
    Enter password: **
    Connected.
    SQL> select  text
      2    from  all_source
      3    where owner = 'SCOTT'
      4      and name = 'PKG1'
      5      and type = 'PACKAGE BODY'
      6    order by line
      7  /
    TEXT
    package body pkg1
        is
          procedure p1
            is
            begin
                null;
          end;
    end;
    8 rows selected.
    SQL> As you can see, package body became visible to user U1 as soon as user U1 was granted DEBUG on package.
    SY.

  • 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

  • Execute Built-in Packages

    We have recently installed 8.1.7. I am trying to make use of the built in package DBMS_SPACE. I see that it exists in the SYS schema, but when trying to execute it from the SYSTEM schema I get the error that SYS.DBMS_SPACE does not exist. Do I need to grant execute to SYSTEM from SYS on each package that I want to use individually, or is there some way to grant execute on the whole suite of built-ins?
    Thanks for any response.

    Thanks. Now I am able to call the package directly while logged on as system. However, I have another package that I have created in the system schema which calls the DBMS_SPACE package, and when I run this one, it comes back with:
    ORA-00942: table or view does not exist
    ORA-06512: at "SYS.DBMS_SPACE", line 40
    Does this intermediary package need some special privilege? I thought it would have the privileges of the owner of the package (in this case SYSTEM).
    Thanks again for any response

Maybe you are looking for

  • Automatic payment program -  urgent

    Dear all, i configured automatic payment program. when i run the automatic payment program using f110, accounting documents to Vendor account and house bank account are not generated. In the status bar, only the following messages appear: "Parameters

  • Amount diff in Payroll results and Posting amount

    In payroll results ie EDLI Contribution shows as 3,500/- to the 100 employees, but in posting document it shows EDLI Contribution amount as 5,000/-(G/L account). Why the difference amount occured? What is the solution for this? Please guide me !

  • Language selection

    Hello All... I have an interesting challenge and I figured that the pro's here would know!!! I have some projects that are in use on our LMS and we've been notified that we will need to get some additional language versions and make them available fo

  • Macbook Pro won't recognize NTFS drive

    Hi there, I had recently upgraded the hard drive on my early 2010 Macbook Pro to 500gb, and following a fresh install of Snow Leopard, I used the Bootcamp utility to create a partition for installing Windows onto. During the Windows 7 installation, I

  • List of Physical Inventory Differences

    Hi, I want the list of Physical Inventory Difference. Means we want Book Qty, Count Qty & Diff. Qty against the Material. From which t.code we can find it. Regards...