zoukankan      html  css  js  c++  java
  • Shell脚本调用Oralce数据库SQL文生产日志

    #!/bin/sh
    export LANG="zh.CN.GBK"
    echo -n "********************************************"
    if [ "$#" -ne "1" ]
    then
     echo "Error ,you should give the fileName"
    else
    sqlpath=/home/oracle/update/updatesql/${1}
    logpath=/home/oracle/update/updatelog/${1}
    sqlplus */* < $sqlpath > $logpath
    echo "sqlplus */* < $sqlpath > $logpath"
    echo ------------${1} start ----------------
    cat $logpath
    echo ------------${1}  end  ----------------
    fi
    date=`date +%Y%m%d`
    mkdir -p /home/oracle/update/updatesql/bak/$date
    mv /home/oracle/update/updatesql/${1} /home/oracle/update/updatesql/bak/$date

  • 相关阅读:
    Nginx
    Influxdb
    Gitlab
    Git
    Gogs
    Dockerfile
    Docker Data
    My Projects
    中文学习
    科技精选
  • 原文地址:https://www.cnblogs.com/flyback/p/8303315.html
Copyright © 2011-2022 走看看