Grant read only to one user

Hello everyone,
I'd gone through unlimited forums and blogs but not got any proper solution and is getting confused as I'm not good in sql.
I had created a db user.
I need grant it following privileges same as read only apps user:-
(1) It can only select all tables except dba related tables, views etc.
(2) It can only select any table of any user
(3) It can only select any function, procedures and every custom objects.
(4) it can select any table without prefixing apps. before table.
Step by step instructions required with sql statements.

Hi,
Richa wrote:
Hello everyone,
I'd gone through unlimited forums and blogs but not got any proper solution and is getting confused as I'm not good in sql.
I had created a db user.
I need grant it following privileges same as read only apps user:-
(1) It can only select all tables except dba related tables, views etc.
(2) It can only select any table of any userThe SELECT ANY TABLE system privilege enables a user to select from any table including dba related tables and views. If you want to exclude them, then you have to give SELECT privileges on all the other tables, one at a time, and remember to do it for new tables as they are created.
(3) It can only select any function, procedures and every custom objects.The EXECUTE ANY PROCEDURE system privilege does that.
(4) it can select any table without prefixing apps. before table.Don't be sill. That's like saying "it can select from any table without giving the table name", or "without typing anything".
You might reduce how often you have to qualify the table name with the schema name by using "ALTER SESSION SET CURRENT_SCHEMA = schema_name;".
Step by step instructions required with sql statements.To give the privileges mentioned in (1), (2) and (3) to user FUBAR, log in as SYSTEM and say
GRANT  SELECT ANY TABLE          TO fubar;
GRANT  EXECUTE ANY PROCEDURE     TO fubar;

Similar Messages

  • Granting Read Only Access to user in another schema

    Oracle Database 10g
    Red Hat Enterprise Linux Server release 5.3
    We are requested by a developer to grant his account read only access to TABLES, VIEWS, INDEXES, SEQUENCES, FUNCTIONS, PROCEDURES, PACKAGES, TRIGGERS, JOBS of another schema.
    I know granting read only access to Tables and Views. But is it possible to grant READ ONLY access to other mentioned objects ? How to do it ?
    And some views are in INVALID status.
    I tried to compile them using alter view owner.viewname compile;
    But got this ---- Warning: View altered with compilation errors.
    Those views are still in INVALID status. And then I tried to use utlrp.sql . Same result.
    Then I used the following
    SELECT TEXT FROM DBA_VIEWS WHERE VIEW_NAME='view-name';
    select REFERENCED_NAME,REFERENCED_TYPE from dba_dependencies where name='view-name';
    It turns out some reference types are non existent.
    Does that mean DBAs cannot do anything about this ?

    Nilton wrote:
    We are requested by a developer to grant his account read only access to TABLES, VIEWS, INDEXES, SEQUENCES, FUNCTIONS, PROCEDURES, PACKAGES, TRIGGERS, JOBS of another schema.
    I know granting read only access to Tables and Views. But is it possible to grant READ ONLY access to other mentioned objects ? How to do it ?
    TABLES -> YES grant SELECT
    VIEWS -> YES grant SELECT
    SEQUENCE -> YES grant SELECT
    INDEXES -> There is no read access for indexes...indexes are put on tables and a user who has read access on tables can read the index as well.
    FUNCTIONS / PROCEDURES / PACKAGES -> I am not sure what you mean by read access on procedures, functions and packages. You may grant EXECUTE privilege on these.
    TRIGGERS -> there is no read access on triggers required. They are implemented on tables for a DML event. If the user has DML access he has the execute access on the trigger as well.
    JOBS -> I am not sure what to read from Jobs.
    And some views are in INVALID status.
    I tried to compile them using alter view owner.viewname compile;
    But got this ---- Warning: View altered with compilation errors.
    Those views are still in INVALID status. And then I tried to use utlrp.sql . Same result.
    Then I used the following
    SELECT TEXT FROM DBA_VIEWS WHERE VIEW_NAME='view-name';
    select REFERENCED_NAME,REFERENCED_TYPE from dba_dependencies where name='view-name';
    It turns out some reference types are non existent.
    Does that mean DBAs cannot do anything about this ?There are compilation errors in the Views. e.g. the view may be referring to a table which doesn't exist etc.
    Unless you fix the error in the view you can't compile it and male it valid. Fix the view errors. If objects are non existing create them or refer to view to some where else.
    If the nonexistent objects were mistakenly dropped, or the data file which contained those objects was dropped, no matter what was the reason for that object to be gone a DBA can bring it back if he is a well prepared DBA and has setup his database for such kind of disasters.
    Now tell us why those objects are non-existent ? were they meant to be gone ? or they were dropped mistakenly?
    Now here are my guesses:
    If they were meant to be gone then probably the views definitions need to be adjusted not to refer them anymore.
    If they were mistakenly dropped then:
    Do you have them in recyclebin? (only tables) if YES just FLASHBACK TABLE <<tablename>> AS BEFORE DROP.
    Is your database has Flashback database ON? if YES FLASHBACK DATABASE until 'time/scn just before the object was dropped'
    Do you have backups and your database is running in ARCHIVE LOG mode? if YES perform an incomplete recovery using RMAN.

  • Database 'TEST' is already open and can only have one user at a time.

    Hi all,
    Could some help on this issue as per urgency!
    Database 'TEST' is already open and can only have one user at a time.
    I also tried this command but having the same error, please let me know how to troubleshoot this issue
    Use Master
    GO
    Select * from master.sys.sysprocesses
    Where spid > 50
                And dbid=DB_ID (‘StuckDB’))  -- replace with your database name
    Thanks

    Hi Tony,
    sorry got the same error again, it can't allow me sp_who2 as well
    I tried above command got the following error
    Changes
    to the state or options of database ‘TEST’ cannot be made at this time. The database is in single-user mode, and a user is currently connected to it.Msg 5069, Level 16, State 1, 

  • My iPhone has two identical options under "iTunes wi-fi sync" that are the same computer. I only have one user on my  computer, and I tried moving my iTunes file in Finder to organize it and now my library's not synced with my phone. Help?

    My iPhone has two identical options under "iTunes wi-fi sync" that are the same computer. I only have one user on my computer, and I tried moving my iTunes file in Finder to organize it and now my library's not synced with my phone. Help?

    I have the same problem. Right now my iPhone 5S shows 3 instances of the computer to which it is connected under Settings » General » iTunes WiFi Sync. I'm having problems connecting and syncing, and this is probably the cause: the phone chooses one of these connections, and it isn't the one that's actually in use. What's probably happening is that the phone and computer establish a connection using a dynamic IP address, the address becomes "disassociated" due to error, another address is associated, the phone retains each address/link, and each link is displayed as if it represents a separate computer (the fact that the name of the computer is identical is ignored, as the only thing that is considered important is the IP address). But that's all conjecture. More important, I'm not sure how to fix the problem. A network reset doesn't do it.

  • I transferred data from my Macbook Pro to my Mac mini but it forced me to make a new user for my old data.  How do I transfer my music, pics, and docs from the "old" user to the new user (so that I only have one user instead of 2?)

    I transferred data from my Macbook Pro to my Mac mini but it forced me to make a new user for my old data.  How do I transfer my music, pics, and docs from the "old" user to the new user (so that I only have one user instead of 2?)

    Unless you transfer the files from Setup Assistant, Migration Assistant creates a new user with the data.
    To transfer the files to your first user, you have to log on this new user, and copy all your files to /Users/Shard folder. This is a folder where you can put the files you want to share between two or more users, and all users can read and write in it.
    After copying the files, go to your first user, open /Users/Shared folder, and copy the files to your user folders. If you migrated applications, you must know that they are stored in a common folder (/Applications), so you don't have to transfer them. To open /Users/Shared folder, open Go menu (in the menu bar) > Go to Folder, and type the folder

  • Login window only shows one user account

    Hi,
    Anyone has an idea what's happening?
    I'm running Yosemite on MBPr 15" Mid-2012
    When I power on or reboot the laptop, on the login window it only shows one user account, my account which is the Admin account.  It doesn't show the secondary normal user account I created for my wife.  However once I'm logged in and I hit log-off, then it shows the 2 user accounts available for login.
    Thanks in advance!

    The lock is on the bottom left not bottom right. Sorry mixed that up.
    Letting other users unlock the drive
    If you want to make the Mac available to a user that doesn't currently have unlock capabilities, log in as a user that can unlock the disk. When you see your own desktop, choose "Log Out (user name)" from the Apple () menu. Also, you can unlock the disk, then switch to another user from Fast User Switch menu in the menu bar.
    If you want to grant existing users the ability to unlock the drive on their own, open the Security & Privacy pane of System Preferences. Select the FileVault tab and click the lock icon in the lower left corner of the window. Enter your admin privileges when prompted. Click the "Enable Users..." button to add existing users to the list of accounts that can unlock the disk.
    Hope that helps,
    Weston
    Supporting Articles,
    OS X: About FileVault 2 - Apple Support

  • Error accessing the UWL only with one user

    Hi,
    We have a problem only with one user, when the user access the UWL get the following error:
    Runtime error in the portal
    Exception in processing request, send the ID of exception to your portal ADMINISTRATION
    ID exception 10:54_21/10/11_0037_8766350
    The other user does not have problems accessing the mailbox.
    The user is assigned the role of the mailbox correctly.
    Any idea what may be the problem?
    Thanks and regards

    Hello,
    The best way to see what these issues are is to check the trace for when the run time error has occured:
    Log on to the portal, recreate the runtime error.  Then follow:
    1596214 How to find the latest default trace from right after
    reproducing an issue.  Please ensure that you have reproduced the
    issue with a user that is experiencing the issue that you have reported.  When you find the most recent default trace file, copy and paste the numbers from the portal screen and do a ctrl + F with the trace file opened and paste in the runtime error.  Now you should be able to see what is causing this issue.
    Then when you get this information, please paste or attach the file here that contains the runtime error for the user.  From this we should be able to figure out why the user is getting this.
    Also as an admin user, try clearing this users personalizations on the Universal Worklist first.
    Please clear all personalizations with the affected user and retest.
    Here is the help link to show you how to clear the personalizations:
    http://help.sap.com/saphelp_nw70/helpdata/EN/29
    /441f6f09364bcab17f94490555bee4/content.htm
    If clearing the personalizations does not help this user, please attach the trace file showing the runtime error. 
    Beth Maben
    EP - Senior Support Consultant II
    AGS Primary Support
    Global Support Centre Ireland
    Please see the UWL Wiki @
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/bpx/uwl+faq  ***

  • Grant read only permission on my stored procedure.

    I have a requirement like give reaonly access on my stored procedure to another user , not even execute permission on that steored procedure.
    Could you please let us know the command ?

    Marwim wrote:
    You can read the source of any PL/SQL code in dba_sourceBut that requires a priv such as select any dictionary to be granted. Why would you want to give a schema access to reading any and all source code in the database?
    This is why I think it is important that the OP provides the reasons behind the question of granting read-only source code access.
    Security is a critical component of software engineering. The basic security principle is to grant the absolute minimum privileges required to s/w and users to get the job done. Granting access to a schema read access to a dictionary view like DBA_SOURCE violates it.
    If userB wants to see userA's source code - then why not have userA simply mail it to userB, or check the code into a common source code repository?

  • When i try and open the auto cad Lt that i just downloaded i get this error The directory may be locked by another process or have been set Read Only. Directory: '/Users/hockaday' Please correct this problem and press OK to exit the application.

    i get this error why i try and open the auto cad that i just downloaded
    The directory may be locked by another process or have been set Read Only.
    Directory: '/Users/hockaday'
    Please correct this problem and press OK to exit the application.

    I did install it in the admin account.  Actually the computer has four accounts, one for my husband, where I installed it.  One for me which also is set to admin, one is called TEST and has nothing in it and one is guest user.
    I don't know how AutoCad is interfacing with the account.  That is why I am not sure what to do about it.  I read other threads in various places and some seemed to point to something having to do with having multiple users.  The solutions were not clear.  I was hoping someone else had this problem and could tell me what to do.  I tried apple support but no help.  I have not tried AutoCad yet as I assumed they wont help since this is a free educational version of their product.

  • HT1338 I have macbook without a firewire port, I have usb 2.0 port, now my os is not working I can not get through apple logo loading , I can not enter safe mode, I can only enter one user mode, how can I backup my data, I have very important data in my h

    I have macbook without a firewire port, I have usb 2.0 port, now my os is not working I can not get through apple logo loading , I can not enter safe mode, I can only enter one user mode, how can I backup my data, I have very important data in my hdd

    Here is what worked for me:
      My usb hub, being usb2, was too fast. I moved the wire to a usb port directory on my pc. That is a usb1 port which is slow enough to run your snyc.

  • I want to install an app but only for one user on my imac with Lion

    I have 2 users on my mac. I would like to install some apps (iwork) but only for one user and not the other user. How can I do this?

    Setup of iWork in your wife's account should only occur the once.
    Updates can be performed through your account and are usually performed via Software Update.
    Messages should not be popping up in your wife's account if all the iWork updates have been performed.
    Go to Software Update and download and install all the iWork updates.
    Unless you keep OSX up-to-date, messages will continue to come up when your wife logs into her account.

  • One work process can only process one user request at a time?

    Hi,
       How to configure the how many work processes for 80 concurrent users login daily.One work process can only process one user request at a time? Does this mean a login user has a dedicated work process servicing him. Or many login users interleave a work process's service? ,clarify the same.
    Thanku

    There are different types of work processes and the number needed depends on the number of transactions that will take place in the system. We are running 80 concurrent users with 15 dialog work processes. Please see the link below for an explanation:
    http://help.sap.com/saphelp_46c/helpdata/en/fc/eb2e8a358411d1829f0000e829fbfe/content.htm

  • Purchased CC for business and can only assign one user. How can I assign more users to have it on all 4 computers in the office?

    Purchased CC for business and can only assign one user. How can I assign more users to have it on all 4 computers in the office?

    Hi there
    You would need to purchase a seat for each user.
    What you currently have is 1 seat = 1 user.
    Kind regards
    Bev

  • Make UDF Read-only for all users

    Hi
    Can i use any script to make a UDF read-only for all users?
    i am looking at CPRF and CUFD Tables
    thanks

    Hi,
    You should never try updating system table directly.  That will against supporting policy by SAP.
    Thanks,
    Gordon

  • Granting read only access

    Is there a way to grant read only access to all tables in a schema, rather than doing it for each individual table in the schema?

    I have a package that does something just like this, here is a snippit. It uses dynamic SQL to build the GRANT statements. I'm not sure if this is a 'best practice', but it works for me.
          --Find the tables to GRANT SELECT privileges on
          string_query := 'SELECT DISTINCT ''' || LOWER(schema_name) || '.''|| ' || 'table_name FROM all_tables WHERE UPPER(owner) LIKE ''%' || UPPER(schema_name) || '%''';
          OPEN c FOR string_query;
             LOOP
                FETCH c INTO table_name;
             EXIT WHEN c%NOTFOUND;
                --Build the GRANT string
                string_grant := 'GRANT SELECT ON ' || LOWER(table_name) || ' TO ' || UPPER(role_name);
                --GRANT privilege
                EXECUTE IMMEDIATE string_grant;
             END LOOP;
          CLOSE c;

Maybe you are looking for

  • Windows vista, sync and restore errors. I give up.

    I have had continuous problems with my 8gb ipod touch, 2nd gen. I just returned one which I had had for 4 months during which it worked, but then I could not get it to restore and now have a new one and have the same problem. When I first got the new

  • HOW TO MAKE FIELDS AS READ ONLY IN TABLE MAINTAINANCE

    HI ABAPers, HOW TO MAKE SOME FIELDS AS DISPLAY MODE. FOR SUPPOSE, THERE ARE 5 FIELDS in SM30. AMONG THEM 1 FIELD SHUD BE USED FOR EDITING AND THE OTHER 4 FIELDS SHUD ONLY BE USED FOR DISPLAY PURPOSE WHEN EVER I ENTER A VALUE IN THAT 1 PARTICULAR FIEL

  • Query regarding implementation of HashSet and TreeSet and AbstractSet

    I have found that the treeSet and HashSet extends AbstractSet and implements Cloneable and Serializable interfaces. What happens if AbstractSet itself implements Cloneable and Serializable interfaces, so that The HashSet and TreeSet need not to imple

  • Server side document creation

    Does anyone know how to create a server side document (S_Document) and then add it to the server side folder (S_Folder)? The server side doesn't have S_DocumentDefinition class nor S_Document.setContent method. Thanks a lot, Jean

  • MacBook Pro 13" Graphics Card

    I've got a MacBook Pro 13" Late 2012 Non-Retina 2.9GHz intel core i7 model. Is there any way for me to install a graphics card in it? Upto 1 GB at least? If not, what is the maximum memory I can install? And which company's graphics card should I buy