e股脑电脑教程网
  • 首 页
  • 操作系统
  • 应用软件
  • 下载工具
  • 影音视频
  • 办公软件
  • 媒体制作
  • 网站建设
  • 平面设计
  • 数据库
  • 程序开发
  • 视频教程
编辑推荐: | 文章搜索:
您现在的位置: e股脑 >> 数据库 >> DB2教程 >> 在 Linux 上模拟大规模并行数据库处理! >> 教程正文
 
教程搜索
 
 
相关教程
  • 数据挖掘器: 警告 — 及时采取行动
  • UNIX、Linux 和 Windows 的生动简介
  • “总览图”: IBM DB2 通用数据库和信息
  • DB2 大事记
  • 数据管理部门副总裁兼 CTO:Don Hader
  • IBM 联邦数据库技术
  • 唐纳德.海德勒(Donald J. Haderle)
  • 数据库未来展望
  • 哪一个分布式 DB2 UDB V8 版本适合您?
  • 从数据管理到信息集成: 自然的演变
  • 联邦 - 数据库互操作性(第 1 部分)
  • 成功是必然的(中)
  • 成功是必然的(上)
  • 成功是必然的(下)
  • DB2 信息集成: 总览图
  • IBM 杰出工程师兼信息集成主管 Nelson
 
 

图文教程


  • Windows抢了谁的饭碗 非主流操作系统To

  • 地球还是火星 平常心看“非主流”

  • 综合运用Office 2007批量制作奖状

  • 没有系统盘如何才能修复受损系统?

  • 巧妙运用Excel中边界的附加功能!
 
 
赞 助 商
 
 
在 Linux 上模拟大规模并行数据库处理!
  • 来源:e股脑
  • 点击次数:
  • 更新时间:2007-8-9
,它将为第二个节点创建数据副本。


  • 创建跨节点进行分区的表。请注意新的语法: PARTITIONING KEY(foo) USING HASHING; 这是指定哪个列用于分区数据的方法。请记住:列 foo 中的值应该有高基数(假定没有许多重复值)。

  • 将一些数据插入表中。

    如果您更喜欢用另一种方法来插入行,请随意。该程序将一个递增整数插入列 foo 中。

  • 查看分区分布。

    该步骤中所示的查询显示了行在 4096 个散列存储区之间是如何分布的。随着更多的键值混编到特定存储区,散列存储区不断增大。这表示某些散列存储区的值可以比其它散列存储区多。这是任何散列算法所固有的,不会有负面影响,除非有一个显著的散列偏离。如果发生显著的偏离,您或许要查看分区键的基数并挑选一些值更为独特的东西。 select partition ( foo) as Partition_Hash,

    count(*) as Hash_Count

    from marty

    group by partition ( foo)

    order by count(*) desc

    fetch first 10 rows only ;

    PARTITION_HASH HASH_COUNT

    -------------- -----------

    2626 17

    3464 15

    307 13

    329 13

    746 13

    1913 13

    107 12

    492 12

    847 12

    1021 12

    10 record(s) selected.

  • ( 最后一个步骤。)

    祝贺您!享受您的选择吧!如果您到此没有任何错误,我会很激动。如果有错误,我希望下面一节会尽量减少您的烦恼。

  • 疑难解答

    万一某一步骤出错,下面是各种错误消息的参考和修正它们所需的步骤。

    消息:SQL6031N 错误

    症状:

    SQL6031N Error in the db2nodes.cfg file at line number "2". Reason code "12".

    诊断: 要查找该错误的文本,使用 db2 命令环境 $ db2 ? SQL031N Reason code ?2? states: (12) Ensure that you only use port values that are specified in the services file (/etc/services file on UNIX-based systems) for your instance. 解决方案:

    要修正该问题,根据上面 第 6 步的描述更新 /etc/services。 消息:SQL6048N 通信错误

    该消息可能出现在启动和停止处理期间,如 第 10 步中所描述的那样。该问题的根源要回到 第 2 步。导致出现该消息的其它可能问题是 pdksh 问题,我们将在 下面讨论它。

    症状:

    [db2inst1@poohbah db2inst1]$ db2start

    12-31-2001 09:29:32 0 0 SQL6048N A communication error occurred during START or STOP DATABASE MANAGER processing.

    12-31-2001 09:29:32 1 0 SQL6048N A communication error occurred during START or STOP DATABASE MANAGER processing.

    SQL1032N No start database manager command was issued. SQLSTATE=57019

    SQL6048N A communication error occurred during START or STOP

    DATABASE MANAGER processing.

    诊断:

    节点无法彼此对话。节点必须通信,才能传输 SQL 查询和接收回结果集。

    下面显示了该错误消息的全文: Explanation: A TCP/IP communication error occurred while the START or STOP DATABASE MANAGER command was trying to establish connection with all the nodes defined in the sqllib/db2nodes.cfg file.

    User Response: Do the following:: Ensure that the node has the proper a uthorization defined in the .rhosts or the host.equiv files.

    If using multiple logical nodes, ensure the DB2NODE environment variable is set correctly. The DB2NODE environment variable indicates the node the application will attempt to connect to. DB2NODE must be set to the node number of one of the nodes defined on the same host as the application. 解决方案:

    在 db2inst 主目录中添加 .rhosts 文件,通过输入下列命令,验证 rsh 是否正在运行:


    $ rsh localhost echo hi

    文本“hi”将出现在标准输出上。您可以用下列命令进一步验证功能的正确性:

    $ db2_all echo hi

    应该在标准输出上获得字符串“hi”,db2_all 的成功操作指出您还正确地安装了 pdksh。如果 db2_all 失败,请阅读下一个错误消息。

    消息:SQL6048N 症状:

    由于 第 2 步中 rsh 设置出现的问题,我们可能已经看到了这一错误消息。如果没有按照 第 4 步所描述的那样安装 pdksh,那么也会出现该错误。

    [db2inst1@poohbah db2inst1]$ db2start

    12-31-2001 10:21:42 0 0 SQL6048N A communication error occurred during START or STOP DATABASE MANAGER processing.

    12-31-2001 10:21:42 1 0 SQL6048N A communication error occurred during START or STOP DATABASE MANAGER processing.

    SQL1032N No start database manager command was issued. SQLSTATE=57019

    诊断:

    这些错误是由于丢失 /bin/ksh 引起的。

    解决方案:

    按照下面的指示信息安装公共域 Korn shell:

    rpm -i /mnt/cdrom/RedHat/RPMS/pdksh-5.2.14-13.i386.rpm

    消息:SQL0902C 系统错误 症状:

    数据库启动,但在连接时发生错误。在 Red Hat 7.1 和 Red Hat 7.2 平台上出现的错误有所不同。

    Red Hat Linux 7.2 上的内核参数错误:

    [db2inst1@poohbah db2inst1]$ db2start

    01-03-2002 10:41:45 1 0 SQL1063N DB2START processing was successful.

    01-03-2002 10:41:46 0 0 SQL1063N DB2START processing was successful.

    SQL1063N DB2START processing was successful.

    [db2inst1@poohbah db

    上一页  1 2 3 4 下一页
  • 上一篇教程: DB2 UDB V8 中设置用户出口来归档数据库日志
  • 下一篇教程: 创建高可用性的 DB2 服务(一)
  •  

    关于本站 | 广告联系 | 版权声明 | 使用帮助

    Copyright © 2004-2008 www.egunao.com All rights reserved.