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

Thread: Create Mass Users, Roles & Privileges

  1. #1
    Join Date
    Jul 2001
    Posts
    45

    Red face

    To all the Script Guru,
    I am trying to compile a script to create about 250 users and 3 different roles.

    Then
    Grant select on T1, T2, T3..to select_role(200 users) We have more 100+ tables) but there are 5 tables that they cannot
    select from.

    Grant select, insert, update on T1,T2, T3, T4 to select_insert_update_role

    and
    Grant select, insert, update, delete ANY TABLE to select_insert_update_delete_role.

    I created the script to create users as follow:
    create user '&username' identified by '&password';
    enter value for username: john
    enter value for password: doe
    THEN
    I received an error message:
    ERROR at line
    ORA-01935: missing user or role name
    I need your help. I know there is a way to do this but I just don't HOW.
    Please help.
    Richard


  2. #2
    Join Date
    Oct 2000
    Location
    Germany
    Posts
    1,185
    Try this. Remove the quotes from

    create user '&username' identified by '&password';

    and specify a default tablespace and temp tablespace.

    i.e.

    create user &username identified by password
    default tablespace &tbsp
    temporary tablespace &ttbsp;

    Good luck.
    David Knight
    OCP DBA 8i, 9i, 10g

  3. #3
    Join Date
    Jul 2001
    Posts
    45

    Creating Mass users, Roles & Privilege

    Hi All,
    I REALLY NEED YOUR HELP ON THIS.

    I am trying to compile a script to create 250 users and 3 different roles in Oracle (NT).

    I HAVE THE 250 NAMES AND PASSWORDS SAVED ON A TEXT FILE.
    How do i go by creating mass users and grant select on T1, T2, T3..to SELECT_ROLE on more 100+ tables) but there are 5 tables that they cannot select from.

    THEN
    Grant select, insert, update on T1,T2, T3, T4 to SELECT_INSERT_UPDATE_ROLE

    and
    Grant select, insert, update, delete ANY TABLE to SELECT_INSERT_UPDATE_DELETE_ROLE.

    THERE'S GOT TO BE A BETTER WAY TO DO THIS WITHOUT CREATING USERS 1 BY 1.
    Please send me step by step guide.
    Richard

  4. #4
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    1. sqlload the text file into the database.
    2. create a sql statement that generates your "create user" statement and save to a file
    3. run that script
    Jeff Hunter

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