小编Aom*_*iki的帖子

在文件中重定向查询的输出

我可以做些什么来重定向文本文件中的查询结果 sqlplus

我试过: start requete.sql > resultat.txt但它不起作用。

bash sql

1
推荐指数
1
解决办法
2万
查看次数

Sqlplus:找不到命令

我有两台虚拟机ubuntu,一台是我安装oracle 11g express时的服务器,另一台是简单的客户端。我的目标是从客户端计算机远程运行 sql 查询。所以我准备了查询并将其发送到服务器。但是在下面的脚本中,建立到服务器的连接后,sqlplus不起作用。它向我显示了以下错误:

Sqlplus:找不到命令

在这项工作中,我使用了这个脚本:

#! /bin/bash

read -p "saisir votre requete: "  req

printf "%s\n" "$req" > t1.txt

sed -e 's/[;,()'\'']/ /g;s/  */ /g' t1.txt > t.txt

`tr -s '[[:blank:]]' '\n' < t.txt `|

  while IFS= read -r word; do

if ! [[ "$word" =~ $(echo ^\($(paste -sd'|' ./req.txt)\)$) ]]; then

var=$(base64 <<< $word)


sed -i -e "s/$word/$var/g" t1.txt
fi

  done

enter code here

scp requete.sql cloud1@1.0.0.1:/home/cloud1

#Conection to the Server

ssh cloud1@1.0.0.1 '/home/cloud1/Cloud-Serv'
Run Code Online (Sandbox Code Playgroud)

并且文件 Cloud-Serv 包含以下代码: …

shell bash oracle-database

0
推荐指数
1
解决办法
5万
查看次数

标签 统计

bash ×2

oracle-database ×1

shell ×1

sql ×1