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

Thread: granting privilges - info needed

  1. #1
    Join Date
    Oct 2000
    Posts
    20

    Unhappy

    I have around 400 tables which belong to a schema lawd. I have created
    a role called select_role and want to give only select privileges to that role on all
    these tables belonging to lawd.
    can i do it with one single command , i tried the security manager but
    it does not allow me to select multiple tables and grant the select.
    I logged in as lawd and tried the grant select any table to select_role ,
    but since lawd is not a dba (i dont want to make it a dba user) this
    comes out with insufficient privileges.
    How do i do it with a single command or select all tables in one go
    at the security manager (tried holding shift+ctrl key , does not work)

    Thanks !

    Dd

  2. #2
    Join Date
    Jan 2000
    Location
    *
    Posts
    37
    I don't user security manager but this is how I do it. I create a script spooled out from sqlplus that I run

    set heading off
    set pagesize o
    spool cr_grant.sql
    select 'grant select on '||table_name||' to select_role;'
    from dba_tables
    where owner = 'LAWD';
    spool off

    I then would log in as lawd and execute the script.

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