Creation of Database in DB2 LUW
In db2,an instance can contain several
databases.
When the database is created,by default 3 tablespaces will
created under that database.
3 tablespaces are
Catalog Tablespace
Temporary Tablespace
User tablespace
When an instance is created,no databases are created by
default.You need to explicitly create a database using "Create Database
command" or create the database using "Control Center".
Syntax to create Database:
Create database <dbname> Automatic Storage Yes/No on
<path> dbpath on <path>
To Display the list of Databases in an instance,you can run the below
command:
db2 list db directory (By default it will show all databases
in the system directory)
db2 list db directory on <path> (Local Directory)
Comments
Post a Comment