首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > 其他数据库 >

小札记

2012-07-22 
小笔记1、自动生成批处理文件建文本文件:temp.sqlselect runstats on table DB2. || tabname || with d

小笔记

1、
自动生成批处理文件

建文本文件:temp.sql

select 'runstats on table DB2.' || tabname || ' with distribution and detailed indexes all;' from syscat.tables where tabschema='DB2' and type='T';

db2 –tf temp.sql>runstats.sql

2、虚表
SELECT current date FROM (values 1) as a; --(values 1) as a 为虚表,相当于orcle的dual

3、查错误号
db2cmd-->db2 ? sql:(-433)错误号

4、重启
db2 force application all
db2stop
db2stop force

热点排行