This article tells you about the first 10 of the 30 Basic DB2 operation commands. If you are interested in the first 10 of the 30 Basic DB2 operation commands, you can click the following article to view it, hoping to help you learn it.
This article describes the top 10 basic operation commands of DB2, including Database Import and Export, viewing stored procedures, version migration, and other common commands.
1. view the local node directory
In the command window, enter db2 list node directory.
DB2 basic operation instructions 2. cataloguing a TCP/IP Node
Command window: db2 catalog tcpip node remote server ostype
3. Cancel node Cataloguing
Db2 uncatalog node
4. view the system database directory
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.
DB2 basic operation instructions 6. cataloguing Database
Db2 catalog database as at node
7. Cancel database Cataloguing
Db2 uncatalog database
8. Test the remote database connection.
Db2 connect to user using
9. Any user can set the default mode for a specific database connection by setting the CurrentSchema special register. The initial default value is the permission ID of the current session user.
Set schema =
This statement can be used interactively or in applications. If you bind a package with the DynamicrulesBind option, this statement does not work. This statement is not under transaction control.
DB2 basic operation command 10. code page settings
Set character sets when creating databases
Create database using codeset territory
Example: 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 DB2 to take effect.