当前位置:网站首页>linux下执行shell脚本调用sql文件,传输到远程服务器
linux下执行shell脚本调用sql文件,传输到远程服务器
2022-07-17 05:22:00 【什么时候点菜】
1.编写sql。
2.编写shell,shell里用sqlplus调用sql文件生成csv文件,还要编写对端服务器的相关信息。
3.将写好的sql和shell文件传输到linux服务器上
4.切换到文件存放目录下,使用以下命令执行shell:
sh -x ******.sh (直接执行脚本)
nohup sh -x ******.sh & (后台执行脚本)
ps -ef|grep *** (查看有关该脚本的线程,确定其在执行)
5.执行成功后可以到指定目录下查看日志,看看有没有报错。
6.查看生成的csv文件
7.ftp到对端服务器,查看文件有没有传过去:
ftp 对端服务器ip
输入用户名和密码
ls *文件名* (*可以进行模糊查询)
8.查询到了,传输成功。
其他用到的命令:
crontab -l 查看所有定时任务
ls -ltr 显示目录下,文件根据时间进行排序
kill -9 进程号 删除指定进程号的进程,注意这里进程号最好复制过来,避免输入可能输错
边栏推荐
猜你喜欢

Tianyi cloud Hangzhou virtual machine (VPS) performance evaluation

Mapping rule configuration of zuul route

Performance evaluation and comparison of lightweight application servers of major cloud service manufacturers, Alibaba cloud, Tencent cloud, Huawei cloud, and ucloud

Application case of CS brand SD NAND in air quality inspection industry

【自动化测试】——robotframework实战(二)新建测试用例

Arm server building my world (MC) version 1.18.2 private server tutorial

文本三劍客之awk命令--截取

Commande awk du troisième épéiste - - interception

字典、元组和列表的使用及区别,

数据保护/磁盘列阵RAID保护 IP段103.103.188.xxx
随机推荐
小迪网络安全-笔记(5)
edit关闭保存时自动生成配置文件
[ restartedMain] o.s.b.d.LoggingFailureAnalysisReporter :
Judge concave convex (mathematical problem)
SSH remote login service
Gnome 安装扩展插件(40.1版本,opensuse tumbleweed)。
Performance test and price comparison of cloud servers of Alibaba cloud, Tencent cloud, Huawei cloud, ucloud and Tianyi cloud
Xiaodi network security - Notes (3)
Wireshark packet capture: message information
Redraiment的遭遇
中国知网论文free下载的方法
闭包与装饰器
Xiaodi network security - Notes (2)
1.服务器是什么?
Class is coming. Roll call is needed
BigDecimal中divide方法
Performance evaluation and comparison of lightweight application servers of major cloud service manufacturers, Alibaba cloud, Tencent cloud, Huawei cloud, and ucloud
可怜小凡(模拟)
Évaluation des performances de la machine virtuelle Tianyi Cloud Hangzhou (VPS)
Solve the problem that the unit test coverage of sonar will be 0