Oracle Server Manager User's Guide

Contents Index Home Previous Next

Executing Commands in the SQL Worksheet

Server Manager executes commands you have entered in the input pane of a SQL Worksheet.

Entering Commands in the Input Pane

You can enter SQL, PL/SQL, and Server Manager commands in the input pane of a SQL Worksheet. A command entered in the input pane can contain tabs or carriage returns.

All standard text editing capabilities are available in the input pane of a SQL Worksheet. You can edit text in the input pane using the mouse, keyboard functions, and the Edit menu. In addition, you can select text from the output pane and paste it into the input pane.

Executing Commands in the Input Pane

To execute the command you have entered in the input pane, click Execute. You can also execute the command by choosing Execute from the Worksheet menu.

When you execute a command, the command and its output appear in the output pane. However, if you set the parameter ECHO to off, only the output of the command is displayed. For information about setting Server Manager parameters, see the SET command in Appendix A, "Server Manager Command Reference."

The following figure illustrates executing a SQL statement in a worksheet.

Figure 9 - 3. Executing a Command in the SQL Worksheet

After you execute a command, the command remains in the input pane, but is selected, as shown in Figure 9 - 3. You can then type in the next command, and it replaces the previous command. You do not need to delete the previous command unless you are running Server Manager under Windows.

Executing Server Manager Commands

In a SQL Worksheet you can execute the Server Manager commands described in Appendix A, "Server Manager Command Reference." Some of these commands behave differently when executed in a SQL Worksheet than when executed in line mode. These commands are summarized below:

@ Displays the standard file selection dialog box when you issue the @ command without specifying a filename.
CONNECT Displays the Connect dialog box when you issue the CONNECT command without specifying complete connect information. For information about the Connect dialog box, see Chapter 1, "Overview of Server Manager."
HELP Displays the Help window.
SPOOL Displays the standard file selection dialog box for your platform when you issue the SPOOL command without specifying a filename.
RECOVER If recovery is needed, displays the Recover dialog box when you issue the RECOVER command without arguments. Otherwise, an error message is generated.
EXIT Closes the worksheet.
Note: The line mode command HOST is not available in the SQL Worksheet.

Additional Information: For information about the standard file selection dialog box for your system, see your operating system-specific documentation.

Connecting from a Worksheet

When you start a SQL Worksheet, you are automatically connected to the same database as the window from which you started the worksheet. You can change this connection by issuing the CONNECT command from the input pane of the worksheet. The title of the SQL Worksheet window also changes to reflect your new connection.

If you execute the CONNECT command from the input pane without any arguments, the Connect dialog box appears. You can use the Connect dialog box to specify a new connection for that worksheet. For a description of the Connect dialog box, see Chapter 1, "Overview of Server Manager." You can also specify the connection using arguments in the CONNECT command. For a description of the CONNECT command and its syntax, see Appendix A, "Server Manager Command Reference."

Note: The SQL Worksheet also contains the File pull-down menu, which is described[*]. When you choose Connect from the File menu, the Connect dialog box also appears. However, when you choose Connect from the File menu, you are not changing your worksheet connection. In this case, the connection you are specifying is for a new Administration window.

Performing Recovery from the SQL Worksheet

When you issue the RECOVER command from a SQL Worksheet, the Recovery dialog box appears, if recovery is needed. The following figure illustrates the Recovery dialog box.

Figure 9 - 4. Recovery Dialog Box

From the Recovery dialog box, you can apply the next log file, apply all the log files, or cancel recovery. You can specify the name of the log file to apply or apply the default. For more information about the Recovery dialog box, see Chapter 6, "Backing Up and Recovering the Database."


Contents Index Home Previous Next