Tuesday, June 8, 2010

Creating Multiple User Using A Single Command

in this article we will learn how to create multiple users using a single command

The command:
SQL> GRANT CONNECT,RESOURCE TO USER1,USER2,USER3 IDENTIFIED BY USER1,USER2,USER3;

To check that users were created
SQL> SELECT USERNAME FROM DBA_USERS WHERE USERNAME LIKE ('USER%');

USERNAME
--------
USER3
USER2
USER1

Notes :
1- In The Above Example You Have Saved Several Steps For Creating 3 Users And Granting Privileges To Them.
2- In this command we can't give the default tablespace value for the users

No comments: