DB2 command line connection

Source: Internet
Author: User

I believe everyone knows about the DB2 command line. The following describes how to connect to the DB2 command line. If you are interested in the DB2 command line, take a look.

Type db2cmd in the command line to connect to the DB2 command line. It is not feasible to directly press db2, and an error will occur:

E: \> db2
DB21061E does not initialize the command line environment.

Then you can run the db2 command to access the database:

E: \> db2cmd

E: \> db2
(C) Copyright IBM Corporation 1993,2003
DB2 ADCL 9.0.0 command line Processor

You can issue Database Manager commands and SQL statements from a command prompt. For example:
Db2 => connect to sample
Db2 => bind sample. bnd

For general help, enter :?.
For Command help, enter :? Command, where command can be
The first few keywords of the Database Manager Command. For example:
? Catalog database is used to help with the catalog database Command
? CATALOG is used to help all CATALOG commands.

To exit the db2 interaction mode, enter
QUIT. In non-interactive mode, all commands must be prefixed with "db2.
To LIST the settings of the current command options, enter list command options.

For more help, see Online Reference Manual.

Db2 => connect to sample

Database connection information

Database Server = DB2/NT 9.0.0
SQL authorization id = GQGAI
Local Database alias = SAMPLE

Db2 =>
 
Unlike Oracle, Oracle can directly connect to the database through the command line and SQL * plus.
 

How to Create a DB2 tablespace in an aix Environment

How to Set garbled characters in the DB2 code page

Implementation of DB2 string connection

DB2 update statements for records in the same table

Use of the DB2 auto-incrementing field IDENTITY

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.