Quick Beginnings

Entering Commands Using the Command Center

This section describes how to enter commands using the Command Center. There are two versions of the Command Center. This section documents the Command Center that is accessable from the DB2 Control Center.
Note:If you do not have the Control Center installed, a Command Center with limited functionality is available through the IBM DB2 program group, or by entering the db2cctr command.

From the Command Center you can:

To start the Command Center, click on the Command Center icon in the Control Center.

The Command Center contains a large input area for entering commands. To run the commands you have entered, click on the Execute icon (the gears icon).

note

In the Command Center, you do not have to enter a command with the db2 prefix; instead you just enter the DB2 command. For example:
   list database directory

To enter operating system commands, precede the operating-system command with an exclamation mark (!). For example:

   !dir

If you want to enter multiple commands, you must end each command with the termination character, then press Enter to start the next command on a new line. The default termination character is a semicolon (;).

For example, you could connect to a database called SAMPLE and list all the system tables by entering the following command:

   connect to sample;
   list tables for system

After you have clicked on the Execute icon, the results are displayed.

To recall commands that you have entered during your session, select the Command history drop down box, and select a command.

To save commands, select Interactive --> Save Command As from the menu bar. For more information, click on the Help push button or press the F1 key.

Figure 00002674 not displayed.

You can use the Append to Script button and the Script page of the Command Center to store commonly used SQL statements or DB2 commands as scripts. For more information, click on the Help push button or press the F1 key.


[ Top of Page | Previous Page | Next Page ]