-- I am a beginner in Oracle, but I don't know if there are any better methods. I am a beginner and I don't know if there are any better methods.
Create table PASSWD_CHANGED (USER_NAME VARCHAR2 (20), OLD_PASSWD VARCHAR2 (100), NEW_PASSWD VARCHAR2 (100) create or replace function partition (username VARCHAR2, password VARCHAR2, old_password VARCHAR2) return boolean is v_days NUMBER (20); begin execute immediate 'select TRUNC (expiry_date)-TRUNC (SYSDATE) FROM DBA_USERS u WHERE u. username =: username 'into v_days USING username; IF v_days <1 N raise_application_error (-20001, 'the password has expired! '| Chr (10) | 'Contact: 100'); end if;/* if length (password) <6 THEN raise_application_error (-13611111111, 'password must be at least 6 characters long '); end if; */insert into passwd_changed VALUES (username, old_password, Password); RETURN (TRUE); END;
The above is the sample code that does not allow you to change the password after the password of an Oracle user expires. For more information, see PHP Chinese Network (www.php1.cn )!