Grant permission to another's schema's package

Dear buddies,
I want to give access to another user to access a package in my schema.
How should I be doing it?
I saw in this page but how to refer to the different schema the package is residing?
http://www.techonthenet.com/oracle/grant_revoke.php
Please guide me.
Thank You.
Nith

user645399 wrote:
Dear buddies,
I want to give access to another user to access a package in my schema.
How should I be doing it?
I saw in this page but how to refer to the different schema the package is residing?
http://www.techonthenet.com/oracle/grant_revoke.php
Please guide me.
Thank You.
NithDear Nith
Here's the command:
grant execute on your_schema.your_package to the_second_user;Kamran Agayev A.
Oracle ACE
My Oracle Video Tutorials - http://kamranagayev.wordpress.com/oracle-video-tutorials/

Similar Messages

  • Grant permission of few  functions of a package

    Hi,
    iam not able to grant execute permission on a specific function or a procedure in a package to another database schema user, kindly help me...
    grant execute on <package>.<function> to <another user>...???...
    Thanks And Regards,
    Vairavan.S

    I discussed this in another thread of Re: access over elements of an package... :-). I am starting to weary of your reluctance to read the documentation or try stuff for yourself.
    Anyway.
    Start with one package.
    CREATE PACKAGE secret_pkg AS
      PROCEDURE P1 (val IN NUMBER);
      PROCEDURE P2 (whenever IN DATE);
    END;
    /Create a body for this package. To restrict access to a subset of procedures...
    CREATE PACKAGE open_pkg AS
      PROCEDURE P1 (val IN NUMBER);
    END;
    CREATE PACKAGE BODY open_pkg AS
      PROCEDURE P1 (val IN NUMBER) AS
      BEGIN
        secret_pkg.p1(val);
      END;
    END;
    /You grant EXECUTE on OPEN_PKG to other users. Simple.
    Cheers, APC

  • Grant permission on SCOTT/tiger schema

    grant select, insert, update, delete on EM to BOMBAC
    I want to add permission that user BOMBAC can see EM table from SCOTT/tiger scheme and use it. But he can not see and use it. Any idea why?
    regards

    yes i try with public but it seems that i do not have enought privilegies
    *Cause:    An attempt was made to change the current username or password
    without the appropriate privilege. This error also occurs if
    attempting to install a database without the necessary operating
    system privileges.
    When Trusted Oracle is configure in DBMS MAC, this error may occur
    if the user was granted the necessary privilege at a higher label
    than the current login.
    *Action:   Ask the database administrator to perform the operation or grant
    the required privileges.
    For Trusted Oracle users getting this error although granted the
    the appropriate privilege at a higher label, ask the database
    administrator to regrant the privilege at the appropriate label.

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

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

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

  • Grant Permission base on Scheme ?

    Is there any way to grant permission base on scheme ??
    e.g.
    I want to allow user to select all table in another scheme. Beside grant permission for each table one by one, is there any way to do this ??

    There is no single privilege grant for this-- you'll have to grant privileges on individual objects. Of course, you can script these grants using a few lines of PL/SQL, i.e.
    DECLARE
      sqlStmt VARCHAR2(1000);
    BEGIN
      FOR x IN (SELECT * FROM user_tables)
      LOOP
        sqlStmt := 'GRANT SELECT ON ' || x.table_name ||
                   ' TO <<another user>>';
        EXECUTE IMMEDIATE sqlStmt;
      END LOOP;
    END;Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Grant permission to all objects of a schema to apps user(Oracle 10g)

    Dear Fiiends,
    I would like to grant permission on all objects of a particular schema to apps user(Oracle 10g).How do I do it?
    (ex)grant all on <schemaname>.<objectname> to apps with grant option.
    This is the permission i want to give but i can't do it for all objects one by one so how do i do it in a single command.
    Regards,
    Arun

    You can't do it in a single command. You have to give object-by-object privileges (you could grant something like SELECT ANY TABLE, but that applies to every schema in the database and is generally a rather bad idea). You can, however, use a bit of dynamic SQL to do the job, i.e.
    FOR x IN (SELECT * FROM user_tables)
    LOOP
      EXECUTE IMMEDIATE 'GRANT ALL ON schema_name.' || x.table_name || ' TO apps WITH GRANT OPTION';
    END LOOP;You can do the same with other object types, hit DBA_TABLES rather than USER_TABLES if you don't want to run this as the object owner, etc.
    Justin

  • Grant permission to Schema

    Hi,
    One of my team member has created a schema "CUSTOMER".  I have access to SYSTEM user and unable to see that schema "CUSTOMER" under catalog objects.  I am unable to grant access to other schema members using SYSTEM user or my own user because the schema is originally created by other team member.
    I get an error "Could not grant privilege 'SELECT' on 'CUSTOMER'. You are not authorized to perform the required actions"
    Can someone tell me how to grant access.
    Regards.
    Anjan

    Hi Anjan,
    Granting the access to a schema to other users is possible only from the dbuser using which the schema was created.
    In your case, you should login to the system with the user which created the schema "CUSTOMER" and from that user you should be able to grant access to "CUSTOMER" schema to SYSTEM user and your USER.
    Regards,
    Rashmi

  • Grant permission through dynamic parameters entered by user through web app

    This is my code.
    f1=request.getParameter("URL");
    out.println("parameter f1 ===>"+f1);//user name
    f2=request.getParameter("URL1");
    out.println("parameter f2 ===>"+f2);//table name
    f3=request.getParameter("URL2");
    out.println("parameter f3 ===>"+f3);//privilege name
    sql="GRANT f3 to \"" + f1 + "\""+"on \""+f2+"\"";
    st= con.createStatement();
    st.execute(sql);
    out.println("grant succeeded");
    it is giving error that invalid SQL query.please help in writing this code.Any other method for giving dynamic SQL query for granting permission.

    Welcome to the forum!
    >
    Any other method for giving dynamic SQL query for granting permission.
    >
    You should NOT be using dynamic SQL for issuing grants. Security is something that should be taken seriously and grants should ONLY be given to users that need the permission. The necessary grants should be created and reviewed BEFORE they are executed.
    Best practices are to create scripts containing your DDL and place those scripts in a version control system.
    The scripts can then be executed in sql*plus, sql developer or another tool and the results reviewed to ensure that they executed properly.
    If dynamic SQL is needed you:
    1. create a sql statement manually and test it to make sure it works properly
    2. create the code to assemble similar statements and VIEW the output DDL to make sure that it is valid
    3. add exception handling and security handling to the code so that is can only be used for the intended operations and is not subject to SQL injection.
    4. manually execute the DDL produced by the code to make sure there are no syntax errors.
    Clearly you did not even test your SQL before trying to write code to produce it or you would have known your syntax is invalid.
    >
    sql="GRANT f3 to \"" + f1 + "\""+"on \""f2"\"";
    >
    >
    it is giving error that invalid SQL query.
    >
    Of course it is. That code might try to produce the equivalent of:
    GRANT select to "scott" on "hr.employees";There are SEVERAL errors in that code.
    1. You are enclosing the SCHEMA in double-quotes. That means the actual user name will be treated as case-sensitive. So if someone provides 'scott' it will be considered lower-case. There is NO user "scott" in Oracle unless you created that user yourself and used double-qoutes to preserve the case.
    ALL of the schemas created by Oracle, and most users, are UPPER case. So your code will not find any name if the user supplies a LOWER case or mixed-case value.
    2. You are enclosing the target schema and object name in double quotes. There are two things wrong. The same case issue applies again. And the string "hr.employees" will be treated as ONE value. The proper way to quote such a value is:
    "HR"."EMPLOYEES"3. You have the DDL components in the wrong order, hence it is invalid. The ON clause comes BEFORE the target schema.
    GRANT select to on hr.employees to scott;See the SQL Language doc for the GRANT statement
    http://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_9013.htm
    All of the issues you have demonstrate why you should NOT be using dynamic SQL to do DDL. You don't understand the syntax so you can't write code to implement that syntax.
    The syntax is much more complex than the siimple code you are trying to use.
    Grant statements often need to include "SCHEMA.OBJECT" syntax and your code makes no provision for that.
    DDL needs to be tightly controlled and doing it in code can create huge, gaping security holes.
    Abandon your method and use prepared scripts for the DDL commands you need to execute.

  • Grant Permission on Recordtype

    I have a recordtype RIB_XCostChgHrDtl_REC in 1 schema. In another schema I require to use it.
    For granting permission I have used the following :
    SQL> grant all on RIB_XCostChgHrDtl_REC to obiee;
    grant all on RIB_XCostChgHrDtl_REC to obiee
    ERROR at line 1:
    ORA-01775: looping chain of synonyms
    SQL> grant execute on RIB_XCostChgHrDtl_REC to obiee;
    grant execute on RIB_XCostChgHrDtl_REC to obiee
    ERROR at line 1:
    ORA-01775: looping chain of synonyms
    What can be the possible solution to this problem?

    I did this query
    SQL> create public synonym RIB_XCostChgHrDtl_REC for RIB_XCostChgHrDtl_REC;
    create public synonym RIB_XCostChgHrDtl_REC for RIB_XCostChgHrDtl_REC
    ERROR at line 1:
    ORA-00955: name is already used by an existing object
    SQL> drop synonym RIB_XCostChgHrDtl_REC;
    drop synonym RIB_XCostChgHrDtl_REC
    ERROR at line 1:
    ORA-01434: private synonym to be dropped does not exist
    so some other prob is there..

  • AIA FP installation - ORA-01031: insufficient privileges and JPS-04201: Cannot grant permission(s). Grant already exists for grantee errors

    Hi All,
          We are installing AIA FP 11.1.1.7 on SOA Suite 11.1.1.7(no patch has been applied, after SOA Suite ODI 11.1.1.7 is installed on it) this is for AIA Comms 11.4 PIP. Below error can be seen in oracle inventory logs while installing AIA FP11.1.1.7 -
    BUILD FAILED
    /u02/app/Oracle/Middleware/AIAHOME/Infrastructure/Install/AID/AIAExecuteDriver.xml:223: The following error occurred while executing this line:
    /u02/app/Oracle/Middleware/AIAHOME/Infrastructure/Install/AID/AIAExecuteDriver.xml:65: The following error occurred while executing this line:
    /u02/app/Oracle/Middleware/AIAHOME/aia_instances/DEVAIA/tmp/AIDExecuteDP_temp_2130290318.xml:12: The following error occurred while executing this line:
    /u02/app/Oracle/Middleware/AIAHOME/Infrastructure/Install/AID/lib/AIDConfigurationLibraryTasks.xml:298: java.sql.SQLSyntaxErrorException: ORA-01031: insufficient privileges
    Also before this i can see,
    [exec] Command FAILED, Reason: JPS-04201: Cannot grant permission(s). Grant already exists for grantee [GranteeEntry: codeSource=file:${soa.oracle.home}/soa/modules/oracle.soa.ext_11.1.1/classes/oracle/apps/aia/core/util/- principals=[]].
         [exec]
         [exec] WARNING!!! Grant already exists for grantee.
         [exec] No stack trace available.
         [exec] Disconnected from weblogic server: AdminServer
       [delete] Deleting: /u02/app/Oracle/Middleware/AIAHOME/aia_instances/DEVAIA/tmp/keyFile
       [delete] Deleting: /u02/app/Oracle/Middleware/AIAHOME/aia_instances/DEVAIA/tmp/propFile
    Also,
    In processFieldStringXREF Admin Password
    In processFieldStringJMSDB Temporary Tablespcae
    In processFieldStringInvalid Database Schema name - Is this an error
    In processFieldStringAIA Lifecycle Port
    In processFieldStringAIADB SYS. USER
    In processFieldStringInvalid Database Schema name
    In processFieldStringJMSDB Default Tablespcae
    In processFieldStringXREF SYS. USER
    do anyone had idea on it, we are installing on Solaris SPARC machine.
    Thanks and Warm Regards,
    RR

  • Error while running Re-create grants and synonyms for APPS schema

    Hi,
    I have upgraded customer's Oracle Apps 11i (11.5.10) database to Oracle 10g R2. While executing '+Re-create grants and synonyms+ ' as given in Note: 362203.1, I am gettng error:
    plus80 -s APPS/***** @E:\EBSTEST\ebstestappl\ad\11.5.0\admin\sql\adappsgs.pls &systempwd 1 INV APPLSYS APPS TRUE FALSE TRUE
    Error:
    Program exited with status 3
    Cause: The program terminated, returning status code 3.
    Action: Check your installation manual for the meaning of this code on this operating system.Connected.
    old 2: ad_apps_private.create_grants_and_synonyms(&2,'&3','&4','&5','FALSE');
    new 2: ad_apps_private.create_grants_and_synonyms(1,'INV','APPLSYS','APPS','FALSE');
    begin
    *+
    ERROR at line 1:
    ORA-20000: ORA-00955: name is already used by an existing
    object:create_grants_and_synonyms(1,INV,APPLSYS,APPS): create_base_gs(INV,APPS): In Synonyms
    Loop:create_synonym(INV,MTL_ONHAND_DISCREPANCY,APPS,MTL_ONHAND_DISCREPANCY):
    do_apps_ddl(APPS,CREATE SYNONYM "MTL_ONHAND_DISCREPANCY" FOR INV."MTL_ONHAND_DISCREPANCY"):
    ORA-06512: at line 5
    MTL_ONHAND_DISCREPANCIES
    I checked the database and there isn't MTL_ONHAND_DISCREPANCY synonym. But there is MTL_ONHAND_DISCREPANCIES synonym.
    This is an upgraded instance from 11.0.3 and first time I am running Re-create grants and synonyms for APPS schema.
    Plz let me know if anyone of you faced this issue.
    Rgds,
    Thiru

    Hi,
    there is no such table MTL_ONHAND_DISCREPANCY or synonym in Applications 11.5.10.2. Is that custom table created in your db?
    After dropping this table from APPS schema 'Re-create grants and synonyms for APPS schema' went thru fine.Its correct
    This table does not exist in INV schema in 11.5.10.2.
    Could be possible that the consultant could have created this table in INV and APPS schema by mistake or whatever.Yes, with the same name, there might be table in APPS SCHEMA. When you run recreate grants and synonyms, adadmin tries to create synonym for that table in APPS schema. since there is object available with the same name in apps chema, you got that error.

  • Unexpected error while granting permission in site permission !

    Hello,
    While granting permission to user in site permission it throws unexpected error in IE while in chrome it works perfect !
    Any idea ? 
    Thank you in advance !
    Dipti Chhatrapati

    Hi Dipti,
    I agreed with Scott, please check the log file to find more information based on the correlation ID.
    More information about checking log based on correlation ID, please refer to the link:
    http://mroffice365.com/2011/09/using-correlation-id-to-find-out-sharepoint-problem/
    In addition, whether you used the same account when using the IE and Chrome.
    Which version did you use for IE? Please try to use IE 10 32-bit, compare the result.
    Make sure that account you used in IE have manage permission on the site.
    Please add the site into IE Trusted Site, compare the result.
    Best Regards,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Wendy Li
    TechNet Community Support

  • Error In Adadmin Re-Create Grants And Synonyms For Apps Schema

    HI,
    I upgraded the my DB from 9.2.6 to 10.2.4.It was sucessfull.
    While doing Postupgradayion steps -
    Recreate grants and synonym for apps
    a. Log in to server with applmgr user
    b. Execute adadmin
    c. Choose -> Maintain Applications Database Entities menu
    d. Choose -> Re-create grants and synonyms for APPS schema
    2 workers got failed ...
    i chked the worker log file i found
    sqlplus -s APPS/***** @/stageAPP/stageappl/ad/11.5.0/admin/sql/adappsgs.pls &systempwd 1 PO APPLSYS APPS TRUE FALSE TRUE
    Connected.
    old 2: ad_apps_private.create_grants_and_synonyms(&2,'&3','&4','&5','FALSE');
    new 2: ad_apps_private.create_grants_and_synonyms(1,'PO','APPLSYS','APPS','FALSE');
    begin
    ERROR at line 1:
    ORA-20000: ORA-00955: name is already used by an existing
    object:create_grants_and_synonyms(1,PO,APPLSYS,APPS): create_base_gs(PO,APPS):
    In Synonyms
    Loop:create_synonym(PO,XXGOD_SEQ_DECORTIMESHEET_HDR,APPS,XXGOD_SEQ_DECORTIMESHEE
    T_HDR): do_apps_ddl(APPS,CREATE SYNONYM "XXGOD_SEQ_DECORTIMESHEET_HDR" FOR
    PO."XXGOD_SEQ_DECORTIMESHEET_HDR"):
    ORA-06512: at line 5
    Workaround $adctrl
    Control
    Worker Code Context Filename Status
    1 Run Grants/Synonyms R115 adappsgs.pls FAILED
    2 Run Grants/Synonyms R115 Wait
    3 Run Grants/Synonyms R115 Wait
    4 Run Grants/Synonyms R115 Wait
    5 Run Grants/Synonyms R115 Wait
    6 Run Grants/Synonyms R115 Wait
    7 Run Grants/Synonyms R115 Wait
    8 Run Grants/Synonyms R115 Wait
    9 Run Grants/Synonyms R115 Wait
    10 Run Grants/Synonyms R115 Wait
    11 Run Grants/Synonyms R115 Wait
    12 Run Grants/Synonyms R115 Wait
    13 Run Grants/Synonyms R115 Wait
    14 Run Grants/Synonyms R115 Wait
    15 Run Grants/Synonyms R115 Wait
    16 Run Grants/Synonyms R115 Wait
    SQL> select owner, object_type from dba_objects where object_name = 'XXGOD_SEQ_DECORTIMESHEET_HDR';
    OWNER OBJECT_TYPE
    PO SEQUENCE
    APPS SEQUENCE
    Its Cutom Object .. I think i need to drop/rename anyone .. which one i should drop / rename .
    Or
    Is it possible to skip the failed workers .. if do .. please give me the steps ...
    Thanks

    Hi;
    There is 8 option(hidden) avaliable but i suggest dont use this option.(As you mention its a custom,if you belive it wont problem you can use this hidden option or drop 'XXGOD_SEQ_DECORTIMESHEET_HDR' and recreate it later,its own your risk) By the way please check below notes which is similar error like yours
    Run Adadmin To Recreate Grants And Synonyms ORA-20000 ORA-00955 In Synonyms Loop:create_synonym(GL,PLAN_TABLE,APPS,PLAN_TABLE) [ID 437714.1]
    ADADMIN MAINTAINING APPLICATIONS GRANTS AND SYNONYMS APP-931 ORA-955 ORA-20000 [ID 1014455.102]
    Regard
    Helios

  • How add grant permission in java.policy

    hi master
    sir serch in my system
    C:\Program Files\j2sdk_nb\j2sdk1.4.2\jre\lib\security
    C:\Program Files\j2sdk_nb\_jvm\lib\security
    C:\Program Files\Java\j2re1.4.1_03\lib\security
    C:\Program Files\Java\jre1.5.0_10\lib\security
    sir i have many java.policy file which one is default java.policy file
    how i add the code
    permission java.util.PropertyPermission "java.version", "read";
    permission java.util.PropertyPermission "java.vendor", "read";
    permission java.util.PropertyPermission "java.vendor.url", "read";
    permission java.util.PropertyPermission "java.class.version", "read";
    permission java.util.PropertyPermission "os.name", "read";
    permission java.util.PropertyPermission "os.version", "read";
    permission java.util.PropertyPermission "os.arch", "read";
    permission java.util.PropertyPermission "file.separator", "read";
    permission java.util.PropertyPermission "path.separator", "read";
    permission java.util.PropertyPermission "line.separator", "read";
    permission java.util.PropertyPermission "java.specification.version", "read";
    permission java.util.PropertyPermission "java.specification.vendor", "read";
    permission java.util.PropertyPermission "java.specification.name", "read";
    permission java.util.PropertyPermission "java.vm.specification.version", "read";
    permission java.util.PropertyPermission "java.vm.specification.vendor", "read";
    permission java.util.PropertyPermission "java.vm.specification.name", "read";
    permission java.util.PropertyPermission "java.vm.version", "read";
    permission java.util.PropertyPermission "java.vm.vendor", "read";
    permission java.util.PropertyPermission "java.vm.name", "read";
    and this code
    grant codeBase "C:\Program Files\j2sdk_nb\j2sdk1.4.2\jre\lib\security
    permission java.security.AllPermission;
    give me idea how i add my code in java.policy file of using the oracle database in applete
    thank
    aamir

    in the control panel see what runtime is used by ur applet, mostly the lastest one u installed.
    C:\Program Files\Java\jre1.5.0_10\lib\security
    in this folder grant permission for the codebase where ur database is located.

  • How to grant permission to user to access Lync 2013 OcsPowerShell

    I'm writing script for our first line for creating Lync users. I need give access to connect to https://lyncpool.domain.local/OcsPowerShell via powershell. Only users in CSAdministrator group have permission to connect, but this group have to much
    privileges. I created custom group with custom permissions and I need grant permission to this group to access OcsPowerShell.

    Try giving them CsUserAdministrator RBAC membership. They should be able to run the following cmdlets to manage the users only:
    Disable-CsUser
    Enable-CsUser
    Get-CsAdUser
    Get-CsUser
    Get-CsUserClusterInfo
    Move-CsUser
    Move-CsLegacyUser
    Set-CsUser
    Grant-CsClientPolicy
    Grant-CsClientVersionPolicy
    Grant-CsConferencingPolicy
    Grant-CsDialPlan
    Grant-CsExternalAccessPolicy
    Grant-CsHostedVoicemailPolicy
    Grant-CsLocationPolicy
    Grant-CsPinPolicy
    Grant-CsVoicePolicy
    Get-CsArchivingPolicy
    Get-CsClientPolicy
    Get-CsClientVersionPolicy
    Get-CsConferencingPolicy
    Get-CsExternalAccessPolicy
    Get-CsHostedVoicemailPolicy
    Get-CsLocationPolicy
    Get-CsPinPolicy
    Get-CsVoicePolicy
    Get-CsClientPinInfo
    Unlock-CsClientPin
    Lock-CsClientPin
    Set-CsClientPin
    Get-CsClientVersionConfiguration
    Get-CsDialPlan
    Get-CsSite
    Get-CsComputer
    Get-CsNetworkInterface
    Get-CsPool
    Get-CsService
    Get-CsSipDomain
    Revoke-CsClientCertificate
    If this helped you please click "Vote As Helpful" if it answered your question please click "Mark As Answer" | Blog
    www.lynced.com.au | Twitter
    @imlynced

Maybe you are looking for

  • Running a servlet in J2EE server

    Hi there! I'm sorry if I have placed the query in a wrong place, can anybody help me where can I get some step by step process of deploying a servlet in J2EE server, please help me, and your kind help will be appreciated, regards, shabeer

  • Itunes and Quicktime Installation issues

    I am getting seriously frustrated! I am tring to install the Itunes 8 version and I already had Quicktime on my computer. It keeps giving me the same error: "There is a problem with this windows installer package. A program required for this install

  • JDBC Driver: MS Access

    I need to connect locally to a mdb file on a Windows OS and manipulate its data. I have tried the sun.jdbc.odbc.JdbcOdbcDriver but it does not support primary keys manipulation. I have read numerous topics about JDBC drivers for MS Access, some of th

  • I accidentally trashed a page of Note on my iphone 4S. Can I recover it? It is not included in my last backup nor it's  in icloud! thanks

    I accidentally trashed a page of Note on my iphone 4S. Can I recover it? It is not included in my last backup nor it's in icloud! thanks

  • Query to Reverse of a word

    Hi all, i want to reverse the words any word or sentences for example string require MY NAME IS RAMA RAMA IS MY NAME HE IS GOOD GOOD IS HE and another query i want is that i have a lot of descriptions like FREE PRODUCT SIZE 10 M FREE PRODUCT SIZE 20