touch shell.sh
#!/bin/sh
dbuser=username
dbpass=PASSWORD
dbinfo=ip:port/服务名
path='/root/2023/111.sqlr
sqlplus -s $dbuser/$dbpass@$dbsinfo <<EOF
@$ {path)
commit;
quit
EOF
Echo "end"
cd /u01/sql
5、执行脚本命令
sh /u01/sql/shell.sh
若要打印日志,可采用下面命令
nohup sh /u01/sql/shell.sh &
8、执行完毕