Change Password function

chg_pword()
{

USR=$1
PWRD=$2

##############################################
# This should replace the functions:
#     chg_pword_all_SCHEMA_T11()
#
# Change SCHEMA_C21_* schema/users passwords
# After schema creation we will run this
# function could accept parameters for schema
##############################################

echo
echo “Change passwords for user/schema ${USR} ”
echo

sqlplus -s “/ as sysdba” <<EOF
set lines 150
set pages 150

alter user ${USR} identified by ${PWRD};

alter user ${USR} account unlock;

EOF

}

Leave a Reply

Your email address will not be published.