Chapter 6. Creating a new database on an IBM N series storage system 71
mount point named /mnt/db2logs, you would execute the following command on
the database server:
db2 "UPDATE DB CFG FOR MYDB USING NEWLOGPATH /mnt/db2logs"
Keep in mind that, in most cases, changes made to a database configuration file
do not take effect until the database has been restarted after terminating all the
database connections.
6.4 Database verification
You can verify If the database is created correctly and exists on the IBM N series
storage system by executing the following command on the database server:
db2 "LIST DB DIRECTORY"
If the database was created successfully, its name should appear in this list,
along with information about where the overhead files for this database are
stored.
6.5 Establishing a database connection
Assuming the database was created successfully, establish a connection to it by
issuing the following command:
db2 "CONNECT TO [DB_NAME]"
Where DB_NAME is the alias assigned to the database that was created (if no
alias was specified, the alias will be the same as the name assigned to the
database).
For example, you would execute the following command on the database server
to connect to the database named mydb:
db2 "CONNECT TO mydb"
6.6 List and verify tablespaces
List the tablespaces that were created with the database by executing the
following command on the database server:
db2 "LIST TABLESPACES"
72 Integrating IBM DB2 with the IBM System Storage N series
Verify that the tablespace container(s) associated with each tablespace refer to a
file or directory located on an IBM N series storage system volume by executing
the following command:
db2 "LIST TABLESPACE CONTAINER [TSPACE_ID] SHOW DETAIL"
Where TSPACE_ID is the unique identifier (0, 1, 2, and so on) that has been
assigned to the tablespace that has container information retrieved. If the
database was created correctly, the container information returned by this
command should identify the file or directory that was assigned to the tablespace
specified when the CREATE DATABASE command was executed.
For example, to verify the tablespace container for tablespace ID 2, you would
execute the following command on the database server:
db2 "LIST TABLESPACE CONTAINER 2 SHOW DETAIL"
Additional tablespaces can be created on IBM N series storage system volume
using the CREATE TABLESPACE command.

Get Integrating IBM DB2 with the IBM System Storage N series now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.