The first one creates a local user, the second one creates an
external user while the last one creates a
global user.
When a user is created, his default tablespace as well as his
temporary tablespace can be specified.
SQL> create user dan identified by password account lock;
The user is now created, he can be granted the right to connect to the database:
SQL> grant connect to dan;
Now, if the user tries to connect to the database, he will get ORA-28000:
SQL> connect dan/password
ERROR:
ORA-28000: the account is locked
The user can now be unlocked with an alter user statement:
SQL> alter user dan account unlock;
Which allows dan to log on to the database now:
SQL> connect dan/passw0rd
Connected.
Restrictions on passwords
The following restrictions apply to a password:
- Its length must be between 1 and 30 characters
- They are case insensitive
- The only characters allowed are A-Z (a-z), 0-9, the underscore (_), the dollar sign ($), the
hash symbol (#).
- The first character must be one of A-Z or 0-9.
- The password must not be a reserved oracle word.