Client Connectivity Pertemuan 5 Matakuliah: T0413 Tahun: 2009
Bina Nusantara University 3 System database directory list db directory Local database directory list db directory on Node directory list node directory DCS directory list dcs directory Directories
Bina Nusantara University 4 From the Configuration Assistant (CA) a) DB2COMM Choose Configure DB2 Registry b) SVCENAME Choose Configure DBM configuration Find “Communications” section. Or 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. Instance “DB2” mydb1 myhost.ibm.com Port = User defined in O/S: User ID = myuser Password = mypsw DB2COMM=TCPIP I) Setup required at the server
Bina Nusantara University 5 Or Manually using commands: a)SVCENAME (service name) in DBM CFG update dbm cfg using svcename If you use a service name, ensure to update these files: – Linux: /etc/services – Windows: c:\winnt\system32\drivers\etc\services Example: db2cdb2inst150000/tcp b)DB2COMM in the DB2 Registry db2set DB2COMM=TCPIP
Bina Nusantara University 6 Start > Programs > IBM DB2 > Set-up Tools > Configuration Assistant Launching Configuration Assistant (CA)
Bina Nusantara University 7 Configuration Assistant Cataloged databases
Bina Nusantara University 8 Configuration Assistant > Configure menu > DB2 Registry Verifying the DB2COMM Registry Variable
Bina Nusantara University 9 DB2COMM Registry Variable Note: Changing this parameter requires an Instance re-start
Bina Nusantara University 10 II) Setup required at the client node directory mynode db directory mydb1 connect to mydb1 user myuser using mypsw Two commands to run at the client: 1) catalog tcpip node mynode remote myhost.ibm.com server ) catalog database mydb1 at node mynode Client Application
Bina Nusantara University 11 node directory mynode db directory mydb1 network connect to mydb1 user myuser using mypsw Instance “DB2” mydb1 myhost.ibm.com Two commands to run at the client: 1) catalog tcpip node mynode remote myhost.ibm.com server ) catalog database mydb1 at node mynode Putting both setups together: At the client and server Port = Client User defined in O/S: User ID = myuser Password = mypsw Application DB2COMM=TCPIP
Bina Nusantara University 12 Two commands to run at the client: 1) catalog tcpip node mynode remote myhost.ibm.com server ) catalog database mydb1 at node mynode Setup required at the client The Configuration Assistant - Right click on white space - Choose “Add database using wizard...” Control Center - From the “All databases” folder, right click and choose “Add” OR
Bina Nusantara University 13 Launching the Add Database Wizard from the CA Configuration Assistant > Selected menu > Add Database Using Wizard
Bina Nusantara University 14 Add Database Wizard
Bina Nusantara University 15 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 16 Search and Known methods (Discovery Mode) Search the network for any server Enter server name and choose protocol
Bina Nusantara University 17 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 DISCOVER=SEARCH DB2 Server DAS Level Instance Level Database Level DISCOVER_DB=DISABLE DISCOVER_DB=ENABLE DB2 Client Discovery Message DISCOVER_INST=DISABLE DISCOVER_INST=ENABLE DISCOVER=SEARCH DB2 Server DAS Level Instance Level Database Level DISCOVER_DB=DISABLE DISCOVER_DB=ENABLE DB2 Client Discovery Message DISCOVER_INST=DISABLE DISCOVER_INST=ENABLE
Bina Nusantara University 18 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