shell中执行db2数据库命令_shell中执行db2数据库命令_如何从命令行运行db2 sql命令?...

130685

how can I run

sql command UPDATE CONTACT

SET EMAIL_ADDRESS = 'mytestaccount@gmail.com'

via command line

for db2 database

on linux

from a shell script file?

解决方案

You need to be logged into your linux machine with an id that has "db2profile" in it's .profile.

If you are not sure what I'm talking about, look at the .profile of the db2 instance owner (usually db2inst1 unless you changed it during the install). The simplest thing would probably be to log in as the db2 instance owner.

Once you are logged in, type "db2" at the command line. If "db2" is not found, then recheck the .profile stuff.

To execute your sql command type the following at the command line (substitute with the name of the database you want to connect to):

db2 connect to

db2 UPDATE CONTACT SET EMAIL_ADDRESS = 'mytestaccount@gmail.com'

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值