Restore-shell of the system configuration table

Source: Internet
Author: User
Recovery-shell configuration username and password file report in the system configuration table. iniuser1/pswd1 @ dbname1user2/pswd2 @ dbname2 configure the system table file configtable. iniuser1.table1user2. table2user3. table3 script backup. sh read the configuration file once and perform verification, such... recovery-shell configuration username and password file report in the system configuration table. iniuser1/pswd1 @ dbname1user2/pswd2 @ dbname2 configure the system table file configtable. iniuser1.table1user2. table2user3. table3 script backup. sh reads the configuration file at a time and performs verification. if the password is incorrect, modify it. enter the name of the backup file package for importing the configuration table of each user #! /Usr/bin/ksh dmpfilepath = './' connfile = report. iniconfigtable = configtable. iniDT = $1 while [! -R $ {dmpfilepath }$ {DT }. *. dmp] do if [-n "$ DT"] then ll-rt $ {dmpfilepath }*. dmp | tail-20 fi echo "Please input dmp's basename: \ c" read DTdone # Check the correctness of the connection string checkconn () {if ["$ #"-ne 1] thenecho "-1" exitfi VALUE = 'sqlplus-s/nolog < Temp $ mv temp $ connfile} # read the configuration file for dbuser in 'cat $ configtable | sed-e "s/^ * // g"-e "s /\ .. * // g "| sort | uniq 'do v_time = 0 dbconn = 'cat $ connfile | grep" ^ * $ dbuser/"'checkconn_flg = $ (checkconn $ dbconn) while ["$ checkconn_flg "! = "1"-a $ v_time-lt 3] do v_time = 'expr $ v_time + 1' stty-echo $ dbuser' @ ''echo $ dbconn | cut-d @ -f2 'password is error, "please input new password: \ c "read newpswd echo ''dbconn = $ dbuser'/'$ newpswd' @ ''echo $ dbconn | cut-d @-f2 'stty echo checkconn_flg =$ (checkconn $ dbconn) if ["$ checkconn_flg" = "1"] then modipswd $ dbconn $ connfile break fi done alltab = ''# read the configuration table cat $ configtable | grep" ^ * $ dbuser. "| while read dbtab do alltab = $ alltab, 'echo $ dbtab | cut-d. -f2 'value = 'sqlplus-s/nolog <

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.