ALTER USER changes an existing user's attributes.
user_identifier |
Unique identifier for an existing user. |
password_string |
User password. |
schema_identifier |
Identifier for an existing or non-existing schema. |
DROP PASSWORD deletes the password requirement. After using DROP PASSWORD, users can only access CONNX with their user ID.
SET PASSWORD adds or changes an existing CONNX user's integrated security password. This password should not be confused with the database password for data sources that support authentication.
SET SCHEMA can change the default schema's setting after the user issues a CONNECT command to CONNX. The default is the user identifier. The database and schema are checked to see if they exist.
Only the DBA may execute this statement for any user. All other users can only change their user information.
Caution: This statement is not subject to transaction logic. An implicit COMMIT will be performed after successful execution of this statement. If an error is detected during execution of this statement, an implicit ROLLBACK will be performed. Before you execute this statement, complete any open transaction containing INSERT, UPDATE and/or DELETE statements by issuing an explicit COMMIT or ROLLBACK statement.
The ALTER USER statement is not part of the ANSI Standard.
Examples
The following example shows a user changing their own password.
ALTER USER TIM SET PASSWORD 'XIYIZ';
The following example shows the DBA deleting the password for user PETER.
ALTER USER PETER DROP PASSWORD;