Chinaunix首页 | 论坛 | 博客
  • 博客访问: 129992
  • 博文数量: 69
  • 博客积分: 595
  • 博客等级: 中士
  • 技术积分: 670
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-16 17:37
文章分类

全部博文(69)

文章存档

2017年(2)

2016年(9)

2015年(13)

2014年(30)

2012年(4)

2011年(2)

2010年(2)

2009年(5)

2008年(2)

我的朋友

分类: LINUX

2016-08-12 08:17:19

To execute DB2 UDB Admin Functions to work in IBM Data Studio, you can use the SYSPROC.ADMIN_CMD procedure which will work through most of the JDBC drivers.
 
1. Open a query editor in  Data Studio to your DB2 Server
2. Use the ADMIN_CMD procedure CALL SYSPROC.ADMIN_CMD()
3. Some sample IBM DB2 UDB Admin commands which run in Aqua Data Studio Query Analyzer are given below: 
 
To describe a table use the command:
 
  •       CALL SYSPROC.ADMIN_CMD('describe table syscat.tables') 

To execute DB2 RUNSTATS on a table use the command:

  •       CALL SYSPROC.ADMIN_CMD('RUNSTATS ON table DCMS.acct_activity') 

To run a DB2 Export command use:

  •       CALL SYSPROC.ADMIN_CMD('Export To c:\acct.del OF DEL SELECT * FROM DCMS."acct_activity" ') 
Note: For EXPORT command to work you need specify a directory path of the Server. Export will also work with a file url to a shared drive on another device.
阅读(227) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~