- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to create a DB2 Tablespace in storage group STG1 and bufferpool BP01?
A table space is a logical entity in DB2 architecture. It is basically a collection of data files. A tablespace contains tables, indexes, objects, etc. To create a new tablespace we have to issue the following command.
CREATE TABLESPACE TABSPA1 IN DBSET1 USING STOGROUP STG1 PRIQTY 50 SECQTY 50 BUFFERPOOL BP03
The CREATE AND TABLESPACE are the reserved words which are followed by the name of tablespace we want to create. In this case it is TABSPA1.
IN is a reserved word which is followed by the name of the database in which we want to create this tablespace. The database is DBSET1 in this case.
USING STOGROUP are the reserved words which are accompanied by the name of the storage group to be used for this tablespace.
The PRIQTY and SECQTY are reserved words which describe the storage space in KB for primary and secondary allocation respectively.
The BUFFERPOOL parameter is used to give the name of bufferpool which has to be used for this tablespace.