Configuration of DB2 server and client nodes

Source: Internet
Author: User
Tags db2 driver ibm db2
Libstdc ++. so.5 is required on fc6, and slinux is set to allow

DB2 operation instructions
Common IBM DB2 operations
Install DB2
Db2_install
Create a db2ins1 user
Useradd db2ins1
Password db2ins1

Create instance-U is the name of the instance after the user name
Db2icrt-u db2ins1 db2ins1

Log On As A db2ins1 user
Start DB2
Db2start
Create a database. Note that the database name must not be 8 characters long.
DB2 create database mydb

Root add db2tcp 50000 to/etc/services
Specify the communication protocols used by DB2
Environment Variable db2comm = TCPIP
Set the port for the DB2 listener
DB2 update dBm CFG using svcename db2tcp
Restart DB2
Common commands in DB2 command line processor (CLP)

Install DB2 rtcl on the client

Create user and user instance

Run on the client
Add nodes to a customer
DB2 catalog TCPIP node CIBAS remote 168.4.0.219 server 50000
Add a database to a node
DB2 Catalog Database CIBAS (Database Name) as cib3 (alias) at node CIBAS (such as the same as the previous node)
Set the encoding format of the database
Db2set db2codepage = 1386 (GBK), 819 (UTF-8)
DB2 terminate --- command abort.
Add in odbcins. ini
[DB2]

Description     = DB2 Driver
Driver = /opt/ibm/db2/V9.1/lib32/libdb2.so
FileUsage = 1
DontDLClose = 1

In ODBC. ini

[sample]
Description = Test to DB2
Driver = DB2

Note that the DSN name must be the same as the database name

DB2 Personal Edition (Linux) Installation

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.