How can we create a database in DB2? This is a problem that many new users who are familiar with DB2 databases often mention. The following describes how to create a database in DB2.
Create a database in DB2:
When a database is created, the following tasks are performed:
● Set all system cataloguing tables required by the database
● Allocate space for database recovery logs
● Create a database configuration file and a default value set
● Bind the database utility to the database
To create a database, run the following command: create database
You can specify the following information:
● Storage path
● Database partition number used for cataloguing and partitioning
● The drive or path used to create a database
● Code set and country
● Sorting Sequence
● Default disk size
● Whether the database should be configured automatically
● Table space definitions for CATALOG, TEMPORARY, and USERSPACE1 tablespaces
The create database Command creates three default tablespaces:
SYSCATSPACE: used for system cataloguing tables. SYSCATSPACE cannot be deleted.
TEMPSPACE1: temporary table created by the system. When another temporary tablespace is created, you can delete the TEMPSPACE1 tablespace.
USERSPACE1: the default tablespace used to create objects. When another user creates a tablespace, The USERSPACE1 tablespace can be deleted.
DB2 database authorization
DB2 Authentication Overview
Create a table in DB2 -- a table with an auto-incrementing Column
DB2 rename a table and view table information
DB2 database commands