4. SQL Statements : CREATE USER : CREATE USER Examples
 
Share this page                  
CREATE USER Examples
1. Create a user with several privileges, and a smaller set of default privileges.
CREATE USER bspring
    WITH PRIVILEGES=(CREATEDB, SECURITY, TRACE,
      DEFAULT_PRIVILEGES = (TRACE);
2. Create a user that requires authentication through the DBMS, rather than through operating system authentication, installation passwords, or Kerberos authentication. Allow the user to change his password:
CREATE USER fred
WITH PASSWORD='secret', PRIVILEGES = (CHANGE_PASSWORD),
    DBMS_AUTHENTICATION='REQUIRED';