linux中如何使用db2命令

linux中如何使用db2命令

ID:39465458

大小:77.00 KB

页数:21页

时间:2019-07-04

linux中如何使用db2命令_第1页
linux中如何使用db2命令_第2页
linux中如何使用db2命令_第3页
linux中如何使用db2命令_第4页
linux中如何使用db2命令_第5页
资源描述:

《linux中如何使用db2命令》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、DB2数据库命令简介  1.启动数据库  db2start  2.停止数据库  db2stop  3.连接数据库  db2connecttoo_yduserdb2usingpwd  4.读数据库管理程序配置  db2getdbmcfg  5.写数据库管理程序配置  db2updatedbmcfgusing参数名参数值  6.读数据库的配置  db2connecttoo_yduserdb2usingpwd  db2getdbcfgforo_yd  7.写数据库的配置  db2connecttoo_yduserdb2usingpwd  db2updatedbcfgforo_

2、ydusing参数名参数值  8.关闭所有应用连接  db2forceapplicationall  db2forceapplicationID1,ID2,,,IdnMODEASYNC  (db2listapplicationfordbo_ydshowdetail)  9.备份数据库  db2forceapplicationall  db2backupdbo_ydtod:  (db2initializetapeon\.tape0)  (db2rewindtapeon\.tape0)  db2backupdbo_ydto\.tape0  10.恢复数据库  d

3、b2restoredbo_ydfromd:tod:  db2restoredbo_ydfrom\.tape0tod:  11.绑定存储过程  db2connecttoo_yduserdb2usingpwd  db2bindc:dfplus.bnd  拷贝存储过程到服务器上的C:sqllibfunction目录中  12.整理表  db2connecttoo_yduserdb2usingpwd  db2reorgtableydd  db2runstatsontableyddwithdistributionandindexesall  13.导出表数据  db2e

4、xporttoc:dftz.txtofdelselect*fromdftz  db2exporttoc:dftz.ixfofixfselect*fromdftz  14.导入表数据  importfromc:123.txtofdelinsertintoylbx.czyxx  db2importtoc:dftz.txtofdelcommitcount5000messagesc:dftz.msginsertintodftz  db2importtoc:dftz.ixfofixfcommitcount5000messagesc:dftz.msginsertint

5、odftz  db2importtoc:dftz.ixfofixfcommitcount5000insertintodftz  db2importtoc:dftz.ixfofixfcommitcount5000insert_updateintodftz  db2importtoc:dftz.ixfofixfcommitcount5000replaceintodftz  db2importtoc:dftz.ixfofixfcommitcount5000createintodftz(仅IXF)  db2importtoc:dftz.ixfofixfcommitco

6、unt5000replace_createintodftz(仅IXF)  15.执行一个批处理文件  db2-tf批处理文件名  (文件中每一条命令用;结束)  16.自动生成批处理文件  建文本文件:temp.sql  select'runstatsontableDB2.'

7、

8、tabname

9、

10、'  withdistributionanddetailedindexesall;'  fromsyscat.tableswheretabschema='DB2'andtype='T';  db2-tftemp.sql>runstats.sql  17.自动生成建表(视图)语句

11、  在服务器上:C:sqllibmisc目录中  db2connecttoo_yduserdb2usingpwd  db2look-do_yd-udb2-e-p-cc:o_yd.txt  18.其他命令  grantdbadmondatabasetouserbb  19select*fromczyxxfetchfirst1rowsonly  20db2look-dylbx-udb2admin-w-asd-a-e-oa.txt21.显示当前用户所有表  listtables  22.列出所有的系统表  listtablesforsys

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。