EMC

http://www.dumpsoon.com/E20-598.html

NOTE
In Windows, instances
do not really have an instance owner, but the name of the instance, i.e., DB2, will be used in place of the instance owner¡¯s ID.
Because more than one database can be created on the same drive or directory, each database must have its own unique subdirectory. Under the NODExxxx directory, there will be an SQLxxxxx directory for every database that was created on the drive/directory. For example, there are two databases, MYDB and SAMPLE, that were both created on the C: drive on Windows, so there will be two directories: SQL00001 and SQL00002.
To determine under which directory the database was created, enter the command LIST DATABASE DIRECTORY ON C:. This will produce output like the following:
Database 1 entry:

Database alias Database name Database directoryDatabase release level
Comment

Directory entry typeCatalog database partiDatabase partition num
Database 2 entry:

Database alias Database name Database directoryDatabase release level
Comment

Directory entry typeCatalog database partiDatabase partition num
In the example above, the database SAMPLE would have been created in the SQL00001 directory, and the database MYDB would have been created in the SQL00002 directory under the NODExxxx directory.
Under the database¡¯s SQL0000x directory, DB2 will create one directory for each of the three default table spaces, unless the table spaces were defined to use different containers in the CREATE DATABASE command.
By default, the system catalog table space will use the directory SQLT0000.0, the system temporary table space will use the directory SQLT0001.0, and the default user table space (USERSPACE1) will use the directory SQLT0002.0.
There is also a subdirectory named SQLOGDIR to hold the database log files. This location can be changed once the database has been created.
Given the following command, execute in the instance named db2inst1.
create database sample o
On the Linux or UNIX server where database partition 0 is defined, the following directory structures are created:
/database/db2inst1/NODE0/database/db2inst1/NODE0
On the server where database partition 1 is defined, the following directory structures are created:
/database/db2inst1/NODE0/database/db2inst1/NODE0
These directories would be created as illustrated in Figure 1.3.
Figure 1.3. Directory
structure for multi-
partitioned database.
If a second database is created in the same instance (i.e., db2inst1) on the same path using the command:
create database sample o
the directory structure would then look like Figure
1.4.
Figure 1.4. Directory structure for two databases in a multi-partitioned database.

NOTE
The sqldbdir directory contains the database
directory, i.e., a listing of all databases that are in the drive / path.
Table Spaces

A table space is a logical entity used to define where tables and indexes will be stored within a database. All DB2 tables and indexes reside in table spaces, allowing complete control over where the table and index data are physically stored.
A table space can be created using one or more underlying physical storage devices called containers. This provides the ability to create a physical database design that provides optimal performance in any physical environment.
Details about the table spaces in a database can be obtained using:
1. GET SNAPSHOT FOR TABLESPACES ON <database name>

LIST TABLESPACES
Containers

A table space is a logical database entity; table space containers are the physical storage associated with a table space. A container definition depends on the type of table space being created and can be defined as an operating system directory, a logical device/drive name, or a file.
When a table space is created, it must have at least one container associated with it. A single table space can contain multiple containers, but a container can belong to only one table space.
Details about a table space¡¯s containers can be obtained using the LIST TABLESPACE CONTAINERS FOR x command, where x is the table space¡¯s ID. A table space¡¯s ID can be found using the LIST TABLESPACES command and searching for the table space of interest.
NOTE
In general, containers must reside on local disks and cannot be created on LAN-redirected drives, NFS-mounted file systems, or GPFS file systems.
Extents
The basic unit of storage in a DB2 database is the
page, and pages can be different sizes. When pages are written to disk, they are grouped into contiguous ranges called extents. The extent size for a table space is specified for the table space when it is created and cannot be changed.
The DFT_EXTENT_SZ database configuration parameter specifies the default extent size for all table spaces in the database. This value can be overridden when the table space is created, using the EXTENTSIZE parameter of the CREATE TABLESPACE statement.
When a table space is created with more than one container, DB2 will write the data to the containers in a round-robin fashion. DB2 will fill an extent in one container, then fill an extent in the next container, and so on, until it has written an extent in all of the containers in the table space. DB2 will then fill the second extent in the first container, and so on.
However, this may change if containers are added or removed using the ALTER TABLESPACE command.
In Figure 1.5, the first extent (Extent 0) is written to Container 0, Extent 1 is written to Container 1, Extent 2 is written to Container 2. At this point, there is one extent in each of the containers, so DB2 will go back to the first container and add the next extent. Therefore, Extent 3 is written to Container 0, Extent 4 is written to Container 1, and so on, as more data is added.
Figure 1.5. Extents written to containers.

NOTE
The first extent (extent 0) for each object can start in different containers. Not all objects start in container
0.
Creating Table Spaces

Creating a table space within a database assigns the specified containers to the table space and records the table space and container definitions and attributes in the database. When creating a table space, it is important to consider the following:

What type of data the table space will hold Regular dataData or Index Large/Long data Temporary data What management type will be used System Managed Space (SMS) Database Managed Space

http://www.dumpsoon.com/E20-598.html