grant
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: grant

  1. #1
    Join Date
    Dec 2002
    Location
    Bangalore ( India )
    Posts
    2,434

    grant

    i gotta grant select permission on all objects of the user A to user B...

    is it possible to do with a single statement.....

    i mean not like
    Grant Select on A.table1,A.table2,.... to B;

    can i do som thing like
    Grant Select on All Tables to B;

    Abhay
    funky...

    "I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."

    "Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"

  2. #2
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,448
    Code:
    begin
      for i in (select * from user_tables)
      loop
        execute immediate 'grant select on '||i.table_name||' to scott';
      end loop;
    end;
    /

  3. #3
    Join Date
    Dec 2002
    Location
    Bangalore ( India )
    Posts
    2,434
    Thanks Pando....

    But i wanted to know if u have a single attribute which grants on all objects....as say u can give all PREVILAGES by ALL

    GRANT ALL on Table_Name to User;

    I was wondering if somthing similar we have in this case.

    Abhay.
    funky...

    "I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."

    "Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"

  4. #4
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,448
    no

    logical, when you say ALL tables how does Oracle suppose to interpret that?

    it's all in the docs

  5. #5
    Join Date
    Dec 2002
    Location
    Bangalore ( India )
    Posts
    2,434
    Pando :

    i got it.....
    U can do it by

    Grant Select ANY TABLE to User;

    Regards
    Abhay.
    funky...

    "I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."

    "Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"

  6. #6
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,448
    well that's not granting privs on objects, SELECT ANY TABLE is a system privlege and of course if you do that the user can see any table, logical and dangerous

  7. #7
    Join Date
    Jun 2001
    Location
    Helsinki. Finland
    Posts
    3,938

    Re: grant

    Originally posted by abhaysk
    i gotta grant select permission on all objects of the user A to user B...

    is it possible to do with a single statement.....

    i mean not like
    Grant Select on A.table1,A.table2,.... to B;

    can i do som thing like
    Grant Select on All Tables to B;

    Abhay
    Remark: We, as DBAs, can grant select on a table owned by user A to user B only starting from 9iR2.
    Oracle Certified Master
    Oracle Certified Professional 6i,8i,9i,10g,11g
    email: ocp_9i@yahoo.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width