DB2 notes

 

The best description of construciton of DB2

DB2IBM公司的优秀产品,其内部对数据库的管理是通过:实例、节点组、数据库、表空间、表(及视图等)来进行的。

数据库管理程序 (有时称为实例)是管理数据的 DB2 代码。它控制可对数据执行的操作,并管理分配给它的系统资源。每一个实例都是一个完整的环境。它包含为一个给定的并行数据库系统定义的所有数据库分区。一个实例有它自己的数据库(其他实例不能存取它),并且它全部的数据库分区共享相同的系统目录。它也有独立于同一机器上的其他实例的单独的安全性。

节点组是一个或多个数据库分区组成的集合。 当您想为数据库创建表时,首先创建将存储表空间的节点组,然后创建将存储表的表空间。有关节点组的更多信息,参见"节点组和数据分区"。 有关数据库分区的定义,参见"DB2 并行性概念概述"

 一个数据库由称为表空间的部件组成。表空间的定义和属性记录在数据库系统编目中。一旦创建了一个表空间,您就可以在此表空间中创建表。会给一个表空间分配一个容器。 容器是物理存储器的一种分配形式(如文件或设备)。表空间驻留在节点组中。 一个表由逻辑地按行和列排列的数据组成。表中的数据在逻辑上是相关的,且可以定义表与表之间的关系。根据称为关系的数学规则和操作来察看和操纵数据。

表数据通过 SQL 存取, SQL 是一种标准化语言,用于定义和操纵一个关系数据库中的数据。所有数据库和表数据都被指定到表空间。应用程序或用户使用查询,以从数据库检索数据。该查询使用结构化查询语言”(SQL) 来创建下列格式的语句 SELECT FROM

  now keep learning from db2-tutorial and another db2 basic training:

1)go to control center->right click on sample->start

2)go to start->ibm db2->db2copy1(my instance name)->command tool->command line processor

3) first command list database directory get all the databases installed

4) you can type in db2 enter to go to db2 command center, or under bin folder use db2 command arguments to type in db2 command

5) Connect to: CONNECT TO sample USER admin USING password NEW newpassword CONFIRM newpassword

6) a schema in DB2 refers to a quilifying name used to group objects together within a databas.

All tables have a fully qualified name consisting of its schema name and the table name.

 schema in chinese is 模式 so the command to show all the tables created for a user is: LIST tables FOR SCHEMA username issue

---------unable to start db2 server-----------------

 the reason is the service is registrated in the win xp with old password as service, and the old password is saved in the system. so when the password is updated, with the old password services.msc can not start service. the resolution is update the password in services.msc in login area.

 -----------------------issue closed---------------------------------

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值