<?xml version="1.0" encoding="gb2312"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:lang="zh-cn">
    
    <title>myfriend2010的博客</title> 
<link rel="alternate" type="text/html" href="http://myfriend2010.itpub.net" /> 
 
<modified>Thu,17 05 2012 02:21:40</modified> 
<tagline></tagline> 
<generator url="http://www.plogworld.net/" version="1.0.1">pLog</generator> 
 
<copyright>Copyright (c) myfriend2010</copyright> 
    
 <entry> 
 <id>tag:post:blog.itpub.net,Wed,09 01 2008 17:36:43</id>
 <title>db2 分析函数的一篇文章</title> 
 <link rel="alternate" type="text/html" href="http://myfriend2010.itpub.net/post/29012/450704" /> 
  
 <modified>Wed,09 01 2008 17:36:43</modified> 
 <issued>Wed,09 01 2008 17:36:43</issued> 
 <created>Wed,09 01 2008 17:36:43</created> 
 <summary type="text/plain"> --OLAP：DB2&amp;reg; Universal Database 中引入的在线分析处理（OLAP）函数，这些函数扩展了关系模型、使关系模型能够理解行集合内的排序方式（ordering）。排列函数 第一类引入到 DB2 中的 OLAP 函数是 排列（ranking）函数，它们是在 DB2 Version 6 中引入的。这些排列函数提供了定义一个集合（使用 PARTITION 子句），然后根据某种排序方式对这个集合内的元素进行排列的能力。例如，假设我们有一个雇员表，现在要对每个部门内的雇员薪水进行排列。要实现这一点，我们需要一个函数调用，这个函数调用可以完成以下工作： 将分区（集合）定义...</summary> 
 <author> 
  
 <name>myfriend2010</name> 
 <url>http://myfriend2010.itpub.net</url> 
 <email>myfriend2010@tom.com</email> 
</author> 
<dc:subject>
db2
</dc:subject> 
 <content type="text/html" mode="escaped" xml:lang="zh-cn" xml:base="http://myfriend2010.itpub.net"> 
 --OLAP：DB2&amp;reg; Universal Database 中引入的在线分析处理（OLAP）函数，这些函数扩展了关系模型、使关系模型能够理解行集合内的排序方式（ordering）。排列函数 第一类引入到 DB2 中的 OLAP 函数是 排列（ranking）函数，它们是在 DB2 Version 6 中引入的。这些排列函数提供了定义一个集合（使用 PARTITION 子句），然后根据某种排序方式对这个集合内的元素进行排列的能力。例如，假设我们有一个雇员表，现在要对每个部门内的雇员薪水进行排列。要实现这一点，我们需要一个函数调用，这个函数调用可以完成以下工作： 将分区（集合）定义...</content> 
</entry> 

 <entry> 
 <id>tag:post:blog.itpub.net,Mon,07 01 2008 18:08:35</id>
 <title>DB2中數据庫管理頁大小的限制</title> 
 <link rel="alternate" type="text/html" href="http://myfriend2010.itpub.net/post/29012/450256" /> 
  
 <modified>Mon,07 01 2008 18:08:35</modified> 
 <issued>Mon,07 01 2008 18:08:35</issued> 
 <created>Mon,07 01 2008 18:08:35</created> 
 <summary type="text/plain"> DB2中的限制之六數据庫管理頁大小的限制 在現實的DB2應用中大家可能經常會遇到一些錯誤,錯誤的原因是對DB2的限制不太了解而引起的,在此我簡單地總結一下,歡迎大家繼續﹐以便和大家共享﹐共同探討﹐共同近步﹗(以下主要以DB2 7.X為例)。1. 一個表中的列的最大個數 4KB頁大小的限制=500 8KB頁大小的限制=1012 16KB頁大小的限制=1012 32KB頁大小的限制=10122. 一行的最大長度 4KB頁大小的限制=4005 8KB頁大小的限制=8101 16KB頁大小的限制=16293 32KB頁大小的限制=326773. 一個表的每個分區的最大規模(千兆字節) 4KB頁大小的限制=64 8KB頁大小...</summary> 
 <author> 
  
 <name>myfriend2010</name> 
 <url>http://myfriend2010.itpub.net</url> 
 <email>myfriend2010@tom.com</email> 
</author> 
<dc:subject>
db2
</dc:subject> 
 <content type="text/html" mode="escaped" xml:lang="zh-cn" xml:base="http://myfriend2010.itpub.net"> 
 DB2中的限制之六數据庫管理頁大小的限制 在現實的DB2應用中大家可能經常會遇到一些錯誤,錯誤的原因是對DB2的限制不太了解而引起的,在此我簡單地總結一下,歡迎大家繼續﹐以便和大家共享﹐共同探討﹐共同近步﹗(以下主要以DB2 7.X為例)。1. 一個表中的列的最大個數 4KB頁大小的限制=500 8KB頁大小的限制=1012 16KB頁大小的限制=1012 32KB頁大小的限制=10122. 一行的最大長度 4KB頁大小的限制=4005 8KB頁大小的限制=8101 16KB頁大小的限制=16293 32KB頁大小的限制=326773. 一個表的每個分區的最大規模(千兆字節) 4KB頁大小的限制=64 8KB頁大小...</content> 
</entry> 

 <entry> 
 <id>tag:post:blog.itpub.net,Mon,07 01 2008 14:55:06</id>
 <title>DB2 分区特性</title> 
 <link rel="alternate" type="text/html" href="http://myfriend2010.itpub.net/post/29012/450242" /> 
  
 <modified>Mon,07 01 2008 14:55:06</modified> 
 <issued>Mon,07 01 2008 14:55:06</issued> 
 <created>Mon,07 01 2008 14:55:06</created> 
 <summary type="text/plain"> 简介在数据仓库中，事实表或历史表的大小是摆在设计人员和管理员面前的一个挑战。这些表通常包含数亿行数据，有时候甚至包含数千亿行数据。对于这种规模的表，主要关心以下几点：查询性能 将大量新数据插入到这些表中 每月或每个季度删除大量过时的数据 随着时间的推移，DB2 继续添加和增强特性，以解决这些需求。DB2 9 for Linux, UNIX, and Windows 中一个重要的增强是表分区特性。这导致以下问题：有哪些这样的特性？ 每个特性对解决上面关心的问题有什么作用？ 我应该使用哪些特性？ 如何将这些特性结合起来使用以增强效果？ 这些就是...</summary> 
 <author> 
  
 <name>myfriend2010</name> 
 <url>http://myfriend2010.itpub.net</url> 
 <email>myfriend2010@tom.com</email> 
</author> 
<dc:subject>
db2
</dc:subject> 
 <content type="text/html" mode="escaped" xml:lang="zh-cn" xml:base="http://myfriend2010.itpub.net"> 
 简介在数据仓库中，事实表或历史表的大小是摆在设计人员和管理员面前的一个挑战。这些表通常包含数亿行数据，有时候甚至包含数千亿行数据。对于这种规模的表，主要关心以下几点：查询性能 将大量新数据插入到这些表中 每月或每个季度删除大量过时的数据 随着时间的推移，DB2 继续添加和增强特性，以解决这些需求。DB2 9 for Linux, UNIX, and Windows 中一个重要的增强是表分区特性。这导致以下问题：有哪些这样的特性？ 每个特性对解决上面关心的问题有什么作用？ 我应该使用哪些特性？ 如何将这些特性结合起来使用以增强效果？ 这些就是...</content> 
</entry> 

 <entry> 
 <id>tag:post:blog.itpub.net,Sat,05 01 2008 09:09:54</id>
 <title>db2 分区数据库概念：分区兼容性，并置</title> 
 <link rel="alternate" type="text/html" href="http://myfriend2010.itpub.net/post/29012/449501" /> 
  
 <modified>Sat,05 01 2008 09:09:54</modified> 
 <issued>Sat,05 01 2008 09:09:54</issued> 
 <created>Sat,05 01 2008 09:09:54</created> 
 <summary type="text/plain"> 最近在看一些DB2的DPF方面的东西，有两个概念有一些搞不懂。就是“分区兼容性”和“并置”两个概念。资料是这样写的：分区兼容性可对分区键的对应列的基本数据类型进行比较，并可将它们声明为是分区兼容的（partition compatible）。分区兼容的数据类型具有如下属性：具有相同值但有不同类型的两个变量会按相同的分区算法映射至同一个分区号。 分区兼容性具有下列特征：基本数据类型与另一个相同的基本数据类型兼容。 内部格式用于 DATE、TIME 和 TIMESTAMP 数据类型。它们彼此都不兼容，且都不与 CHAR 兼容。 分区兼容性不受带有 NOT NUL...</summary> 
 <author> 
  
 <name>myfriend2010</name> 
 <url>http://myfriend2010.itpub.net</url> 
 <email>myfriend2010@tom.com</email> 
</author> 
<dc:subject>
db2
</dc:subject> 
 <content type="text/html" mode="escaped" xml:lang="zh-cn" xml:base="http://myfriend2010.itpub.net"> 
 最近在看一些DB2的DPF方面的东西，有两个概念有一些搞不懂。就是“分区兼容性”和“并置”两个概念。资料是这样写的：分区兼容性可对分区键的对应列的基本数据类型进行比较，并可将它们声明为是分区兼容的（partition compatible）。分区兼容的数据类型具有如下属性：具有相同值但有不同类型的两个变量会按相同的分区算法映射至同一个分区号。 分区兼容性具有下列特征：基本数据类型与另一个相同的基本数据类型兼容。 内部格式用于 DATE、TIME 和 TIMESTAMP 数据类型。它们彼此都不兼容，且都不与 CHAR 兼容。 分区兼容性不受带有 NOT NUL...</content> 
</entry> 

 <entry> 
 <id>tag:post:blog.itpub.net,Fri,28 12 2007 09:18:21</id>
 <title>profile使用入门 :)--pub精华!</title> 
 <link rel="alternate" type="text/html" href="http://myfriend2010.itpub.net/post/29012/446779" /> 
  
 <modified>Fri,28 12 2007 09:18:21</modified> 
 <issued>Fri,28 12 2007 09:18:21</issued> 
 <created>Fri,28 12 2007 09:18:21</created> 
 <summary type="text/plain"> profile使用入门 :)很多开发和数据库管理人员都在为优化器问题烦恼不已。尽管很多时候优化器问题都是可以通过常规手段解决的，但是在某些特殊情况下，或者紧急情况（没有时间完整地分析问题）下，用户可以使用profile暂时强制优化器使用某些特定的操作。。。下面是一个step by step的例子，简单地说明了怎样强制优化器使用table scanDB21085I Instance &quot;DB2&quot; uses &quot;32&quot; bits and DB2 code release &quot;SQL09010&quot; withlevel identifier &quot;02010107&quot;.Informational tokens are &quot;DB2 v9.1.0.356&quot;, &quot;s060629&quot;, &quot;NT32&quot;, and Fix Pack &quot;0&quot;.Product i...</summary> 
 <author> 
  
 <name>myfriend2010</name> 
 <url>http://myfriend2010.itpub.net</url> 
 <email>myfriend2010@tom.com</email> 
</author> 
<dc:subject>
db2
</dc:subject> 
 <content type="text/html" mode="escaped" xml:lang="zh-cn" xml:base="http://myfriend2010.itpub.net"> 
 profile使用入门 :)很多开发和数据库管理人员都在为优化器问题烦恼不已。尽管很多时候优化器问题都是可以通过常规手段解决的，但是在某些特殊情况下，或者紧急情况（没有时间完整地分析问题）下，用户可以使用profile暂时强制优化器使用某些特定的操作。。。下面是一个step by step的例子，简单地说明了怎样强制优化器使用table scanDB21085I Instance &quot;DB2&quot; uses &quot;32&quot; bits and DB2 code release &quot;SQL09010&quot; withlevel identifier &quot;02010107&quot;.Informational tokens are &quot;DB2 v9.1.0.356&quot;, &quot;s060629&quot;, &quot;NT32&quot;, and Fix Pack &quot;0&quot;.Product i...</content> 
</entry> 

 <entry> 
 <id>tag:post:blog.itpub.net,Tue,18 12 2007 21:12:23</id>
 <title>DB2表中统计信息收集及数据重组 转</title> 
 <link rel="alternate" type="text/html" href="http://myfriend2010.itpub.net/post/29012/443049" /> 
  
 <modified>Tue,18 12 2007 21:12:23</modified> 
 <issued>Tue,18 12 2007 21:12:23</issued> 
 <created>Tue,18 12 2007 21:12:23</created> 
 <summary type="text/plain"> DB2提供了3个命令工具，重组和分析table中的数据：REORGCHKREORGRUNSTAT在(一)中收集了对象的统计信息，这里，可以用这些统计信息来诊断对象的物理存储了。具体内容见：http://blog.csdn.net/dlinger/archive/2004/10/12/133178.aspx2.REORGCHK ，诊断对象的物理存储&gt;&gt;-REORGCHK----+-------------------------------+----------------------------------+&lt;&lt; | |-UPDATE--| | | .-USER------- .--| '--+-CURRENT-+---STATISTICS--' '-ON TABLE--+-SYSTEM-----+--' +-ALL--------+ '-table-name-'在UDB的V8版本中增加了on schema 的选项。U...</summary> 
 <author> 
  
 <name>myfriend2010</name> 
 <url>http://myfriend2010.itpub.net</url> 
 <email>myfriend2010@tom.com</email> 
</author> 
<dc:subject>
db2
</dc:subject> 
 <content type="text/html" mode="escaped" xml:lang="zh-cn" xml:base="http://myfriend2010.itpub.net"> 
 DB2提供了3个命令工具，重组和分析table中的数据：REORGCHKREORGRUNSTAT在(一)中收集了对象的统计信息，这里，可以用这些统计信息来诊断对象的物理存储了。具体内容见：http://blog.csdn.net/dlinger/archive/2004/10/12/133178.aspx2.REORGCHK ，诊断对象的物理存储&gt;&gt;-REORGCHK----+-------------------------------+----------------------------------+&lt;&lt; | |-UPDATE--| | | .-USER------- .--| '--+-CURRENT-+---STATISTICS--' '-ON TABLE--+-SYSTEM-----+--' +-ALL--------+ '-table-name-'在UDB的V8版本中增加了on schema 的选项。U...</content> 
</entry> 

 <entry> 
 <id>tag:post:blog.itpub.net,Sat,15 12 2007 10:01:25</id>
 <title>AIX常用命令</title> 
 <link rel="alternate" type="text/html" href="http://myfriend2010.itpub.net/post/29012/439576" /> 
  
 <modified>Sat,15 12 2007 10:01:25</modified> 
 <issued>Sat,15 12 2007 10:01:25</issued> 
 <created>Sat,15 12 2007 10:01:25</created> 
 <summary type="text/plain"> AIX常用命令查看交换区信息：lsps -a 显示交换区的分布信息lsps -s 显示交换区的使用信息slibclean 清除处理程序遗留的旧分页信息smit mkps 建立交换区空间信息swapon -a 启动所有的分页空间/etc/swapspaces 存放分页空间表格信息显示卷信息：lsvg 显示卷的名称lsvg -l rootvg 显示rootvg卷的详细信息mount卷的方法：varyonvg datavg 加载datavg卷mount /dev/data1 加载datavg下的一个data1卷裸设备类型：raw,jfs jfs可以转变成文件系统，而raw则不行在裸设备上安装oracle系统：修改裸设备的权限，如裸设备名为system01，安装数据库用户为...</summary> 
 <author> 
  
 <name>myfriend2010</name> 
 <url>http://myfriend2010.itpub.net</url> 
 <email>myfriend2010@tom.com</email> 
</author> 
<dc:subject>
UNIX/LINUX
</dc:subject> 
 <content type="text/html" mode="escaped" xml:lang="zh-cn" xml:base="http://myfriend2010.itpub.net"> 
 AIX常用命令查看交换区信息：lsps -a 显示交换区的分布信息lsps -s 显示交换区的使用信息slibclean 清除处理程序遗留的旧分页信息smit mkps 建立交换区空间信息swapon -a 启动所有的分页空间/etc/swapspaces 存放分页空间表格信息显示卷信息：lsvg 显示卷的名称lsvg -l rootvg 显示rootvg卷的详细信息mount卷的方法：varyonvg datavg 加载datavg卷mount /dev/data1 加载datavg下的一个data1卷裸设备类型：raw,jfs jfs可以转变成文件系统，而raw则不行在裸设备上安装oracle系统：修改裸设备的权限，如裸设备名为system01，安装数据库用户为...</content> 
</entry> 

 <entry> 
 <id>tag:post:blog.itpub.net,Thu,06 12 2007 09:56:01</id>
 <title>SQL0290N 表空间状态为： 停顿的独占的处理</title> 
 <link rel="alternate" type="text/html" href="http://myfriend2010.itpub.net/post/29012/426658" /> 
  
 <modified>Thu,06 12 2007 09:56:01</modified> 
 <issued>Thu,06 12 2007 09:56:01</issued> 
 <created>Thu,06 12 2007 09:56:01</created> 
 <summary type="text/plain"> 今天一个同事报告一个问题，表都不能使用了检查了一下，发现问题 db2 =&gt; select * from testACTNO ACTKWD ACTDESC------ ------ --------------------SQL0290N Table space access is not allowed. SQLSTATE=55039其他表也不能使用在db2cc里查看表空间状态为： 停顿的独占解决方法：到命令行状态，首先connect 到需要处理的数据库1、db2 =&gt; list tablespaces show detail 显示表空间状态Tablespaces for Current DatabaseTablespace ID = 0Name = SYSCATSPACEType = System managed spaceContents = Any dataState = 0x0000Detailed expla...</summary> 
 <author> 
  
 <name>myfriend2010</name> 
 <url>http://myfriend2010.itpub.net</url> 
 <email>myfriend2010@tom.com</email> 
</author> 
<dc:subject>
db2
</dc:subject> 
 <content type="text/html" mode="escaped" xml:lang="zh-cn" xml:base="http://myfriend2010.itpub.net"> 
 今天一个同事报告一个问题，表都不能使用了检查了一下，发现问题 db2 =&gt; select * from testACTNO ACTKWD ACTDESC------ ------ --------------------SQL0290N Table space access is not allowed. SQLSTATE=55039其他表也不能使用在db2cc里查看表空间状态为： 停顿的独占解决方法：到命令行状态，首先connect 到需要处理的数据库1、db2 =&gt; list tablespaces show detail 显示表空间状态Tablespaces for Current DatabaseTablespace ID = 0Name = SYSCATSPACEType = System managed spaceContents = Any dataState = 0x0000Detailed expla...</content> 
</entry> 

 <entry> 
 <id>tag:post:blog.itpub.net,Wed,05 12 2007 14:46:03</id>
 <title>db2执行计划显示工具介绍</title> 
 <link rel="alternate" type="text/html" href="http://myfriend2010.itpub.net/post/29012/425784" /> 
  
 <modified>Wed,05 12 2007 14:46:03</modified> 
 <issued>Wed,05 12 2007 14:46:03</issued> 
 <created>Wed,05 12 2007 14:46:03</created> 
 <summary type="text/plain"> db2执行计划显示工具介绍db2有图形执行计划显示工具,如果没有图形环境,如unix主机,可以生成文本的文件来显示执行计划1.如果第一次执行,请先 connect to dbname,执行db2 -tvf $HOME/sqllib/misc/EXPLAIN.DDL建立执行计划表2.db2 set current explain mode explain设置成解释模式,并不真正执行下面将发出的sql命令3.db2 &quot;select count(*) from staff&quot;执行你想要分析的sql语句4.db2 set current explain mode no取消解释模式5.db2exfmt -d sample -g TIC -w -l -s % -n % -o db2exmt.out执行计划输出到文件db2exmt.out</summary> 
 <author> 
  
 <name>myfriend2010</name> 
 <url>http://myfriend2010.itpub.net</url> 
 <email>myfriend2010@tom.com</email> 
</author> 
<dc:subject>
db2
</dc:subject> 
 <content type="text/html" mode="escaped" xml:lang="zh-cn" xml:base="http://myfriend2010.itpub.net"> 
 db2执行计划显示工具介绍db2有图形执行计划显示工具,如果没有图形环境,如unix主机,可以生成文本的文件来显示执行计划1.如果第一次执行,请先 connect to dbname,执行db2 -tvf $HOME/sqllib/misc/EXPLAIN.DDL建立执行计划表2.db2 set current explain mode explain设置成解释模式,并不真正执行下面将发出的sql命令3.db2 &quot;select count(*) from staff&quot;执行你想要分析的sql语句4.db2 set current explain mode no取消解释模式5.db2exfmt -d sample -g TIC -w -l -s % -n % -o db2exmt.out执行计划输出到文件db2exmt.out</content> 
</entry> 

 <entry> 
 <id>tag:post:blog.itpub.net,Thu,29 11 2007 13:31:59</id>
 <title>在DB2中恢复删除表的技巧-转</title> 
 <link rel="alternate" type="text/html" href="http://myfriend2010.itpub.net/post/29012/421683" /> 
  
 <modified>Thu,29 11 2007 13:31:59</modified> 
 <issued>Thu,29 11 2007 13:31:59</issued> 
 <created>Thu,29 11 2007 13:31:59</created> 
 <summary type="text/plain"> 这边转载了一个恢复drop后的表的一个操作，类似于oracle 10g中的闪回！DB2在历史文件中保存了备份，恢复，装载数据，删除表等操作. 假设数据库名为sample, 您可以用下面的命令列出删除表的记录: db2 &quot;list history dropped table all for sample&quot; 下一步是从以前的备份中恢复删除表所在的表空间, 备份所在的目录是c:db2backup. without rolling forward指明不需要前滚. db2 &quot;restore db sample tablespace(userspace1) from c:db2backup taken at 20041102100931 without rolling forward without prompting&quot; 第三步是把所删除表的数据卸载...</summary> 
 <author> 
  
 <name>myfriend2010</name> 
 <url>http://myfriend2010.itpub.net</url> 
 <email>myfriend2010@tom.com</email> 
</author> 
<dc:subject>
db2
</dc:subject> 
 <content type="text/html" mode="escaped" xml:lang="zh-cn" xml:base="http://myfriend2010.itpub.net"> 
 这边转载了一个恢复drop后的表的一个操作，类似于oracle 10g中的闪回！DB2在历史文件中保存了备份，恢复，装载数据，删除表等操作. 假设数据库名为sample, 您可以用下面的命令列出删除表的记录: db2 &quot;list history dropped table all for sample&quot; 下一步是从以前的备份中恢复删除表所在的表空间, 备份所在的目录是c:db2backup. without rolling forward指明不需要前滚. db2 &quot;restore db sample tablespace(userspace1) from c:db2backup taken at 20041102100931 without rolling forward without prompting&quot; 第三步是把所删除表的数据卸载...</content> 
</entry> 
     </feed>



