Validates the password of the current user.
sa_verify_password( curr_pswd )
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.
None
None
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' ); END IF;