1.SQL 查询(选择Schema为SYSPROC) SELECT SUBSTR(TABLESPACE_NAME,,) AS TBSPC_NAME, AS "TOTAL(MB)", used_pages AS "USED(MB)", free_pages AS "FREE(MB)" FROM )) AS snapshot_tbs_cfg 2.存储过程查询(选择Schema为SYSPROC) db2 call GET_DBSIZE_INFO (?,
默认DB2 缓冲池信息监控是OFF, 需要开启(DB2表空间是由缓冲池分配的) CollBufferpool : ============ The CollBufferpool collector collects information for the DB2UDB_BUFFERPOOL application class and provides the values for monitoring DB2 buffer pools. Note: For the CollBufferpool
DB2表空间扩容 1 - Detect what tablespace has size issues db2 list tablespaces show detail 2 - Check the percentage of use from the tablespace db2 list tablespace containers for <tablespace_id> show detail 3 - Calculating the size of free space needed Now
Db2 connect to xxx Db2 “LIST TABLESPACES SHOW DETAIL” Tablespace ID = 7 Name = TSASNAA Type = Database managed space Contents = All permanent data. Large table space. State = 0x0000 Detailed explanation:[@more@] Normal Total pages = 14800 Useable pag
DB2的备份恢复有点坑,当源系统和目标系统的路径设置不同时,要手动进行重定向恢复,本文是我一次实战操作之后总结的过程,仅供参考. 一.发出重定向恢复命令 DB2 RESTORE DB TO "C:" INTO NEWDB REDIRECT 其中,OLDDB是旧数据库.备份的数据库名称,NEWDB是新数据库名称,不用事先创建也可以,C:\OLDDBbak是备份文件放置的目录,20150717164847是 备份文件的时间戳,具体可看备份文件的名字OLDDB.0.DB2.NODE0000.
使用的命令: db2 list tablespaces show detail db2 list tablespace containers for [Tablespace ID] [show detail] 说明:在语句末尾添加show detail,则能查看表空间大小以及使用的信息 以下是具体实现案例: 在日常使用db2的过程中,有时候我们需要查询db2表空间所存储的位置来判断磁盘空间是否还够用,下面为查询表空间TEMPTS16K的位置 db2inst1@Linux:/opt> db2 li
今天下午恢复表的时候发现出现错误: SQL3520W Load Consistency Point was successful. SQL3110N The utility has completed processing. "185345" rows were read from the input file. SQL3519W Begin Load Consistency Point. Input record count = "185345". SQL
解决DB2事物日志满.扩充表字段长度和表空间的命令 转:http://blog.sina.com.cn/s/blog_4c0137d10100bb5r.html 一.通常我们在使用db2导入数据或进行别的操作时会遇到事物日志已满的情况,导致操作无法继续. 在windows系统中,我们可先db2 get db cfg for dbname(要修改的数据库名) 来查看数据的配置情况. 这时根据你的需要来修改日志文件的大小.主日志文件数目和辅助日志文件的数目.命令如下: .db2 "update db
-.创建表空间 1.创建用户表空间 声明:在指定表空间创建路径的时候,需要指定空文件夹,非空文件夹会导致创建报错!!!如果文件夹不存在,那么在创建表空间的时候会自动创建文件夹! 1.1 创建SMS表空间 CREATE TABLESPACE <NAME> MANAGED BY SYSTEM USING ('<path>') 例子:db2 "create tablespace tbs1 managed by system using ('/db2home/db2inst1/d
1. 统计所有节点表空间使用率 select substr(TABLESPACE_NAME,1,20) as TBSPC_NAME,bigint(TOTAL_PAGES * PAGE_SIZE)/1024/1024 as "TOTAL(MB)", used_pages*PAGE_SIZE/1024/1024 as "USED(MB)", free_pages*PAGE_SIZE/1024/1024 as "FREE(MB)" f
Db2 connect to xxx Db2 “LIST TABLESPACES SHOW DETAIL” Tablespace ID = 7 Name = TSASNAA Type = Database managed space Contents = All permanent data. Large table space. State = 0x0000 Detailed explanation:[@more@] Normal Total pages = 14800 Useable pag