IBM Books

Quick Beginnings Personal Edition


Entering Commands Using the Command Center

This section describes how to enter commands using the Command Center. The Command Center provides an interactive window to:

Start the Command Center in one of the follows ways:

The Command Center contains a large input area in which you enter your commands. To run the commands you have entered, click on the Execution icon (the gears icon), or press CTRL+Enter.

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 then Enter key to start the next command on a new line. The default termination character is a semicolon (;). To specify a different termination character, click on the Tools Settings icon in the menu toolbar.

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 Execution icon (or pressed CTRL+Enter), the Command Center switches to the Results window which informs you how the commands are proceeding.

To recall commands that you have entered, select the Script Tab, click on the drop down box, and select a command.

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

Figure hint not displayed.

If you want to store commonly used SQL statements or DB2 commands as scripts, click on the Script Center icon from the main tool bar. For more information, click on the Help push button or press the F1 key.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]