这是不是你想要的?关于database
db2 => LIST DATABASE DIRECTORY
System Database Directory
Number of entries in the directory = 1
Database 1 entry:
Database alias = MY_DB
Database name = MY_DB
Local database directory = /var/db/db2inv/DB
Database release level = a00
Comment =
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
关于tablespace
db2 => list tablespaces
Tablespaces for Current Database
Tablespace ID = 0
Name = SYSCATSPACE
Type = System managed space
Contents = Any data
State = 0x0000
Detailed explanation:
Normal
Tablespace ID = 1
Name = TEMPSPACE1
Type = System managed space
Contents = System Temporary data
State = 0x0000
Detailed explanation:
Normal
Tablespace ID = 2
Name = USERSPACE1
Type = System managed space
Contents = Any data
State = 0x0000
Detailed explanation:
Normal
Tablespace ID = 3
Name = INV_TS
Type = Database managed space
Contents = Any data
State = 0x0000
Detailed explanation:
Normal
Tablespace ID = 4
Name = INV_TEMP_TS
Type = Database managed space
Contents = System Temporary data
State = 0x0000
Detailed explanation:
Normal
Tablespace ID = 5
Name = USERTEMP1
Type = System managed space
Contents = User Temporary data
State = 0x0000
Detailed explanation:
Normal
Tablespace ID = 6
Name = SYSTOOLSPACE
Type = System managed space
Contents = Any data
State = 0x0000
Detailed explanation:
Normal
db2 => list tablespace containers for 1
Tablespace Containers for Tablespace 1
Container ID = 0
Name = /var/db/db2inv/DB/db2inv/NODE0000/SQL00001/SQLT00010
Type = Path
1、查询SQL中的所有表: Select TABLE_NAME FROM 数据库名称INFORMATION_SCHEMATABLES Where TABLE_TYPE='BASE TABLE' 执行之后,就可以看到数据库中所有属于自己建的表的名称 2、查询SQL中所有表及列: Select dbosysobjectsname as Table_name, dbosyscolumnsname AS Column_name FROM dbosyscolumns INNER JOIN dbosysobjects ON dbosyscolumnsid = dbosysobjectsid Where (dbosysobjectsxtype = 'u') AND (NOT (dbosysobjectsname LIKE 'dtproperties')) 3、在Sql查询分析器,还有一个简单的查询方法: EXEC sp_MSforeachtable @command1="sp_spaceused ''" 执行完之后,就可以看到数据库中所有用户表的信息 4、查询总存储过程数:select count() 总存储过程数 from sysobjects where xtype='p' 附:xtype类型D = 默认值或 DEFAULT 约束
F = FOREIGN KEY 约束L = 日志FN = 标量函数
IF = 内嵌表函数
P = 存储过程
PK = PRIMARY KEY 约束(类型是 K)
RF = 复制筛选存储过程S = 系统表TF = 表函数
TR = 触发器U = 用户表UQ = UNIQUE 约束(类型是 K)V = 视图X = 扩展存储过程 另:在sqlserver中取得某个数据库中所有表名的sql语句 select sysobjectsname from sysobjectsxtype ='U';SELECT name
WHERE (xtype = 'U') 在数据库的sysobjects表里有这个数据库全部表的信息, xtype值为'U'的就是表名 注意:一般通过上述方法获得全部用户表示都会有一个dtproperties表,SQLSERVER 默认它也是用户表,想要从用户表中排出,需要加上限定条件 status>0,即:select from sysobjects where xtype='U' and status>0
以上就是关于AIX 下 db2 如何查看数据库空间建在哪里全部的内容,包括:AIX 下 db2 如何查看数据库空间建在哪里、怎么查看sqlserver实例名、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)