Example code that does not allow you to change the password after the password of an Oracle user expires

Source: Internet
Author: User
-- 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 )!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.