REVOKE CHANGE PASSWORD Statement

Removes the ability of a user to manage passwords and administer the system privilege.

You can revoke the CHANGE PASSWORD system privilege from any combination of users and roles granted.

Syntax

REVOKE [ ADMIN OPTION FOR ] CHANGE PASSWORD [(target_user_list | ANY | ANY WITH ROLES target_role_list  )]
FROM userID [,...]

Parameters

  • target_user_list – if specified, must consist of existing users with login passwords and is the potential list of target users who can no longer have passwords managed by grantee users. Separate the user IDs in the list with commas.
  • ANY – if specified, the potential list of target users for each grantee consists of all database users with login passwords.
  • ANY WITH ROLES target_role_list – if specified, the target_role_list must consist of existing roles, and the potential list of target users for each grantee must consist of database users with login passwords that have a subset of roles in target_role_list. Separate the list of roles with commas.
  • userIDmust be the name of an existing user or role that has a login password. Separate multiple userIDs with commas.

Examples

Usage

Depending on how the CHANGE PASSWORD system privilege was initially granted, using the ADMIN OPTION FOR clause when revoking the CHANGE PASSWORD system privilege has different results. If the CHANGE PASSWORD system privilege was originally granted with the WITH ADMIN OPTION clause, including the ADMIN OPTION FOR clause in the revoke statement revokes only the ability to administer the CHANGE PASSWORD system privilege (that is, grant the system privilege to another user). The ability to actually manage passwords for other users remains. However, if the CHANGE PASSWORD system privilege was originally granted with the WITH ADMIN ONLY OPTION clause, including the ADMIN OPTION FOR clause in the revoke statement is semantically equivalent to revoking the entire CHANGE PASSWORD system privilege. Finally, if the CHANGE PASSWORD system privilege was originally granted with the WITH NO ADMIN OPTION clause, and the ADMIN OPTION FOR clause is included in the revoke statement, nothing is revoked because there were no administrative rights granted in the first place.

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

Requires the CHANGE PASSWORD system privilege granted with administrative rights.
Related reference
GRANT CHANGE PASSWORD Statement