Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
Validates the password of the current user.
sa_verify_password( curr_pswd )
Use this CHAR(128) parameter to specify the password of the current database user.
The function returns an INTEGER value.
This procedure is used by sp_password. If the password matches, 0 is returned and no error occurs. If the password does not
match, an error is diagnosed. The connection is not terminated if the password does not match.
The following example attempts to validate the current connection's password when the current user is DBA or User1. An error
occurs if the current password does not match.
IF USER_NAME() = 'DBA' THEN
SELECT sa_verify_password( 'sql' );
ELSEIF USER_NAME() = 'User1' THEN
SELECT sa_verify_password( 'user' );