返回顶部

收藏

shell脚本导入数据

更多
#!/bin/bash
#case的使用
case $1 in
'start' )  
echo "Starting nginx..."
;;  
'reload' )  
echo "Reload nginx configuration..."
;;  
*)
esac 
# get cuttent path
selfpath=$(cd "$(dirname "$0")"; pwd) 
echo "current path" $selfpath
echo "Warning  :   File path is best not to have Chinese !"
echo "Is going on ? [y/n]"
read YES_OR_NO  
if [ "$YES_OR_NO" != "y" ]; then
 echo "Good bye!"
 exit 1
else
echo  create tablespace
echo sqlplus system/system@bip_oracle_design @$selfpath/tablespace_design.sql
echo create user
echo sqlplus system/system@bip_oracle_design @$selfpath/user_design_design.sql
echo import data
echo imp portal_op_design/portal_op_design@bip_oracle_design file=$selfpath/portal_op_design.dmp full=y log=$selfpath/portal_op_design.log

echo imp unireport_design/unireport_design@bip_oracle_design file=$selfpath/unireport_design.dmp full=y log=$selfpath/unireport_design.log

echo imp portal_ec_design/portal_ec_design@bip_oracle_design file=$selfpath/portal_ec_design.dmp full=y log=$selfpath/portal_ec_design.log

echo imp portal_drm_design/portal_drm_design@bip_oracle_design file=$selfpath/portal_drm_design.dmp full=y log=$selfpath/portal_drm_design.log

echo imp portal_u3_design/portal_u3_design@bip_oracle_design file=$selfpath/portal_u3_design.dmp full=y log=$selfpath/portal_u3_design.log

echo imp portal_form_design/portal_form_design@bip_oracle_design file=$selfpath/portal_form_design.dmp full=y log=$selfpath/portal_form_design.log

echo imp portal_workflow_design/portal_workflow_design@bip_oracle_design file=$selfpath/portal_workflow_design.dmp full=y  log=$selfpath/portal_workflow_design.log

echo imp hnesap_design/hnesap_design@bip_oracle_design file=$selfpath/hnesap_design.dmp buffer=81920 full=y log=$selfpath/hnesap_design.log

echo grants power
echo sqlplus portal_op_design/portal_op_design@bip_oracle_design @$selfpath/privileges_design.sql

echo "imp end"
fi
exit 0
#该片段来自于http://outofmemory.cn

标签:shell,文件

收藏

0人收藏

支持

0

反对

0

发表评论