sp_iqpassword Procedure

Changes a user’s password.

Syntax 1

call sp_iqpassword (‘caller_password’, ‘new_password’ [, ‘user_name’])

Syntax 2

sp_iqpasswordcaller_password’, ‘new_password’ [, ‘user_ name’]

Parameters

Privileges

You must have EXECUTE privilege on the system procedure. No additional system privilege is need to set your own password. You need the CHANGE PASSWORD system privilege to set other users’ passwords.

Remarks

A user password is an identifier. Any user can change his or her own password using sp_iqpassword. The CHANGE PASSWORD system privilege is required to change the password of any existing user.

Identifiers have a maximum length of 128 bytes. They must be enclosed in double quotes or square brackets if any of these conditions are true:

  • The identifier contains spaces.
  • The first character of the identifier is not an alphabetic character (as defined below).
  • The identifier contains a reserved word.
  • The identifier contains characters other than alphabetic characters and digits.

    Alphabetic characters include the alphabet, as well as the underscore character (_), at sign (@), number sign (#), and dollar sign ($). The database collation sequence dictates which characters are considered alphabetic or digit characters.

Example

Changes the password of the logged-in user from irk103 to exP984:

sp_iqpassword 'irk103', 'exP984'

If the logged-in user has the CHANGE PASSWORD system privilege or joe, the password of user joe from eprr45 to pdi032:

call sp_iqpassword ('eprr45', 'pdi932', 'joe')