#!/bin/sh
remoteIp=`grep DB file |awk -F ' ' '{print $2}'|tr -d ' '`
echo "remoteIp is :$remoteIp"
scp mdndb.sh $remoteIp:/home/oracle/
ssh $remoteIp "chown oracle:oinstall /home/oracle/db.sh;chmod +x /home/oracle/db.sh"
ssh $remoteIp "
su - oracle -c \"
sh /home/oracle/db.sh rollback
\"
"
Shell脚本远程回滚数据库
最新推荐文章于 2022-07-10 20:13:33 发布
本文介绍了一种通过Shell脚本实现远程部署Oracle数据库脚本的方法。具体步骤包括获取远程IP地址、使用SCP命令传输文件到远程服务器上的指定路径、调整文件权限以便Oracle用户能够执行该脚本、最后通过SSH执行脚本并进行回滚操作。
2322

被折叠的 条评论
为什么被折叠?



