ChinaUnix.net
相关文章推荐:

shell脚本中如何执行sql脚本

要求编一个脚本执行数据库的select命令,命令的执行结果返回shell脚本文件作进一步处理,能给出一个简单的例子吗?

by iamhoho - Sybase - 2006-07-07 10:41:30 阅读(2216) 回复(3)

相关讨论

shell脚本如果使用 mysql -uroot -paaaa 登陆后 会自动执行脚本下一条sql语句吗? 另外有什么办法在shell脚本不泄露密码吗?

by gig2600 - Shell - 2010-10-21 11:39:17 阅读(9852) 回复(7)

初学shell,请多指教,谢谢 想法是这样的 CNT=0 USER_TOT=0 while [ "$CNT" -le "30" ] do TABLE_PREFIX="USER_01" USER_COUNT=0 sqlplus -S user/passwd@host <

by lovelyarry - Shell - 2004-03-20 11:31:40 阅读(1660) 回复(6)

就是利用shell调用oracle并执行sql语句后得到反回结果

by wyjs - Shell - 2006-04-01 23:54:11 阅读(1777) 回复(3)

因为是在unix下写的,没有文,抱歉。 As all known, sybase run a sql script like this: isql -Usa -P -i my.sql can we run a sql script like a unix shell script? the answer is YES! you may find that in some shell script(my.sh here), the first statement is: #!/bin/ksh ... notice the sign # is not a comment here, it really do something. it will accept $0 as his one and only one argument. so, the actua...

by joey - Sybase - 2003-05-15 20:52:59 阅读(2567) 回复(4)

shell> ./bin/mysql -u root -p 提示输入密码,输入yourpassword后,出现mysql>提示符,表示已经登录系统, 执行下列命令,来建立jforum库,以及密码设定为:jforum : mysql> CREATE DATABASE jforum DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; mysql> grant all privileges on *.* to jforum@'%' identified by "jforum"; mysql> flush privileges; 我想把上面的步骤写进shell脚本里 该怎么写...

by wenyunqiu - Shell - 2007-07-17 15:30:16 阅读(2242) 回复(1)

shell如何判断使用的sql语句是否执行成功.

by yanspray - Oracle - 2003-12-29 09:23:36 阅读(1411) 回复(1)

各位,由于某些原因,我不能采用存储过程嵌套调用的方式。因此我想在sql脚本shell文件或批处理文件获取一个存储过程的输出变量。 下面是出错的例子: CREATE PROCEDURE BORISZHANG.outtest (out completed int) ------------------------------------------------------------------------ -- sql 存储过程 ------------------------------------------------------------------------ P1: BEGIN DECLARE tabname VARCH...

by bodiz2002 - DB2 - 2004-05-24 16:39:18 阅读(1353) 回复(0)

各位,由于某些原因,我不能采用存储过程嵌套调用的方式。因此我想在sql脚本shell文件或批处理文件获取一个存储过程的输出变量。 下面是出错的例子: CREATE PROCEDURE BORISZHANG.outtest (out completed int) ------------------------------------------------------------------------ -- sql 存储过程 ------------------------------------------------------------------------ P1: BEGIN DECLARE tabname VARCH...

by bodiz2002 - DB2 - 2004-05-24 16:37:58 阅读(1204) 回复(0)

As all known, sybase run a sql script like this: isql -Usa -P -i my.sql can we run a sql script like a unix shell script? the answer is YES! you may find that in some shell script(my.sh here), the first statement is: #!/bin/ksh ... notice the sign # is not a comment here, it really do something. it will accept $0 as his one and only one argument. so, the actual effect is /bin/ksh $0 e.g. when you...

by joey - Sybase - 2003-05-14 17:47:48 阅读(1237) 回复(0)

各位,由于某些原因,我不能采用存储过程嵌套调用的方式。因此我想在sql脚本shell文件或批处理文件获取一个存储过程的输出变量。 下面是出错的例子: CREATE PROCEDURE BORISZHANG.outtest (out completed int) ------------------------------------------------------------------------ -- sql 存储过程 ------------------------------------------------------------------------ P1: BEGIN DECLARE tabname VA...

by bodiz2002 - 数据库开发 - 2004-05-24 16:43:01 阅读(1545) 回复(0)