Book Image

IBM DB2 9.7 Advanced Administration Cookbook

Book Image

IBM DB2 9.7 Advanced Administration Cookbook

Overview of this book

IBM DB2 LUW is a leading relational database system developed by IBM. DB2 LUW database software offers industry leading performance, scale, and reliability on your choice of platform on various Linux distributions, leading Unix Systems like AIX, HP-UX and Solaris and MS Windows platforms. With lots of new features, DB2 9.7 delivers one the best relational database systems in the market. IBM DB2 9.7 Advanced Administration Cookbook covers all the latest features with instance creation, setup, and administration of multi-partitioned database. This practical cookbook provides step-by-step instructions to build and configure powerful databases, with scalability, safety and reliability features, using industry standard best practices. This book will walk you through all the important aspects of administration. You will learn to set up production capable environments with multi-partitioned databases and make the best use of hardware resources for maximum performance. With this guide you can master the different ways to implement strong databases with a High Availability architecture.
Table of Contents (21 chapters)
IBM DB2 9.7 Advanced Administration Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Creating and configuring a client instance


Usually, this special type of instance is used for cataloging nodes and databases to which you want to connect using this client. Compared to server instances there are some limitations, as it cannot be started or stopped, and you cannot create databases under it. Mainly, it is used by the DB2 Client and DB2 Connect products.

Getting ready…

On nodedb22 we will create the instance owner db2clnt1 and fenced user named db2fenc1. For creating a client instance, we'll use the –s option of the db2icrt command.

How to do it…

  1. Install DB2 Client in the /opt/ibm/db2/V9.7_clnt location on nodedb22, without creating an instance; to do this during installation, check at step 6—Instance setupDefer this task until after installation is complete.

  2. Next, create users on nodedb22db2clnt1 as the client instance owner and db2fenc1 as fenced user—and set passwords identical to the usernames:

    	[root@nodedb22 ~]# useradd -g db2iadm1 db2clnt1
    	[root@nodedb22 ~]# useradd -g db2fadm1 db2fenc1
    	[root@nodedb22 ~]# passwd db2clnt1
    	Changing password for user db2clnt1.
    	New UNIX password:
    	Retype new UNIX password:
    	passwd: all authentication tokens updated successfully.
    	[root@nodedb22 ~]# passwd db2fenc1
    	Changing password for user db2fenc1.
    	New UNIX password:
    	Retype new UNIX password:
    	passwd: all authentication tokens updated successfully.
    	[root@nodedb22 ~]#
    
  3. As user root, create the client instance db2clnt1:

    [root@nodedb22 ~]# /opt/ibm/db2/V9.7/instance/db2icrt -s client -u db2fenc1 db2iclnt1
    DBI1070I  Program db2icrt completed successfully.
    [root@nodedb22 ~]#
    

How it works...

Mainly you need to setup a client instance when you have plans to administer DB2 servers remotely with tools that are using non-Java based connections such as Control Center or Toad for DB2. The same scenario is applicable when you are using CLI for remote administration or command execution and also in this category are non-java based application clients.

There's more...

In the previous section we used the term non-java clients. However, this not totally exact for older type JDBC or JDBC-ODBC bridge connections using type 1 and 2 drivers. Type 3 and 4 JDBC drivers have implemented internally the entire network communication stack; this is the main reason for their independence from client instances and external network libraries. A good example for a tool that is relying only on JDBC type connections is the new Optim Database Administrator recommended by IBM to be used in future for database administration.

See also

The Communication with DRDA servers (z/OS and i/OS) recipe in Chapter 11, Connectivity and Networking