NewPassword (NEWPWD) connection parameter

Allows users to change passwords, even if they have expired, without DBA intervention.

Syntax

{ NewPassword | NEWPWD }={ password-string | * }

Usage

The client library prompting for a new password is only supported on Microsoft Windows.

Allowed values

Default

The password is not changed, and the client library does not prompt for a new password.

Remarks

This connection parameter is very effective when you implement a login policy using the password_life_time or password_expiry_on_next_login options. Alternatively, you can implement a password expiry policy by having the login_procedure signal the Password has expired error.

A user receives a Password has expired error if their environment does not support password prompting. In a Microsoft Windows environment, the prompt window might not correctly prevent interaction with the calling application's window (it may not be modal or have the correct parent window) if the calling application has multiple top-level windows or if the application's top level windows are minimized.

In a Windows environment, if you use the ODBC SQLDriverConnect function and the DriverCompletion argument is anything other than SQL_DRIVER_NOPROMPT, the connection prompts for a new password if the password has expired. The connection might prompt for a new password in OLE DB when the DBPROP_INIT_PROMPT property is anything other than DBPROMPT_NOPROMPT. Both cases function as if the NewPassword=* connection parameter was specified.

Example

The following connection string changes the password of user Test1 when they connect:

"UID=Test1;PWD=welcome;NEWPWD=hello"

In a Windows environment, the following connection string prompts the user Test1 for a new password when the existing password expires:

"UID=Test1;PWD=welcome;NEWPWD=*"