Validates the password of the current user.
sa_verify_password ( string )
This procedure is used by sp_password. If the password matches, the procedure simply returns. If it does not match, the error string returned by the procedure is returned.
None
None
The following example creates a function that returns a message if the chosen password can be guessed from knowing the user name:
CREATE FUNCTION
DBA.f_verify_pwd(user_name varchar(128), new_pwd
varchar(255))
RETURNS varchar(255)
BEGIN
-- enforcement
IF SIMILAR(new_pwd , user_name) > 50 THEN
RETURN('Password is too much like the user name');
END IF;
-- success
RETURN(null);
END;
ALTER FUNCTION DBA.f_verify_pwd SET HIDDEN;
GRANT EXECUTE ON DBA.f_verify_pwd TO PUBLIC;
SET OPTION public.verify_password_function =
'DBA.f_verify_pwd';