Grant select on all of  views to public

How to grant select on all of views to public? Thanks in advance.

782150 wrote:
How to grant select on all of views to public? Thanks in advance.
spool doit.sql
select 'grant select on '||
          owner ||
         '.' ||
         view_name ||
        ' to public;'
from dba_views;
spool offexecute doit.sql
That's how it's done. Whether or not it's wise is a different question.

Similar Messages

  • Grant access to all the views created in user schema to another schema

    How to grant access for all the views created in own HAGGIS schema to comqdhb schema on the HAGGIS database.
    Oracle Grant Privileges
    ===============
    Object privileges assign the right to perform a particular operation on a specific object
    I read that we can use select 'grant select on' ||view_name||'HAGGIS' user_views where owner='COMQDHB'
    Is this right
    Oracle System Privileges
    ===============
    System privileges should be used in only cases where security isnt important,because a single grant statement could remove all security from the table
    Role based security
    ============
    Role security allows you to gather related grants into a collection-since the role is a predefined collection of privileges that are grouped together.privileges are easier to assign to users.
    [http://www.dba-oracle.com/art_builder_grant_sec.htm]
    can we grant select update to all the views at a time to the other schema.
    Are there any other ways to secure the data other than creating users and assigning roles.
    Thank you
    Edited by: Trooper on Dec 23, 2008 9:24 AM

    I think what was suggested was that you use SQL to generate the grants on each and every view, that is, you use SQL to generate SQL where the SQL being generated is "grant select on view_name to role'"
    If you users to connect to Oracle you have to create usernames for them though if the users only connect via an application the application might run just as one user and access to the application is controled via application security. The control on the application can be via Directory Services such as OID or MS Active Directory. User access to Oracle can also be controlled via OID.
    To connect to Oracle you can use OS authenication (not recommended), usernames with passwords, or via Advanced Security Option which supports single sign-on products like Kebros or Oracle Internet Directory etc....
    Example using SQL to generate SQL
    How do I find out which users have the rights, or privileges, to access a given object ?
    http://www.jlcomp.demon.co.uk/faq/privileges.html
    HTH -- Mark D Powell --

  • How to GRANT SELECT on all the tables in 1 go?

    Hi
    I have many tables (close to 200) in my Schema. I want to grant SELECT ON ALL TABLES to another user. How do I achieve this in one go?
    Thanking you in advance,
    ...

    Although Justin has given a wonderful answer. You might also review the following threads;
    Grant select on a schema
    Re: Grant select on a schema
    grant select on
    grant select  on
    grant select on tables
    Re: grant select on tables
    Adith

  • GRANT SELECT ON ALL TABLES

    Is there a direct SQL to grant select on all tables in the schema for a user? Or do we need to write a PLSQL for this?
    Also, if a new table T1 is created or existing table T2 is dropped and recreated after granting the select all privilege, will the user have access to T1 and T2?
    thanks

    Is there a direct SQL to grant select on all tables
    in the schema for a user? Or do we need to write a
    PLSQL for this?There is no privilege that would give user A access to all the tables in schema B. You would need to grant access to each object, which can certainly be done via dynamic SQL in PL/SQL.
    There is a privilege SELECT ANY TABLE which allows the user to query any table in the system, but this is generally very dangerous and probably not something you would want to give a normal user.
    Also, if a new table T1 is created or existing table
    T2 is dropped and recreated after granting the select
    all privilege, will the user have access to T1 and
    T2?Unless you grant SELECT ANY TABLE, you would need to explicitly grant A access to any new tables created in schema B (or to tables after they are dropped and re-created). Potentially, you could create a DDL trigger that submitted a job that would, in turn, make the grant whenever a new table was created in schema B.
    Justin

  • Grant select on all table of a schema to role

    Hi , is it possible to grant select on all table on a schema to a role?

    To grant SELECT on all tables of the current schema to particular role or user:
    SELECT 'GRANT SELECT ON '||TABLE_NAME||' TO READ_ONLY_ROLE;' COMMAND
    FROM (
    SELECT TABLE_NAME
    FROM ALL_TABLES
    WHERE OWNER = (SELECT USER FROM DUAL)
    Then copy and execute the result commands, eg:
    GRANT SELECT ON DEPT TO READ_ONLY_ROLE;
    GRANT SELECT ON EMP TO READ_ONLY_ROLE;
    GRANT SELECT ON DEMO_USERS TO READ_ONLY_ROLE;
    GRANT SELECT ON DEMO_CUSTOMERS TO READ_ONLY_ROLE;
    GRANT SELECT ON DEMO_ORDERS TO READ_ONLY_ROLE;

  • Grant select on all tables of a schema

    I need to grant select on all tables (over 200 tables) of a schema to other users. Are there any SQL syntax to do this?
    Thanks!

    Execute the following script, modify it for your environment:
    Script
    Accept from_owner char prompt 'Grant from user:'
    Accept to_user char prompt 'grant to user:'
    set head off;
    set lines 300;
    set pages 0;
    set termout off;
    set feedback off;
    set head off;
    set verify off;
    spool d:\temp\grant.sql
    select 'grant select on &from_owner..'||
      table_name||
      ' to &to_user;'
      from dba_tables
      where owner=upper('&&from_owner');
    spool off;
    set head on;
    set pages 24;
    set termout on;
    set feedback on;
    set head on;
    @d:\temp\grant.sqlExecution example:
    system@DBA> @d:\temp\grants.sql
    Grant from user:scott
    grant to user:ejemplo
    Grant succeeded.
    Grant succeeded.
    Grant succeeded.
    Grant succeeded.
    Grant succeeded.
    Grant succeeded.
    Grant succeeded.

  • Granting SELECT to user on VIEW with FULL OUTER JOIN fails?

    I have a quandary.
    Using Oracle 9i, I have created a simple view. When I perform a count on it, rows are returned.
    However, when I grant SELECT access to another user, they can't see the VIEW. The VIEW has a FULL OUTER JOIN operation in it.
    When I do the same thing using a regular join, it works.
    Any ideas why, please?
    SQL> conn ifsinfo/******@DB
    Connected.
    SQL> ed
    Wrote file afiedt.buf
      1  create view mctest3 as
      2  select
      3   vc.idcus ,
      4   ci.customer_id
      5  from
      6   ifsapp.vmo_company vc
      7  full outer join
      8   ifsapp.customer_info ci
      9  on
    10*  vc.custno = ci.customer_id
    SQL> /
    View created.
    SQL> select count(*) from mctest3;
      COUNT(*)
         73994
    SQL> GRANT SELECT ON MCTEST3 TO IFSAPP WITH GRANT OPTION;
    Grant succeeded.
    SQL> CONN IFSAPP/******@DB
    Connected.
    SQL> select count(*) from IFSINFO.MCTEST3;
    select count(*) from IFSINFO.MCTEST3
    ERROR at line 1:
    ORA-00942: table or view does not existbut with regular join:
    SQL> conn ifsinfo/******@DB
    Connected.
    SQL> create view mctest4 as
      2    select
      3     vc.idcus ,
      4     ci.customer_id
      5    from
      6     ifsapp.vmo_company vc, ifsapp.customer_info ci
      7    where vc.custno = ci.customer_id;
    View created.
    SQL> select count(*) from mctest4;
      COUNT(*)
         44269
    SQL> GRANT SELECT ON MCTEST4 TO IFSAPP WITH GRANT OPTION;
    Grant succeeded.
    SQL> conn ifsapp/******@DB
    Connected.
    SQL> select count(*) from IFSINFO.MCTEST4;
      COUNT(*)
         44269

    Hi,
    >>SQL> conn ifsinfo/******@DB
    Connected.
    SQL> ed
    Wrote file afiedt.buf
    1 create view mctest3 as
    2 select
    3 vc.idcus ,
    4 ci.customer_id
    5 from
    6 ifsapp.vmo_company vc
    7 full outer join
    8 ifsapp.customer_info ci
    9 on
    10* vc.custno = ci.customer_id
    SQL> /
    According to Note:244315.1, it is not possible to make a FULL OUTER JOIN on views owned by another user at the 9i version of Oracle. As above, do not use FULL OUTER JOIN on views owned by another user. Try to use outer join operator (+), and/or UNIONS instead.
    Cheers

  • Grant SELECT on all APPS objects to Custom schema

    Hi All,
    My requirement is to GRANT SELECT privileges on all Objects from APPS schema to a custom schema say XXTEST.
    I am OK, if there are multiple privileges to be granted (i.e. separate ones for TABLES,SYNONYMS,PACKAGES).
    I basically want to refer all APPS objects from XXTEST, without any schema prefix.
    I read about GRANT SELECT ANY TABLE, and it looks like I can access any schema objects from it.
    But I would like to know if I can grant from a particular schema alone.
    Thanks.

    Kavipriya wrote:
    I came across a privilege like 'SELECT ANY DICTIONARY', from which I can access all dictionary related tables without schema prefix. So am looking for something similar for APPS objects.Problem is, something similar for APPS objects does not exist. It's simply not there. You need to grant 'ANY' privileges, which means you'll be allowing the user to all the tables in the database, which is almost certainly not what you want, or you need to do individual grants.
    As I mentioned before, you can write SQL that will generate the GRANT statements for you, so you don't need to do it yourself.
    For example:
    select 'grant select on '||owner.table_name||'to some_user;' from dba_tables where owner='APPS';And then execute the output of that query, which will be a bunch of GRANT statements.
    Hope that helps,
    -Mark

  • Granting select on all objects of apps in R12

    Hi All,
    How can I achieve like user xxx having read only access to apps user objects in EBS R12.
    Best Regards,

    Pls check this thread
    READ-ONLY APPS Schema in EBS.
    and you can also check this
    http://souravpupu.blogspot.com/2011/09/how-to-create-apps-read-only-user.html
    thanks

  • ORA-01720 while trying to grant select on a view

    Hi Friends,
    Iam getting the following error while trying to grant select privilege for the view to SchemaB, i have the view in schemaA.
    I have used the tables from both the schema for creating the view and iam getting the error on showing a particular table
    ORA-01720: grant option does not exist for 'schemaB.Product'.
    I have looked into so many forums but i couldn't find the answer for my question.
    I must have to create the view in the Schema A only(strictly), as i seen in some forums stated that while creating the view in the other schema and granting the select privilege will solve the problem.But it was an exception to me ...
    Tell me something how can i proceed in this .....

    grant select on t1 to seconduser with admin optionNo. WITH ADMIN OPTION applies to system privileges only. Object privileges need the WITH GRANT OPTION ...
    SQL> grant select on joe_soap.some_table to apc with admin option
      2  /
    grant select on joe_soap.some_table to apc with admin option
    ERROR at line 1:
    ORA-00993: missing GRANT keyword
    SQL> grant select any table  to apc with admin option
      2  /
    Grant succeeded.
    SQL> grant select on joe_soap.some_table to apc with grant option
      2  /
    Grant succeeded.
    SQL> Cheers, APC

  • Keep 3D objects selected in all views?

    I've looked in the manual but I often miss the obvious search criteria.
    One of the cool features of After Effects is that an object is shown as selected in all 3D views. Switching views leaves the object selected along with its motion path.
    Is this not possible in Motion? It's making me really cranky.
    Another thing I can do in AE is tell the app to always preview a specific view. That's usually the Active Camera but it's easily changed. With Motion, the preview seems to always be the last view I was working in. That's making me cranky, too.
    bogiesan

    Hmm, clicking on the upper left corner in each viewport, where there is a black button/drop down list of possible views, seems to work. An object selected in the timeline will remain selected when changing window or viewport focus this way. You can also use the camera view icons in the lower left corner. Thanks. How did you know that? In the manual someplace? I love the Motion manual. No, really, I do.
    editorial: That's a stupid way of switching window focus. I'm starting to understand how Motion thinks, though. When I click into a window, Motion assumes I'm clicking into the scene and therefore deselecting everything. Except applications like AE assume the user is intelligent, the first click is merely selecting the view and is not meant to deselect everything.
    Thanks again TCY, very helpful. Greenie for you!
    bogiesan

  • Grant select on table to user

    IN A SCHEMA TEST1 THERE ARE 200 PLUS TABLES AND VIEWS.NOW I WANT TO GRANT SELECT ON TABLES AND VIEWS TO TEST2 USER.HOW CAN I GRANT SELECT ON THOSE TABLES AND VIEWS IN BULK INSTED OF GRANTING INDIVIDUALLY.
    Any idea?
    Thankx...
    Sorry for suing cap.letters....

    That works providing the grantee doesn't want to be able to build stored procedures or (more likely) views on the granted tables...
    SQL> conn u1/u1
    Connected.
    SQL> create role select_u1
      2  /
    Role created.
    SQL> grant select on t1 to select_u1
      2  /
    Grant succeeded.
    SQL> grant select_u1 to u3
      2  /
    Grant succeeded.
    SQL> conn u3/u3
    Connected.
    SQL> select * from u1.t1
      2  /
          COL1
             1
    SQL> create view my_view as
      2  select * from u1.t1
      3  /
    select * from u1.t1
    ERROR at line 2:
    ORA-01031: insufficient privileges
    SQL> As it happens, we know from the OP's other thread that they want a read only user, so perhaps the role will suffice. But they still need to grant selects on 200 objects to the role, so the automation will still come in handy :)
    Cheers, APC

  • GRANTing privileges on some DBA_ views not working

    DB Version: 10g Release 2
    I installed the Oracle Software and created the database manually using CREATE DATABASE command. Later I ran ORACLE_HOME/rdbms/admin/catalog.sql . But, now when i try to GRANT SELECT ON some DBA_ views, i receive error. GRANT SELECTs on V$ views are working fine. Why is it that GRANT SELECT on some DBA_ views (like dba_objects) are working fine but not for views like DBA_LOCKS, DBA_WAITERS
    SQL> grant select any dictionary to  scott    ;
    Grant succeeded.
    SQL> grant select on dba_objects to  scott    ;
    Grant succeeded.
    SQL> grant select on dba_lock to  scott    ;
    grant select on dba_lock to  scott
    ERROR at line 1:
    ORA-00942: table or view does not exist
    SQL> grant select on dba_locks to  scott    ;
    grant select on dba_locks to  scott
    ERROR at line 1:
    ORA-00942: table or view does not exist
    SQL> grant select on dba_waiters to  scott    ;
    grant select on dba_waiters to  scott
    ERROR at line 1:
    ORA-00942: table or view does not exist
    SQL> grant select on dba_blockers to  scott    ;
    grant select on dba_blockers to  scott
    ERROR at line 1:
    ORA-00942: table or view does not exist
    SQL> grant select on v_$session to  scott    ;
    Grant succeeded.
    SQL> grant select on v_$process to  scott    ;
    Grant succeeded.
    SQL> grant select on v_$locked_object to  scott    ;
    Grant succeeded.
    SQL> grant select on v_$parameter to  scott    ;
    Grant succeeded.
    SQL> grant select on v_$lock to  scott    ;
    Grant succeeded.

    Those are views created by catblock.sql (which is not run by default)
    not catalog.sql

  • GRANT SELECT to TEMP(by procedure)..... ALL tables and views of OWNER....

    hi ,
    I want to privelege only Grant SELECT ALL tables,views....
    I have written A procedure.....given below....
    CREATE OR REPLACE PROCEDURE GRANT_SELECT_ALL_PROC
    IS
    l_obj VARCHAR2(60);
    l_obj_type VARCHAR2(60);
    CURSOR Cur_Obj IS
    SELECT OBJECT_NAME,OBJECT_TYPE
    FROM USER_OBJECTS
    WHERE USER ='OWNER';
    BEGIN
    For i in Cur_Obj Loop
    l_obj := i.OBJECT_NAME;
    l_obj_type := i.OBJECT_TYPE;
    IF l_obj_type IN ('TABLE','VIEW')
    THEN
    EXECUTE IMMEDIATE 'GRANT SELECT ON' || l_obj ||'TO TEMP’;
    ELSIF l_obj_type IN('FUNCTION','PROCEDURE','PACKAGE') THEN
    EXECUTE IMMEDIATE 'GRANT EXECUTE ON'|| l_obj ||'TO TEMP’;
    END IF;
    END LOOP;
    END GRANT_SELECT_ALL_PROC;
    procedure is working fine.....
    OWNER there are some table and views......
    But After creation of User name TEMp....
    When I m giving GRANT SELECT to TEMP(by procedure)..... ALL tables and views of OWNER....
    when I coonecte to TEMP...
    Not getting table,view List...
    not even data of table or Views.....
    can anybdy help me.......advance thanx ...
    sanjay

    hi ,
    I want to privelege only Grant SELECT ALL
    tables,views....
    have written A procedure.....given below....
    CREATE OR REPLACE PROCEDURE GRANT_SELECT_ALL_PROC
    IS
    l_obj VARCHAR2(60);
    l_obj_type VARCHAR2(60);
    CURSOR Cur_Obj IS
    SELECT OBJECT_NAME,OBJECT_TYPE
    FROM USER_OBJECTS
    WHERE USER ='OWNER';
    BEGIN
    For i in Cur_Obj Loop
    l_obj := i.OBJECT_NAME;
    l_obj_type := i.OBJECT_TYPE;
    IF l_obj_type IN ('TABLE','VIEW')
    THEN
    EXECUTE IMMEDIATE 'GRANT SELECT ON' || l_obj ||'TO
    TEMP’;
    ELSIF l_obj_type IN('FUNCTION','PROCEDURE','PACKAGE')
    THEN
    EXECUTE IMMEDIATE 'GRANT EXECUTE ON'|| l_obj ||'TO
    TEMP’;
    END IF;
    END LOOP;
    END GRANT_SELECT_ALL_PROC;
    procedure is working fine.....
    OWNER there are some table and views......
    But After creation of User name TEMp....
    When I m giving GRANT SELECT to TEMP(by
    procedure)..... ALL tables and views of OWNER....
    when I coonecte to TEMP...
    Not getting table,view List...
    not even data of table or Views.....
    can anybdy help me.......advance thanx ...
    sanjayQuery SELECT * FROM USER_TAB_PRIVS_MADE from the user from which you are executing the procedure
    and Query SELECT * FROM USER_TAB_PRIVS_RECD from the TEMP user.

  • How can I get a list view after selecting "see all"?

    I just updated to iTunes 12.  I've looked on the net for this but couldn't find anything on it.
    Previously when I searched for something in the iTunes store I'd pick a certain category of media (podcasts, for example).  It would give me the first few results and then I could select "see all."  Then get a list view and sort it.
    Now when I click on "see all" I get an album cover view.  NOT a list view.  And I have no way to sort the results.  I usually sort by time.
    What's odd is when I'm still on the initial page you get after making a search I *can* sort the results.  But only the first 10.
    Basically, I need a way to sort all of my search results by time.  Either after selecting "see all" or having iTunes show many more than 10 results.
    This was possible (and the default, I think) in previous versions.  I've looked through every menu and I don't see a way to turn this functionality back on.
    Thanks.

    Hi,
    There is no such PowerShell command can achiev this. Maybe you can use a script to get the user name with folder redirection enabled. However, I am not familiar with writing script, and it would be better for you to ask in script forum below for professional
    assistance:
    http://social.technet.microsoft.com/Forums/en-US/home?forum=ITCG&filter=alltypes&sort=lastpostdesc
    Best Regards,
    Mandy
    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]

Maybe you are looking for

  • Sony Cybershot No Longer Recognized in iPhoto

    Just did a recent software update that my iBook let me know about this past Saturday. One of those updates I installed involved something to do with importing pictures from cameras. Now, my Sony camera is no longer recognized in iPhoto and I never ha

  • IPod shutting my computer down.

    Hi. Hope all is well. I have a 30GB iPod Video and it recently started giving me some problems. My iPod would freeze my computer. As seeing other posts, after doing the 5 R's, people did reformats with windows. When I finished, I reset the iPod and p

  • My ipod touch 5th gen stopped working

    it won't turn on and it had more that half battery so the battery didn't finish but the screen won't turn on or anything and i plugged it into my computer but it still won't work

  • Backup 2 hard drives

    I have one hard drive that I run OSX from and all my software, then I have another internal hard drive that i have all of my working project files on that I work from. Will/can time machine backup these 2 hard drive as well?? If not, what is a good s

  • Question about Everyone Group in SharePoint 2013

    Hi, I have couple of question about EVERYONE group below,          - As per the best practice which Group we should use instead of EVERYONE group in Sharepoint ?          - What is the difference between Everyone and All Authenticated Users Group We