Nine common DB2 commands

Source: Internet
Author: User
Tags db2 connect db2 connect to

The following describes nine common DB2 commands for your reference. Common DB2 commands are an important foundation for learning DB2 databases. If you are new to DB2 databases, take a look.

1. list database directory: LIST all instances
Db2 list database directory | pg

2. Connect to database
Db2 "connect to test04 user easymis using easymis"
Disconnect
Db2 connec reset

2. Stop db2
Db2 terminate
Db2stop force
Db2 stop database manager

3. Start db2
Db2start

4. connect to the db2 instance db2 connect to database alias user using Password

5. List db2 instance names: db2ilist

6. view the remote and local character set of db2
Db2-a connect to easyoa4

7. Set the current schema
Db2 set schema = easymis

8. Set character sets
Db2set db2codepage = 819 English, 1386 corresponds to GBK

9. db2-f wk. SQL executes an SQL statement

The preceding section describes common DB2 commands.
 

How to Create a tablespace in DB2 under aix

How to Create a tablespace in DB2 in windows

How to delete tables with large data volumes in DB2

DB2 index design guidelines

Visualize DB2 Spatial Data

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.