DB2的备份恢复有点坑,当源系统和目标系统的路径设置不同时,要手动进行重定向恢复,本文是我一次实战操作之后总结的过程,仅供参考. 一.发出重定向恢复命令 DB2 RESTORE DB TO "C:" INTO NEWDB REDIRECT 其中,OLDDB是旧数据库.备份的数据库名称,NEWDB是新数据库名称,不用事先创建也可以,C:\OLDDBbak是备份文件放置的目录,20150717164847是 备份文件的时间戳,具体可看备份文件的名字OLDDB.0.DB2.NODE0000.
1.程序报错,无法进行修改操作,通过日志,看到如下错误 2.通过google查询,问题是表空间文件不够了 "表空间大小(M)",(a.bytes "已使用空间(M)",b.bytes "空闲空间(M)",, ) "使用比" FROM (SELECT tablespace_name, sum(bytes) bytes FROM dba_data_files GROUP BY tablespace_name) a,(SELECT
1. 查看表空间的名字及文件所在的位置 select tablespace_name, file_id, file_name, round(bytes / (1024 * 1024), 0) total_space from sys.dba_data_files order by tablespace_name; 2. 指定表空间查看数据文件目录 select name from v$datafile where ts# in (select ts# from v$tablespace wh
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
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
--找到存放dbf文件的路径--E:\oracle\product\10.2.0\oradata\orcl--可以通过此语句进行查询select * from v$datafile; --创建表空间create tablespace cxjm logging datafile 'E:\oracle\product\10.2.0\oradata\orcl\cxjm.dbf' size 50m autoextend on extent management local; drop user cxjm
今天下午恢复表的时候发现出现错误: 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
默认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