Query-only privilege

i want to know what are query-only privileges.for example i want to grant query-only privileges to user XYZ on object emp.
can any one provide me an example for granting query-only privileges for the above scenerio.
thankx.....

Hi,
As Eric said, you can grant object privileges on the tables to the role instead of directly to the user, but remember that if the user do tables calls to the other user through PROCEDURES or FUNCTIONS, you need grant the object privilege directly to the user like a example below:
Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
SYSTEM@ORACLE10> create role readonly;
Role created.
SYSTEM@ORACLE10> grant select on test2.emp to readonly;
Grant succeeded.
SYSTEM@ORACLE10> create user test identified by test default tablespace USERS quota unlimited on USERS;
User created.
SYSTEM@ORACLE10> grant connect,resource to test;
Grant succeeded.
SYSTEM@ORACLE10> grant readonly to test;
Grant succeeded.
SYSTEM@ORACLE10> connect test/test
Connected.
TEST@ORACLE10> select count(*) from test2.emp;
  COUNT(*)
         10
TEST@ORACLE10> create or replace function EXAMPLE return NUMBER as
  2  BEGIN
  3    declare
  4       result number;
  5    BEGIN
  6    select count(*) into result from test2.emp;
  7    return result;
  8    END;
  9  END;
10  /
Warning: Function created with compilation errors.
TEST@ORACLE10> show errors
Errors for FUNCTION EXAMPLE:
LINE/COL ERROR
6/3 PL/SQL: SQL Statement ignored
6/41 PL/SQL: ORA-01031: insufficient privileges
TEST@ORACLE10> connect test2/test2
Connected.
TEST2@ORACLE10> grant select on emp to test;
Grant succeeded.
TEST2@ORACLE10> connect test/test
Connected.
TEST@ORACLE10> create or replace function EXAMPLE return NUMBER as
  2  BEGIN
  3    declare
  4       result number;
  5    BEGIN
  6    select count(*) into result from test2.emp;
  7    return result;
  8    END;
  9  END;
10  /
Function created.
TEST@ORACLE10> select example from dual;
   EXAMPLE
         10Cheers

Similar Messages

  • Update a single column in query only form

    Forms 9i, database 10g
    I am migrating the form from 6i to 9i. I have a form that is query only except for one field that can be updated. The main block1, based on a view, includes most of the person's personal data, none of which is updateable.. Another block2, based on a table, includes the 3 not-null colums that cannot be updated, and a remarks field, which can be updated. The block2 properties are set YES for insert, update, delete. The three non-updatable columns have properties set to NO for I,U and D, but the remarks column has I,U and D properties set to YES. When I enter data into the remarks field and press the Save on the Forms icon bar, I get error FRM-40508:unable to insert record and the ORA-00001:unique constraint. I don't should not be able insert and I don't want to, I just want to update one column.
    What am I not setting correctly in 9i? The same triggers and code works in 6i.
    Any suggestions are greatly appreciated.
    Vija

    No, there are no on-update triggers, but there are Post-Qry. I did run it in debug mode, but there is no good place to put a break point, since retrieval of the data works fine. Should I have key-commit trigger on the block to do the update?
    Vija

  • Data entry form problem - form in query-only mode

    Hi there,
    I am trying to create an data entry form to insert recordacross 2 out of 3 tables. The last of the four tables already have details and does not need to have record inserted into.
    This is the scenario, my four tables are Factory, Employee, Works_in. Works_in resolves a many to many relationship between Factory and Employee
    Now for a person to be employed in a factory, he must be assigned to a factory.
    I have a list of factories already in the database. After choosing a factory from the database, I want to insert records to do with his Fname, Lname, Hiredate bla, bla, bla to the Employee table.
    I have a single form with Factory as the master, and 2 tabs each for Employee and Works_in.
    After linking all my tables with the ability to choose a factory first on the master form from a combo box and after inserting records into the other forms, it says form running in query-only mode.
    What do you think?
    Many thanks in advance.
    Cube60

    I think that's too much of the wrong information.
    It sounds like you have multiple forms. Are they Modal or Non-Modal?
    What code do you use to call the form that's not working?
    Does it work initially and then stop working?
    James.

  • Enabling item on a query-only form

    Hi,
    I call a custom 6i form in query-only mode. However, now I need to enable one item on the first window for search purposes. I tried using SET_ITEM_PROPERTY,(ITEM_NAME,'Insert Allowed','TRUE') but it doesn't work. How do I achieve that functionality?
    Thanks.

    Hi,
    Thanks for the reply. I tried to set the property 'enabled' of the item to true so that I might be able to enter or update data into it.
    I am trying to change the form status from query only = YES and disable the blocks associated with it.

  • Purchase Order form in Query only mode for some users

    Hi All,
    I want to make the Purchase Orders form as query only for a single user. I tried by giving 'Query_only=Yes' in the parameters section. I am getting 'FRM-04151: You cannot query records here' message more than 10 time. I know we get this message and this is applicable to all the users. But this message is comming more than 10 times.
    Is there anyway that I can restrict the Query only mode to a single user and please suggest about the message also.
    Thanks in Advance,
    Naresh

    Naresh,
    Since you want to achieve this for one user only, I would suggest you create a new function/menu/responsibility and assign this responsibility to the user.
    Note: 400380.1 - How To Create a QUERY-ONLY FORM
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=400380.1
    For the FRM error, please review the following document.
    Note: 116074.1 - ACCESS LEVEL - REVIEW ONLY - PO
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=116074.1
    Regards,
    Hussein

  • Called form in query only mode shows messages....

    Hi All,
    I am calling a form (say B ) in query only mode from a main form (say A) . When i query the called form B , i get 5-6 alerts (which has to be acknowledged by the user) and messages of the same error type saying :
    "FRM-40208 : Form running in query only mode . Cannot change database fields. "
    I have a 100 forms to be called from the main form A. So, I prefer not to change anything in the called forms . I tried to set message_level in the form A and code the on-error / on-message triggers to avoid the messages being shown, but nothing is working . Is there anything I can do in Form A i.e the main form ???
    Thanking you in advance.

    Since the error messages are being generated by form B, it is unlikely you will be able to fix form B problem using form A. Unfortunately, you may have to fix each of the 100 called forms.

  • How to know that a form is running in query-only mode

    I have a form that can run in query-only mode or non-query-only mode depending on the current user who logs in, and I want to change its apprearance dynamically when it's in different modes (for example, enable or disable buttons). Is there a built-in or system variable from which I know that the form is running in query-only mode or not?
    Thanks,
    Shu

    The global variable solution is what we are using now. I thought there are some unpublished built-in or system variables. In my application, there is a public "menu" form from where hundreds of forms are CALLed with some in query-only mode and some in non-query-only mode depending on the current user role. :PARAMETER.QUERY_ONLY will always be 'NO' because the "menu" form is started in non-query-only mode. But it's good to know about it.
    Thank you very much for your replies,
    Shu

  • Query-Only Form

    How can I restrict a form to be used for Query-Only sometime (for some users) which can also be used as Insert/Update etc another time (for other users).
    I am using Open_Form not Call_Form.

    use
    CALL_FORM('<formname>', no_hide, no_replace,
    query_only);
    Thanks

  • Query only form problems

    I have a data block linked to a parent table in a parent/child relationship. The parent table's query key is made up of 2 data items. When the form is executed I want the users to enter values in these 2 data items and then press a button that has a trigger to execute the query. How can this be done and what properties should be set on the data block and items in this data block? Also, this form is a query only type form, no updating is to be premitted to the database.

    1. Consider to build a control block with these two items in the block.
    2. Create a LOV which will return the two items from a record group to the items in the control block.
    3. Passing the control block items' value for your query.
    Good luck.
    Jimmy

  • Purchase Orders form in Query Only mode for a single user

    Hi All,
    I want to make the Purchase Orders form as query only for a single user. I tried by giving 'Query_only=Yes' in the parameters section. I am getting 'FRM-04151: You cannot query records here' message more than 10 time. I know we get this message and this is applicable to all the users. But this message is comming more than 10 times.
    Is there anyway that I can restrict the Query only mode to a single user and please suggest about the message also.
    Thanks in Advance,
    Naresh

    Please post this question here: OA Framework
    There are so many special conditions and restrictions for E-Biz Suite that this forum is not the right place to ask these questions. The Apps forum at this location is the right place.

  • Update one column in Query only block

    Hi,
    I have a question regarding multi-record, multi-columns form block.
    A block has 100 columns (column1 to column100).
    We have two separate version of same form. In query only mode, update_allowed property of all the blocks in the form is False.
    But in query only form, one specifc column should be updateable.
    How can use Custom.pll to achive this functionality ?
    I tried following steps
    1. In when-new-item instance of column 54, wrote set_item_property and set_block_property
    2. Update allowed for block and specific item is True
    I know that Block property will override the property of items.
    Now all the items are updateable in query only form. But i want only one column updateable.
    Appreciate you valuable input on this.
    Thanks

    This is an eBusiness-related question, you should post it in the eBusiness-forum. From the "pure" forms point of view, set the Block as updateable and set all item except the one you want to be updateable to UPDATE_ALLOWED =PROPERTY_FALSE

  • Read Only privileges for Access Server and Identity Server - OAM 10g

    Hi,
    I am working on Oracle Access Manager 10g version 10.1.4.
    I use an administrative account that is a member of the 'COREid Administrators' group to log into the access console and identity console of OAM.
    Since this is the administrative account, it has the rights to modify and update all access/identity entities.
    How can I set up an account that has "view only" privileges over all access and identity objects in OAM?
    I need to log into the access and identity consoles of OAM and view all policy domains/policies/access system configuration/user manager config/group manager config etc bt not be able to modify any of them.
    Is there a way to setup such an account in OAM?
    Regards,
    Abhishek.

    Hi Abhishek,
    It is possible to define different levels of administrator, but it is not possible to give an admin read access (to objects in the consoles) without also giving modify access. I do not believe that there is a straightforward way to meet this requirement - for the Access System you could use the Policy Manager API and write your own interface (which does not have the ability to modify) but obviously this would be some development effort.
    Regards,
    Colin

  • How to display LOV on web in ENTER-QUERY mode with form or block query only.

    Hello all
    How can I display lov automatic on the web in from enter-query
    mode in form or block query only mode.
    thankx

    If I understand correctly your explanation, your called form
    fails to activate the LOV in enter-query mode when it is deployed
    and test on the browser.
    So lets proceeed like this, to make it work in all environments,
    let us programetically activate the LOV.
    HOW?
    In the called form, write in the WHEN-NEW-ITEM-INSTANCE TRIGGER
    at block level (if have more than one LOV)
    IF :SYSTEM.MODE = 'ENTER-QUERY' THEN
    IF get_item_property(:system.cursor_item,lov_name) IN ('YOUR
    LOV1', 'LOV2' etc) THEN
    IF SHOW_LOV(get_item_property(:system.cursor_item,lov_name))
    THEN
    NULL;
    END IF;
    END IF;
    END IF;
    The above code maybe tweak to suite your need and condition.
    This way, we explicitly make the LOV appear in ENTER-QUERY mode
    whenever the user clicks on an item with an attached LOV.
    Hope this helps.
    Mohammed R.Qurashi

  • Query-only mode

    I built a form using oracle developer 9i and when I tried to insert/update/delete record I get FRM-40208 form running in query-only mode. cannot change database field.
    although I checked the properties of Data block and it is query allowed, update allowed, delete allowed (all are set to true).
    I don't know what to do in order to allow 3 DML commands.
    thanks in advance

    Hello,
    if this form is called by CALL_FORM(), check the query_mode parameter which must be NO_QUERY_ONLY
    Francois

  • HOW OPEN ONE FORM IN MODE QUERY ONLY ?

    I want to create one responsibility that open the window of customer in mode query only, I don't want that this user can to do any changes.
    How do that ??

    Hi,
    Please refer to the following documents.
    Note: 434797.1 - How To Create a Query Only Responsibility In Applications 11i
    Note: 363298.1 - How To Make All The Responsibilities Read Only For A User
    Regards,
    Hussein

Maybe you are looking for

  • Issue w/ 7965 and UC 520

    Adding a few 7965s to an existing UC 520 run CME 8.0 and have seen some strange behavior.  The UC already has the SCCP45.9-3-1SR1-1S loaded in the flash and configured on the phone system.  And the phones were labeled to use SR1 or higher, but they w

  • AIP-16001 Error On EVERY Agreement Validation

    Oracle Team - I did a search on the above error here in the B2B Forum and found other folks have experienced it. The remedy (export the entire repository, purge, and import) is really not an option for me as I have over 80 deployments that would all

  • Help Importing from External Drive

    i store all my music on my external drive and when i open itunes and select preferences. click advanced, then general ... then to select my drive i choose my EXTERNAL... then all is well! all my music goes into itunes and everything is great. however

  • Batch File Command Line

    Hello dears Please guide me about below command: @echo off cd\ cd inetpub cd temp cd Host_4.1.11.5 md IPC move SecurityOld IPC xcopy Accounting IPC\Accounting /s /i xcopy OrgFundamental IPC\OrgFundamental /s /i setlocal set "location=c:\inetpub\temp\

  • Shuffle with Album or playlist problem

    Hello i can not seem to shuffle song within an album or playlist? I set shuffle to song in the settings menu , then i go to the music, artist, album name and select the first song and the shuffle icon is there BUT my nano still plays them in the corr