The client connects to the DB2 database on the Linux operating system

Source: Internet
Author: User
Tags db2 db2 installation ibm db2 number sign

This is primarily for clients connecting DB2 databases on Linux operating systems

1, DB2 installation, you can refer to the IBM Help documentation:

Http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/basic/help.jsp?topic=/com.ibm.db2.luw.qb.server.doc/doc/r0008865.html

(User: Root,db2inst1)

2. Windows Client Connection

· Dbvisualizer Connection

• Control Center Connection

2.1DbVisualizer Connection

1, the preparation of the driver, this tool is to take JDBC way to connect the database, so to prepare for the drive, DB2 connected to the database drive has 4 kinds, specific reference to the relevant website description; We need two drivers here: Db2jcc.jar and Db2jcc_license_cu.jar

2, create the connection information of the database

3, sometimes will be an error: here for "root capability required", mainly database users db2inst1 need to have root permissions. Here we use "Db2rfe"

Specific actions:

Locate the sample configuration file. Two sample profiles are provided: $HOME/sqllib/instance/db2rfe.cfg is a preconfigured $HOME with a default value of db2® instances of non-root users/sqllib/cfg/db2rfe.cfg.sample not configured
Where $HOME the home directory of the non-root user. Copy one of the sample profiles to a different location so that the initial files remain unchanged. Update the replicated configuration files as needed. This profile has been entered into the DB2RFE command (this time to modify two places, Red section).

====================================================================================

**

* * Sample configuration file for Db2rfe of IBM DB2

** -----------------------------------------------

**

* * To select features and settings to configure, uncomment the corresponding

* * Keywords and specify values for those keywords.

**

* * Comments are made by placing either a asterisk (*) or a number sign (#) at

* * The start of a line

**

** =========================================================================

Instancename=db2inst1

* * is required keyword.

** ----------------------------------------------------------------------------

* * Enable DB2 Advanced Copy Services (ACS).

** ----------------------------------------------------------------------------

* * Valid value is NO and YES. Change to YES If you are need to enable DB2 ACS.

Enable_db2_acs=no

** ----------------------------------------------------------------------------

* * Enable DB2 High Availability (HA) feature

** ----------------------------------------------------------------------------

* * Valid value is NO and YES. Change to YES If you are need to enable this feature.

Enable_ha=no

** ------------------------------------------------------------------------------

* * ENABLE DB2 authentication on the server using local operating system security.

** ------------------------------------------------------------------------------

* * Valid value is NO and YES. Change to YES If you are need to enable this feature.

Enable_os_authentication=yes

** --------------------------------------------

* * Reserve DB2 Remote Connection Service entry

** --------------------------------------------

* * Valid value is NO and YES. Change to YES If you are need to do the reservation.

* * If SVCENAME and/or svceport are defined and valid, the DB2 database Manager

* * Configuration'll be updated accordingly.

Reserve_remote_connection=yes

*svcename=db2c_db2inst1

* * CHAR (14)

*svceport=48000

* * Valid value:1024-65535

** --------------------------------------

* * Reserve DB2 Text Search service entry

** --------------------------------------

* * Valid value is NO and YES. Change to YES If you are need to do the reservation.

* * If Svcename_text_search and/or svceport_text_search are defined and valid,

* * The DB2 Text Search configuration'll be updated accordingly.

Reserve_text_search_connection=no

*svcename_text_search=db2j_db2inst1

* * CHAR (14)

*svceport_text_search=53000

* * Valid value:1024-65535

==================================================================================== is logged on as a user with root privileges. Browse to the $HOME/sqllib/instance directory where $HOME represents the home directory for non-root users. Use the following syntax to run the DB2RFE command:
Db2rfe-f config_file (use./db2rfe-f config_file)
Where Config_file is the configuration file created in the previous step.

2.2 Connection of the control center

You need to set the catalog, specific steps:

DB2 catalog TCPIP node Hljnode remote 192.168.100.54 server 50000

DB2 catalog DB Sample at Node Hljnode

• Refreshing the database

Description: Linux IP 192.168.100.54

Hljnode Custom section naming

Sample is a sample database

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.