Db2 Databases Cheat Sheet
A Db2 database is a group of data treated collectively as a unit. A database is a large structured set of persistent data, and its purpose is to store, retrieve and manipulate related information.
Db2 databases have logical structures and physical structures which the DBMS manages separately. The physical storage of data can be managed without affecting the access to logical storage structures. Db2 databases are created using Data Definition Language, or DDL, commands and are composed of tablespaces, tables with rows and columns, views, indexes, stored procedures and other supporting structures.
A database administrator (DBA) uses Db2, which is DBMS or database server, to create and use Db2 databases. Once created, a DBA or developer can use a Db2 database and its underlying structures to create, read, update and delete data to support an organization's business requirements.
The Db2 DBMS operates as the server to manage data in databases across a multiuser environment, enabling many concurrent users to access the same data simultaneously. The Db2 DBMS also prevents unauthorized access, provides utilities for backing up and recovering data and offers performance tools and data management capabilities.
In this blogpost you will see and learn Db2 Databases related syntaxes and methods which help you using Db2 database product.
Creating non-restrictive database
db2 create database <database name>
Creating restrictive database
db2 create database <db_name> restrictive
Creating database with different user defined location
db2 create database '<db_name>' on '<data location>' dbpath on '<db_path_location>'
Viewing local or system database directory files
db2 list database directory
Activating database
db2 activate db <db_name>
Deactivating database
db2 deactivate db <db_name>
Connecting to database
db2 connect to <database name>
Verifying if database is restrictive
db2 get db cfg for <db_name> | grep -i restrict
Configuring the database manager and the database
Database Manager Configuration Parameters
Get the information of Instance Database manager
db2 get database manager configuration
Update instance database manager
db2 update database manager configuration
Reset previous configurations
db2 reset database manager configuration
Database Configuration Parameters
Get the information of Database
db2 get database configuration
Update the database configuration
db2 update database configuration
Reset the previously configured values in database configuration
db2 reset database configuration
Dropping Database
db2 drop database <db_name>
That's all in this post. If you liked this blog and interested in knowing more about IBM Db2. Please Like, Follow, Share & Subscribe to www.ImJhaChandan.com
Comments