Document 15033192

advertisement

Matakuliah

Tahun : 2009

: T0413

Client Connectivity

Pertemuan 5

Bina Nusantara University

Directories

• System database directory

• list db directory

• Local database directory

• list db directory on <drive/path>

• Node directory

• list node directory

• DCS directory

• list dcs directory

3

I) Setup required at the server

 From the Configuration Assistant (CA) a) DB2COMM

Choose Configure

DB2 Registry b) SVCENAME

Choose Configure

DBM configuration

Or

Find “Communications” section.

 From the Control Center a) DB2COMM

Right click on instance and choose “Set up communications...” b) SVCENAME

Right click on instance and choose “Configure parameters...”

Find “Communications” section.

Bina Nusantara University myhost.ibm.com

Instance “DB2” mydb1

DB2COMM=TCPIP

Port = 50000

User defined in O/S:

User ID = myuser

Password = mypsw

4

Or

 Manually using commands: a) SVCENAME (service name) in DBM CFG update dbm cfg using svcename <port # or service name>

If you use a service name, ensure to update these files:

Linux: /etc/services

Windows: c:\winnt\system32\drivers\etc\services

Example: db2cdb2inst1 50000/tcp b) DB2COMM in the DB2 Registry db2set DB2COMM=TCPIP

Bina Nusantara University 5

Launching Configuration Assistant (CA)

Start > Programs > IBM DB2 > Set-up Tools > Configuration Assistant

Bina Nusantara University 6

Configuration Assistant

Cataloged databases

Bina Nusantara University 7

Verifying the DB2COMM Registry Variable

Bina Nusantara University

Configuration Assistant > Configure menu > DB2 Registry

8

DB2COMM Registry Variable

• Note: Changing this parameter requires an

Instance re-start

Bina Nusantara University 9

II) Setup required at the client

Client

Application connect to mydb1 user myuser using mypsw db directory mydb1 node directory mynode

Two commands to run at the client:

1) catalog tcpip node mynode remote myhost.ibm.com

server 50000

2) catalog database mydb1 at node mynode

Bina Nusantara University 10

Putting both setups together: At the client and server

Client db directory node directory myhost.ibm.com

Instance “DB2”

Application connect to mydb1 user myuser using mypsw mydb1 mynode network mydb1

Two commands to run at the client:

1) catalog tcpip node mynode remote myhost.ibm.com

server 50000

2) catalog database mydb1 at node mynode

Bina Nusantara University

DB2COMM=TCPIP

Port = 50000

User defined in O/S:

User ID = myuser

Password = mypsw

11

Setup required at the client

Two commands to run at the client:

1) catalog tcpip node mynode remote myhost.ibm.com

server 50000

2) catalog database mydb1 at node mynode

OR

 The Configuration Assistant

- Right click on white space

Choose “Add database using wizard...”

Bina Nusantara University

 Control Center

- From the “All databases” folder, right click and choose

“Add”

12

Launching the Add Database Wizard from the CA

Configuration Assistant > Selected menu > Add Database Using Wizard

Bina Nusantara University 13

Bina Nusantara University

Add Database Wizard

14

Caution!

• The Configuration Assistant will allow you to catalog databases with invalid hostnames, port numbers, etc.

• Everything might look correct; however, when you try to connect to the database, you will receive a connection error!

• Also ensure the user ID and password you provide to connect to the remote database is correct

– By default the authentication takes place on the DB2 server you are trying to connect to, therefore, you must provide a user ID and password defined on that server

Bina Nusantara University 15

Search and Known methods (Discovery Mode)

Search the network for any server

Enter server name and choose protocol

Bina Nusantara University 16

Discovery by DB2 Clients

• Search and locate DB2 servers on the network

• Requires the DAS to be running on the DB2 server in order to discover databases

• Can prevent or "hide" a server / database from being discovered by setting the appropriate DAS,

Instance, and Database level configuration parameters

Bina Nusantara University 17

Client and Server Profiles

• If you are configuring a large number of servers or clients, rather than set up each one individually, you can fully set up one, export a profile (i.e. configuration file) from it, then apply the profile to the other clients/servers

• This saves an administrator a lot of time when setting up the environment

Bina Nusantara University 18

Download