DB2 installation-Day 1

Source: Internet
Author: User
Tags db2 client db2 connect db2 connect to db2 installation ibm db2


DB2 installation-on the first day, I personally installed IBM DB2 and installed it with my own database, but I found a lot of problems when creating a remote connection. I don't know how to proceed, I tried a lot of searching on the Internet, but I didn't make it clear on the Internet. I finally got it done. In fact, the procedure is very simple: the DB2 client remote connection method described below can run smoothly in windows or linux environments. This method is for your reference and may be helpful to you, the remote connection of the DB2 client is assumed as follows: the client is windowsnux/unix, the client has installed db2 or the client server is windowsnux/unix Client ip Address: 192.168.42.147, and the server ip address is 192.168.42.102. steps: run the Db2 catalog tcpip node test remote 192.168.42.102 server 50000 command in the command line of the client on the server database node created on the client at www.2cto.com. Note: test Is the node defined on the client and its name can be any
192.168.42.102 is the Client ip 50000 is the port used by DB2 to find the port used by DB2 on the server. If the server is linux, you can access the/etcrvices file. If your instance is named db2inst1, find the following line db2inst1 50000/tcp. If the server is windows, view X: \ WINNT \ System32 \ drivers \ etc \ services: bind the node to the database of the client and execute the following command db2 catalog db coshine at node test. Note: coshine is the name of the database you want to connect to on the server. Test is a defined node in step 1 that takes effect for the binding www.2cto.com and runs db2 terminate.
Set the client db2codepage (code page setting), that is, the character encoding first queries db2codepage on the server side, run db2set-all DB2_EXTENDED_OPTIMIZATION = ON startup = on autostart = YES DB2_STRIPED_CONTAINERS = ON DB2_HASH_JOIN = Y DB2COMM = tcpip DB2CODEPAGE = 819 DB2_PARALLEL_IO = *. You can see that the DB2CODEPAGE ON, therefore, the client must also execute db2set db2codepage = 819 for the connection to execute db2 connect to coshine user user_name using password. Note: here is the key to my failure multiple times --> user_name is the database Username password is the Database password comment Db2codepage: db2 database encoding method db2codepage = 1386 (Simplified Chinese) db2country = 86 (China) Once a database is created, its code page cannot be changed, www.2cto.com db2set DB2CODEPAGE = 1386 only the code page environment can be changed, but the database code page cannot be changed. If the database code page cannot be connected, check whether the following information is correct and ensure that the server can be pinged to the server: db2start: Make sure that the client DB2COMM is set to tcpip. Check db2comm settings first: If db2set-all is not set, run db2set db2comm = tcpip to set SVCENAME to the port number or service name in/etcrvices? Run db2 get dbm cfg to check and find SVCENAME. If the current value is not the server port number or service name, run the following update settings: db2 update dbm cfg SVCENAME db2inst1 Note: db2inst1 is the service name, in the/etcrvices file, db2inst1 50000/the author of tcp wants to open

Related Article

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.