Contents Index Printing SQL statements Logging commands

ASA Getting Started
  Using Interactive SQL
    Working with SQL statements in Interactive SQL

Recalling commands


When you execute a command, Interactive SQL automatically saves it in a history list that persists between Interactive SQL sessions. Interactive SQL maintains a record of up to 50 of the most recent commands.

You can view the entire list of commands in the Command History dialog. To access the Command History dialog, press Ctrl+H, or click the book icon in the toolbar.

The Interactive SQL command history dialog.

The most recent commands appear at the bottom of the list. To recall a command, select it and click OK. It will appear in the SQL Statements pane of Interactive SQL.

You can also recall commands without the Command History dialog. Use the arrows in the toolbar to scroll back and forward through your commands, or press Alt+Right Arrow and Alt+Left Arrow.

Note 
If you execute a SQL statement that contains password information (GRANT CONNECT, GRANT REMOTE DBA, CONNECT, or CREATE EXTERNLOGIN), the password information appears in the Command History dialog for the duration of the current Interactive SQL session.

When the command history is viewed in subsequent Interactive SQL sessions, passwords are replaced with ... in any of these statements that contain password information. For example, if you execute the following statement in Interactive SQL:

GRANT CONNECT TO testuser
 IDENTIFIED BY testpassword

the following appears in the Command History dialog in subsequent Interactive SQL sessions:

GRANT CONNECT TO testuser
 IDENTIFIED BY ...

When Interactive SQL saves the command history between sessions, it removes password information from the statements listed above.

Copying commands in the Command History dialog 

You can copy a command to the clipboard, by selecting it in the Command History dialog and then pressing Ctrl+C or clicking the Copy button when the dialog has the focus. If you want to copy selected commands to the SQL Statements pane, click OK. When you copy multiple commands, they are separated by the command delimiter (a semicolon by default).

Removing commands from the Command History dialog 

The contents of the Command History dialog persist between Interactive SQL sessions. You can remove commands from the dialog in one of two ways:

You can also save commands in text files so that you can use them in a subsequent Interactive SQL session.

To save the command history to a file

  1. Open the Command History dialog.

  2. Click the Save button or press Ctrl+S.

  3. In the Save As dialog, specify a location and name for the file.

    The command history file has a .SQL extension.

  4. Click Save when finished.


Contents Index Printing SQL statements Logging commands