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..
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
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!
For your second questions:
Granted Roles :
Granted System Privs:
Granted Tables Privs:
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.
What is undefine and how do i use that in my script..
Please modify my script..
Click Here to Expand Forum to Full Width