使用shell操作数据库
2015-08-29 14:18
387 查看
使用shell操作数据库
$ cat test.sh
sqlplus -s scott/tiger <<EOF
set feedback off;
set pagesize 0;
select to_char(sysdate,'YYYY-MM-DD HH24:MI:SS') from dual;
EOF
$ ./test.sh
2004-06-08 14:57:26
$
=========================================================
shell中直接调用sqlplus即可
sqlplus -s 用户名/口令@实例名<<EOF
==================================================================
百度知道地址:http://zhidao.baidu.com/question/351311970.html?fr=iks&word=shell%B2%D9%D7%DDoracle%CA%FD%BE%DD%BF%E2&ie=gbk
$ cat test.sh
sqlplus -s scott/tiger <<EOF
set feedback off;
set pagesize 0;
select to_char(sysdate,'YYYY-MM-DD HH24:MI:SS') from dual;
EOF
$ ./test.sh
2004-06-08 14:57:26
$
=========================================================
shell中直接调用sqlplus即可
sqlplus -s 用户名/口令@实例名<<EOF
==================================================================
百度知道地址:http://zhidao.baidu.com/question/351311970.html?fr=iks&word=shell%B2%D9%D7%DDoracle%CA%FD%BE%DD%BF%E2&ie=gbk
相关文章推荐
- Shell 种类
- linxu shell iconv 转码问题
- LinuxDeepin/Unix、Linux shell命令
- shell练习五
- Spark的Python和Scala shell介绍(翻译自Learning.Spark.Lightning-Fast.Big.Data.Analysis)
- Linux生产服务器Shell脚本分享
- hive shell命令
- 希尔排序(shell)
- Shell 脚本面试问题大全
- 一个Linux中用于监控的简易shell脚本
- 关于shell中的正则表达式和awk的使用
- SSH隧道管理内部服务(putty,ssh secure shell)for win
- adb 连不上设备的种种情况
- bash: ifconfig: command not found 解决办法
- Shell scripts to Create a local dir base on the time.
- 小议:如何用PowerShell创建State Services?
- HBase shell 无法使用 Backspace 键-解决方案
- linux shell if 参数
- linuxSHELL学习之获取用户输入
- xshell远程qemu-kvm虚拟机安装