Running a command from Scratchpad
To run a command
- Enter the command or commands into Scratchpad. The source can be either:
A command that you pasted or typed into Scratchpad and then edited
- A command that you generated from Db2 objects
- (Optional) To enable syntax highlighting, select Use syntax highlighting.
- (Optional) Enter an alternative SQLID in Current SQLID to set the SQL authorization for the command.
- Perform one of the following tasks:
- To run one command from a group displayed in Scratchpad, select the command and click Run Selected
.
To run all commands displayed in Scratchpad, click Run
.
- To run one command from a group displayed in Scratchpad, select the command and click Run Selected
Select the Db2 subsystem on which to run the command. Guidelines are as follows:
- By default, the last-executed Db2 connection is preselected.
- Use the menu arrow to select from your list of favorite connections.
The status bar at the bottom of the screen indicates whether the command runs successfully. The Output tab displays a summary for each command that you ran.
To view results, perform one of the following tasks:
- To view all results, click View All Result Sets
.
- To view the result set for a specific command, on the Output tab, click the relevant View result set.
- To view all results, click View All Result Sets
- Save the results as a text file on your local file system:
- Click the Output tab, then on the toolbar, click View output text
.
- Click Save output text
.
- Click the Output tab, then on the toolbar, click View output text
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*