If you are using Trusted Oracle7 in DBMS MAC mode, your DBMS label must match the user's creation label or you must satisfy one of the following criteria:
You can only establish a default or temporary tablespace if both your DBMS label and the user's creation label dominates the tablespace's creation label or if both you and the user have READUP system privilege.
You can only change a user's profile if both your DBMS label and the user's creation label dominate the profile's creation label or if both you and the user have READUP system privilege.
user
is the user to be altered.
indicates how Oracle7 permits user access.
BY specifies a new password for the user. The password is not usually quoted and must also follow the rules described in the section "Object Naming Rules" . A password can only contain single-byte characters from your database character set regardless of whether your character set also contains multi-byte characters.
EXTERNALLY indicates that Oracle7 verifies user access with the operating system, rather than with a password. See the CREATE USER command .
Although you do not need privileges to change your own password, you must have ALTER USER system privilege to change from BY password to EXTERNALLY or vice versa.
DEFAULT TABLESPACE
specifies the default tablespace for object creation.
TEMPORARY TABLESPACE
specifies the tablespace for the creation of temporary segments for operations such as sorting that require more space than is available in memory.
QUOTA
establishes a space quota of integer bytes on the tablespace for the user. This quota is the maximum space in tablespace that can be allocated for objects in the user's schema. You can use K or M to specify the quota in kilobytes or megabytes. You need not have quota on the tablespace to establish a quota on the tablespace for another user. See the CREATE USER command .
If you reduce an existing quota to a value below the space allocated for existing objects in the user's schema in the tablespace, no more space in the tablespace can be allocated to objects in the schema.
Note that an ALTER USER statement can contain multiple QUOTA clauses for multiple tablespaces.
UNLIMITED places no limit on the space in the tablespace allocated to objects in the user's schema.
PROFILE
changes the user's profile to profile. In subsequent sessions, the user is subject to the limits defined in the new profile.
To assign the default limits to the user, assign the user the DEFAULT profile.
DEFAULT ROLE
establishes default roles for the user. Oracle7 enables the user's default roles at logon. By default, all roles granted to the user are default roles.
ALL makes all the roles granted to the user default roles, except those listed in the EXCEPT clause.
NONE makes none of the roles granted to the user default roles.
Example I
ALTER USER scott
IDENTIFIED BY lion
DEFAULT TABLESPACE tstest
Example II
The following statement assigns the CLERK profile to SCOTT:
ALTER USER scott
PROFILE clerk
In subsequent sessions, SCOTT is restricted by limits in the CLERK profile.
Example III
The following statement makes all roles granted directly to SCOTT default roles, except the AGENT role:
ALTER USER scott
DEFAULT ROLE ALL EXCEPT agent
At the beginning of SCOTT's next session, Oracle7 enables all roles granted directly to SCOTT except the AGENT role.