Maxl to Grant Execute

I am attempting to write a script to automate granting access to run calc scripts to groups. My logic is:
grant execute 'myscript' on database myapp.mydb to 'mygroup'
I am getting the following error message:
(1) Syntax error near ['on']
Any idea what I am missing here?
Thanks

Try
grant execute 'myapp'.'mydb'.'myscript' to 'mygroup';

Similar Messages

  • Essb 6.5.4-Maxl-grant execute

    I'm running into a problem when granting calc access to users via maxl. I am specifying a calc script the user should be able to run but when I look at their user settings after I run my script, they have access to all calc, not just the one I specified in the script. I tried inserting a line to take away all their access first, but that did not resolve the issue. My script looks like this: grant no_access on database FORM_MS.Msalar to G_MS_DEV;grant execute FORM_MS.Msalar.'XLNORBUD' to G_MS_DEV;Thanks for your comments

    I had this same problem and it drove me nuts. I actually found the solution posted in this forum (I want to give credit where it is due). The solution was posted by poguer on 8/13/03 under a posting titled "Problems with MaxL "Grant Execute" Code.In his post he explains that the solution does not have to do with 'grant no_access' (a solution I attempted as well). What you need to do is first grant the user access to the default calculation, and then grant them access to the specific calculation.For Example:grant execute default on database Sample.Basic to testman;grant execute Sample.Basic.rollup to testman;(rollup = your calc script, testman = your user)I know this might seem dumb, but it works!By granting rights to the default calc first, it appears that is the only way to remove access to 'calc all'. Your follow up command then takes away the access to the default calc and grants them access to the specific calc you want, in this case 'rollup'.Thanks to poguer for figuring this one out.....

  • 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

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

  • 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

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

    I'm trying to allow the "help desk" people to connect via a special database account and execute a procedure to reset or unlock a users's password or account. I've created two stored procedures as user1 and have granted EXECUTE on user1.unlockaccount. Within the procedure I have an IF statement that basically says if the username is IN the following ('SYS','SYSTEM', ect.) then dbms_output.put_line ('not_allowed'). The ELSE is 'execute immediate 'alter user '||pUserName||' identified by '||pPassWord||' account unlock';
    Then an exception when others statement to output the 'error: '||sqlerrm
    The procedure compiles fine and I can execute it without error as 'user1' but when I GRANT EXECUTE ON USER1.UNLOCKACCOUNT TO USER2 and try to 'execute user1.unlockaccout ('username'); I get insufficient privileges.
    I've also switched to SYS and "GRANT EXECUTE ON USER1.UNLOCKACCOUNT TO USER2;" but I still get the same insufficient privs error. If I don't 'set serveroutput on;' I don't see the error message, but it still fails.
    Actually, one correction. I'm getting insufficient privs as user1 as well. user1 can unlock a user's account and reset a password outside of the procedure but I'm getting insufficient privs when executing the procedure.
    Edited by: wolfeet on Jun 8, 2011 8:49 PM

    Hi,
    wolfeet wrote:
    Granting ALTER USER directly to the user defeats the whole purpose. I want to allow this user to reset user passwords and unlock user passwords but I don't want the user to be able to reset passwords for dba accounts, sys, system, yada yada. I was hoping I could do this via GRANT EXECUTE on a stored procedure.Solomon said to grant ALTER USER directly to user1, the owner of the procedure, who already has this privilege via a role.
    User2, who will run the procedure, needs only EXECUTE privileges on the procedures. User2 will not need the ALTER USER privilege.

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

Maybe you are looking for

  • Metadata: how to use same data on multiple tracks in a project.

    I need to figure out how to cut and paste metadata from one audio file to the next. I am transferring 500 vinyl albums to digital. I would like to be able to fill in the ID3 and other metadata that is the same for the 10 to 12 songs on the disk and h

  • What are the book names for MDM from SAP Education academy

    Hi SAP gurus, Can any one tell the name of the books for MDM from SAP Education academy. For example in SAP MM (material management) - it is TAMM40(part1,part2,part3,paret4...etc) So what are the names of the books for MDM from SAP Education academy.

  • Setting up a new Mac Pro

    For the last three years I have been using a 24" iMac with 4 gigs of Ram and I know it wasn't the best machine available for Photoshop but it just about did the job until recently when it started to develop some serious screen defects, which I gather

  • Can't connect wireless to internt

    I have a 2003 powerbook g4 12" AL. with panther mac OS X 10.3.9, with airport extream, a u-verse 3600hgv router. it has other wireless connections but I have to use ans ethernet cable to connect, I'm not a mac user, I got this from my daughter so I k

  • Probléme bar menu action script 3 fichier.as

    I have a bar menu that appears when you open a file main.as. Now I see that on the demo cd that you get with Adobe, there is a box to select the target file that works with. My problem is that I have the flash cs3 pro and I'm not in my target box men