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