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

Thread: User creation and roles

  1. #1
    Join Date
    Oct 2000
    Posts
    449
    Hello..

    I have to create close to 25 users on 3 instances and I have a list of user names. I am trying to
    run the below queries hoping to enter the username only once when i run the script, but this does not work.
    How do I modify the sql to do that? (Interactive on the prompt)..

    <>

    create user &1 identified by &1
    default tablespace aapdata
    temporary tablespace aapdata
    quota unlimited on aapdata;

    alter user &1 quota 0 on system;

    grant connect to &1;

    grant cgaap_user to &1;

    <>

    Secondly, I can know the available roles from dba_roles, and I know the users and their roles through
    user_role_privs.granted_role, but how do i see the privileges for the same (which view?)..
    I can see the same in TOAD, but not SQL Plus..

    Thanks, ST2000

  2. #2
    Join Date
    Jan 2002
    Location
    Up s**t creek
    Posts
    1,525
    If you are running the script in a single sqlplus session you will need to UNDEFINE 1 each time otherwise it will use the first entered value each time.

    Not sure what your asking for in the second question

    Regards
    Jim
    Oracle Certified Professional
    "Build your reputation by helping other people build theirs."

    "Sarcasm may be the lowest form of wit but its still funny"

    Click HERE to vist my website!

  3. #3
    Join Date
    Sep 2000
    Location
    Chicago, IL
    Posts
    316
    For your second questions:

    Granted Roles :
    dba_roles_privs

    Granted System Privs:
    dba_sys_privs

    Granted Tables Privs:
    dba_tab_privs

  4. #4
    Join Date
    Oct 2000
    Posts
    449
    When I put the whole thing in a script and run, as you suggested, I still have to type the user's name that many times I have "&"..

    For my second query, I suggest that please go to dba_roles and choose one role that you created, and go to dba_user_roles to see what privileges that granted role has (like connect, resource default roles, and any other roles created). Through which view are u able to see those roles.

    Thanks, ST2000

  5. #5
    Join Date
    Oct 2000
    Posts
    449
    What is undefine and how do i use that in my script..

    Please modify my script..

    Thanks, ST2000

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