Command Center Tool

The Command Center is an interactive tool that enables the user to execute DB2 commands and SQL statements; to execute MVS console commands; to work with command scripts; and to view a graphical representation of the access plan for explained SQL statements.

On the Interactive page, you can perform the following actions:

  • Execute an SQL statement or DB2 command line processor (CLP) command. You do not need to precede the command by DB2.

  • Run a command or statement by clicking the icon (at the left of the toolbar).

On the Script page, you can perform the following actions:

  • Execute commands in sequence.

  • Create and save a script. You can optionally store a saved script in the Task Center where you can schedule the script to run at a specific time.

  • Run an existing script.

  • Schedule a task.

NOTE

If you specify more than one statement on the Script page, an access plan is created only for the first statement.


On the Query Results page, you can see the results of the queries. You also can save the results or edit the contents of the table.

On the Access Plan page, you can see the access plan for any explainable statement that you specified on the Interactive page or the Script page. DB2 generates the access plan when it compiles the SQL statement. You can use this information to tune your queries for better performance.

NOTE

The Web version of the Command Center, “Web Command Center,” includes most of these features but it does not currently include Visual Explain or SQL Assist.


Accessing DB2 Servers Using the Command Center Tool

Using the DB2 UDB Command Center Tool, you can establish a connection to a DB2 server interactively or with an existing script. The query results can be seen in the Query Results page. In the Access Plan page, the access plan for any explainable statement that was specified on the Interactive page or the Script page can be seen.

Figure 2.8 shows a script that was written to establish a connection to the local database sample and query against the table employee.

connect to sample;
select * from employee;

Figure 2.8. DB2 Command Center.


Notice that every command must end with a semicolon.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.15.117.231