DB2数据库Table与Tablespaces的命令的正确应用

数据库
以下的文章主要描述的是DB2数据库Table与Tablespaces的命令,假如你对其有兴趣的话你就可以点击以下的文章进行观看了。

我们今天主要向大家描述的是DB2数据库Table与Tablespaces的命令,如果你对DB2数据库Table与Tablespaces的命令有兴趣的话,你就可以对以下的文章点击观看了,以下就是具体方案的描述,希望在你今后的学习中会有所帮助。

 

1.查询Table所属Tablespaces的方法。

 

  1. db2 "select tbspaceid from syscat.tables where tabname='<Table_NAME>'"  
  2. Exp:  
  3. [db2inst1@localhost ~]$ db2 "select tbspaceid from syscat.tables where tabname='ACT'"  
  4. TBSPACEID  

1 记录被选中

2.查询Tablespaces里面所包括的所有Table的方法。

  1. db2 "select tabname from syscat.tables where tbspaceid=<Tablespaces_ID>"  
  2. Exp:  
  3. [db2inst1@localhost ~]$ db2 "select tabname from syscat.tables where tbspaceid=2"  
  4. TABNAME  
  5. CL_SCHED  
  6. PROJECT  
  7. DEPARTMENT  
  8. EMPLOYEE  
  9. EMP_PHOTO  
  10. EMP_RESUME  
  11. PROJACT  
  12. EMPPROJACT  
  13. ACT  
  14. IN_TRAY  
  15. ORG  
  16. STAFF  
  17. SALES  
  18. STAFFG  
  19. ADEFUSR  

 你选择了一个记录

3.查询Tablespaces的Containers的方法。

 

  1. db2 list tablespace containers for <Tablespaces_ID> show detail  
  2. Exp:  
  3. [db2inst1@localhost ~]$ db2 list tablespace containers for 2 show detail  

以上的相关内容就是对DB2数据库Table和Tablespaces的命令的介绍,望你能有所收获。

DB2数据库Table和Tablespaces的命令

以上的相关内容就是对DB2数据库Table和Tablespaces的命令的介绍,望你能有所收获。

【编辑推荐】

  1. DB2存储过程编写时要用到的代码有哪些?
  2. DB2数据库的备份是否成功,一看就知道!
  3. DB2实施备份时应作的事项有哪些?
  4. IBM DB2 UDB 在线备份与恢复完美演习!
  5. 对DB2 Online备份方案的具体描述
责任编辑:佚名 来源: IT专家网
相关推荐

2010-08-11 17:28:56

DB2 数据仓库技术

2010-08-16 10:10:27

DB2常用函数

2010-08-11 15:48:04

DB2编程

2010-08-11 15:48:04

DB2编程

2010-08-18 16:45:40

IBM DB2 Cat

2010-08-04 15:23:04

DB2用户密码

2010-08-13 10:29:35

DB2数据库

2010-07-28 14:16:43

DB2驱动类型

2010-07-30 09:57:31

2010-08-26 16:00:31

DB2数据库安装

2010-08-13 15:42:22

DB2数据库分区

2010-08-19 09:37:41

DB2 V9.7 语句

2010-08-11 08:39:57

DB2 数据库

2010-08-11 17:24:13

DB2数据库优化

2010-08-03 14:40:05

DB2数据库

2010-08-20 13:33:50

DB2物化视图

2010-09-06 08:29:18

连接DB2数据库

2010-08-18 17:32:34

DB2数据库

2010-07-27 15:33:00

DB2数据库备份

2010-06-10 17:19:05

MySQL数据库
点赞
收藏

51CTO技术栈公众号