alter user

Changes a user’s password.

Syntax

alter user user
   set password {new_password | null}
   [verify password old_password]
   [set password_parameter to 'parameter_value']

Parameters

Password Parameters
password_parameter

Description and Value

password_expiration

Number of days after which the password expires.

Zero (0) the default, indicates that the password never expires.

If a password has expired, Replication Server locks the user account and notifies the user. If you do not change the password, then you cannot log in once disconnected until the administrator resets the password. The new password must meet all the password requirements.

Passwords do not expire for any user that rs_init creates with connect source permission or the ID user. These passwords override any setting for password_expiration that you set for all users in the Replication Server. Databases, other Replication Servers, and Replication Agents use user IDs with connect source permission.

Administrators should consider setting any user that is created for replication agent or an RSI to not expire the password.

Examples

Usage

  • If your Replication Server uses ERSSD, you can change the ERSSD primary user password using:

    alter user user
    set password new_password

    If this user name matches the ERSSD primary user name, ERSSD updates the rs_users table, issues sp_password at ERSSD to change the password, and updates the configuration file line RSSD_primary_pw_enc.

  • Users with “sa” permission can omit the verify password clause. Other users must provide this clause in order to change their own passwords.

  • Password settings for individual users with specified alter user override any value that is set with configure replication server.

    SeePassword Parameters table in configure replication server.

Permissions

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

Related reference
create user
drop user