32 Classic Tips for using the DB2 database

Source: Internet
Author: User
Tags character set db2 db2 connect db2 connect to ibm db2 create database

In browsing the forum posts, found that many students suffer from not having some "tips", so have to put down the work to check the data, the results found out, just the idea of a meaningful and no. Now sort out some tips to help people in need. Let's start with the DB2.

1. View the Local node directory

Command Window ENTER: DB2 list node Directory

2. Cataloging a TCP/IP node

Command window: DB2 catalog TCPIP node remote server OSType

3. Cancel the node catalog

DB2 uncatalog Node

4. View the System database directory

DB2 List Database Directory

5. View the local database directory

DB2 List Database directory on < letter >

A database in the local database directory that is not available in the System database directory can be accessed by selecting < database > right-clicking in the control center and then entering the database name you want to add or clicking the Refresh button to select the database.

6. Catalogue Database

DB2 catalog database as at node

7. Cancel the database catalog

DB2 Uncatalog Database

8. Testing the connection of a remote database

DB2 Connect to user using

9. Any user can set the default mode for a particular database connection by setting the current schema-specific register, with the initial default value being the permission ID of the currently session user.

Set schema =

Can be used interactively by the user or in an application, and this statement has no effect if the bundle is bound with the dynamicrules bind option. This statement is not under transaction control.

10. Code page settings

Set up a character set when creating a database

Create DATABASE using CodeSet territory

Cases:

以下是引用片段:
create database dbtest using codeset IBM-437 territory US

You can also set the code page for the entire database, and in win2000/nt/xp, add the variable in My Computer--> properties--> Advanced--> environment variable db2codepage =, example: db2codepage = 437 or Db2codepage = 1386. Alternatively, in the IBM DB2 Command window, enter Db2set db2codepage=1386, which needs to be restarted after the DB2 is in effect.

DB2 low version data to high version migration

Import the lower version data backup using the Restore feature into the high version database, and then enter DB2 migrate databases in the command window.

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.