The 32 tips used by the DB2 database are very practical (1)

Source: Internet
Author: User
Tags ibm db2

This article mainly tells you about the 32 tips used by the DB2 database. When I read the Forum posts, I find that many of you have no "Tips" at hand ", so I had to put down my hands to check the information, and I found the result. I just lost my mind.

Now we have sorted out some tips to help those who need help. Let's start with DB2.

1. view the local node directory

In the command window, enter db2 list node directory.

2. cataloguing a TCP/IP Node

Command window:

 
 
  1. db2 catalog tcpip node remote server ostype 

3. Cancel node Cataloguing

 
 
  1. db2 uncatalog node 

4. view the system database directory

 
 
  1. db2 list database directory 

5. view the local database directory

Db2 list database directory on <drive letter>

If the database is in the local database directory but not in the system database directory, you can right-click <database> in the control center and choose add, enter the name of the database to be added or click the refresh button to select a database. After joining the database, you can access the database.

6. cataloguing Database

 
 
  1. db2 catalog database as at node 

7. Cancel database Cataloguing

 
 
  1. db2 uncatalog database 

8. Test the remote database connection.

 
 
  1. db2 connect to user using 

9. Any user can set the default mode for a specific database connection by setting the Current Schema special register. The initial default value is the permission ID of the Current session user.

 
 
  1. set schema = 

This statement can be used interactively or in applications. If the Dynamicrules Bind option is used to Bind a package, this statement does not work. This statement is not under transaction control.

10. code page settings

Set character sets when creating databases

 
 
  1. create database using codeset territory 

Example:

The following is a reference clip:

 
 
  1. create database dbtest using codeset IBM-437 territory US 

You can also set the code page of the entire database. In win2000/NT/xp, add the variable DB2CODEPAGE = to my computer --> properties --> advanced --> environment variable, for example: DB2CODEPAGE = 437 or DB2CODEPAGE = 1386. Alternatively, enter db2set DB2CODEPAGE = 1386 in the IBM DB2 command window. After the settings, restart the DB2 database to take effect.


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.