How to generate the ramdon User Password in Oracle Database
Posted by Mir Sayeed Hassan on December 6th, 2022
How to generate the ramdon User Password in Oracle Database
Note:
– Password should be 12 characters in length or as per the organization.
– Password should include at least one uppercase letter, one lower case letter, one number and one special character (&*(){}|[]+<>!@#$%^?).
SQL> select translate(dbms_random.string('a', 12), dbms_random.string('a',5), trunc(dbms_random.value(100000,999999))) || (select substr('&*(){}|[]+<>!@#$%^?',trunc(dbms_random.value(1,15)), 1) from dual) from dual; TRANSLATE(DBMS_RANDOM.STRING('A',12),DBMS_RANDOM.STRING('A',5),TRUNC(DBMS_RANDOM.VALUE(100000,999999)))||(SELECTSUBSTR('&*(){}|[]+<>!@#$%^?',TRUNC(DBMS_RANDOM.VALUE(1,15)),1)FROMDUAL) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ d1ozLaZfsT2a& =====Hence tested & verified in our test env=====