alter user

Description

Changes a user’s password.

Syntax

alter user user
   set password {new_passwd | null}
   [verify password old_passwd]

Parameters

user

The login name whose password you want to modify.

new_passwd

The new password. It can be up to 30 characters long and include letters, numerals, and symbols. Case is significant. If the password contains spaces, enclose the password in quotation marks. When you create or alter a user login name, you must specify a password or “null.” A null password lets a user log in immediately without being prompted for a password string.

verify password old_passwd

Enter your current password. Users who do not have “sa” permission must enter this clause.

Examples

Example 1

The user with login name “louise” has changed her own password from “EnnuI” to “somNIfic”:

alter user louise
 set password somNIfic
 verify password EnnuI

Usage

Permissions

alter user requires "sa" permission when altering another user’s password.

See also

create user, drop user