SQL*Plus User's Guide for Windows Platforms Go to Product Documentation Library
Library
Go to books for this product
Product
Go to Contents for this book
Contents
Go to Index
Index



Go to previous file in sequence Go to next file in sequence

Using SQL*Plus



Using Command Line Interface

SQL*Plus for Windows NT and SQL*Plus for Windows 95 provides command line functionality. However, SQL*Plus for Windows 3.1 does not provide a command line interface.

If you are using a remote Oracle database connection, initialize and load the drivers and executables to establish a network connection before starting SQL*Plus. Use the following steps to start SQL*Plus command line:

  1. Open an MS-DOS Prompt session.

  2. At the command line prompt, enter:

PLUS33 username/password[@connectstring]


For Windows NT/95, the rules for interpreting arguments are:

Command Line Interface Special Keys

Several keys on your keyboard have special meaning in SQL*Plus:

SQL*Plus Key Names Keyboard Key Names Function
[Return]

Enter

End a line of input.

[Backspace]

Backspace

Move a cursor left one character to correct an error.

[Pause]

Pause

Suspend program operation and display output.

[Resume]

Any key

Resume program operation and output

[Cancel]

CNTRL+Break

Halt program operation; return to the SQL*Plus command prompt.

[Interrupt]

None

Exit SQL*Plus and return to the host operating system.

Using Graphical User Interface

SQL*Plus for Windows NT, SQL*Plus for Windows 95, and SQL*Plus for Windows 3.1 provide a graphical user interface.

If you are using a remote Oracle database connection, initialize and load the drivers and executables to establish a network connection before starting SQL*Plus. Use the following steps to start SQL*Plus graphical interface:

  1. Open the Oracle program group, or choose the Oracle program group from the Windows NT/95/3.1 taskbar.

  2. Double-click (or select in Windows 95) the SQL*Plus icon from the program group and the SQL*Plus Logon dialog box appears.

  3. Enter your userid and password. If connecting to a remote Oracle database, enter the SQL*Net connect string

You can also start SQL*Plus graphical interface from the MS-DOS prompt session by using the following steps:

  1. Open a MS-DOS prompt session.

  2. At the command line prompt, enter:
    c:\> PLUS33W username/password[@connectstring]

For Windows NT/95/3.1, the rules for interpreting arguments are:

Using the SQL*Plus Windows

After you install and start, SQL*Plus displays the SQL prompt in the SQL*Plus window. The SQL*Plus window contains basic Microsoft Windows elements, such as dialog boxes, pull-down menus, scroll bars, and minimize and maximize buttons.

Below is the Oracle SQL*Plus window:

To enter SQL*Plus and SQL commands, type them in the SQL*Plus interface window at the SQL prompt, then press Enter.

For more information about the operation of these elements, refer to your Microsoft Windows NT/95/3.1 documentation.

Commands Using Both Mouse Buttons to Copy SQL

In addition to the functionality provided by the Microsoft Windows NT/95/3.1 elements, SQL*Plus allows you to use the mouse buttons to copy previously entered SQL commands to the current SQL prompt. To quickly copy a command, highlight it and hold down the left mouse button. While holding down the left button, click the right button. SQL*Plus copies the text.

Using the Command Keys

SQL*Plus assigns the traditional functions to most of the command keys. However, the following command keys have special functions in SQL*Plus for Windows NT/95/3.1:

Key Function
HOME

Top of screen buffer

END

Bottom of screen buffer

CTRL+HOME

Right side of screen buffer

CTRL+END

Left side of screen buffer

PAGE UP

Previous screen page

PAGE DOWN

Next screen page

CTRL+PAGE UP

Show page on left of current screen page

CTRL+PAGE DOWN

Show page on right of current screen page

F3

Find

ALT+F3

Find next

CTRL+C

Copy text

CTRL+V

Paste text

SHIFT+DEL

Clear the screen buffer

SQL*Plus Menus

File Menu

The File menu consists of the following:

Menu Item Function
Open

The Open option retrieves a previously stored command file. By default, SQL*Plus for Windows NT/95/3.1 assigns the .SQL extension to command files. You can specify a different extension in the File Name text box.

Save

The Save menu item includes three options for saving: Save Create, Save Replace, and Save Append.

Save Create saves the contents of the SQL*Plus buffer in a command file. By default, SQL*Plus for Windows NT/95/3.1 assigns the .SQL extension to command files. You can specify a different extension in the File Name text box.

Save Replace replaces the contents of an existing file with the contents of the SQL*Plus buffer. If the file does not exist, Save Replace creates the file.

Save Append adds the contents of the SQL*Plus buffer to the file that you specify.

After you save a command file, you can do the following:

Edit Menu

The Edit menu consists of the following:

Menu Item Function
Copy

The Copy option copies selected text to the Windows NT/95/3.1 clipboard.
After you copy text to the clipboard, you can paste the copied text into other Windows NT/95/3.1 applications, such as Microsoft Excel and Microsoft Word.

CTRL+C is the keyboard shortcut for the Copy menu item.

Paste

The Paste option pastes the contents of the Windows NT/95/3.1 clipboard onto the SQL*Plus command line.
CTRL+V is the keyboard shortcut for the Paste menu item.
Note: A maximum of 3625 characters can be pasted from the Windows NT/95 clipboard onto the SQL*Plus command line during a single paste operation.

Clear

The Clear option clears the Windows NT/95/3.1 screen buffer and the screen. The CLEAR SCREEN clause is the command line equivalent of the Clear menu item.
SHIFT+DEL is the keyboard shortcut for the Clear menu item.

Editor

The Editor menu item consists of two options: Invoke Editor and Define Editor.

Invoke Editor loads the contents of the buffer into a Notepad window. By default, Notepad saves the file to AFIEDT.BUF. You can specify a different filename by using the Save As option in the Notepad file menu. You can also specify another editor by using the Define Editor option (EDIT is the command line equivalent of Invoke Editor option.).

Define Editor defines the editor that is invoked when you select the Invoke Editor option.

Note: See Edit in SQL*Plus User's Guide and Reference for more information.

Search Menu

The Search menu consists of the following:

Menu Item Function
Find

The Find option looks for a character, word, or a group of characters or words in the SQL*Plus application window. When you choose the Find option from the Search menu (you can also press ALT+F3 for Find), SQL*Plus starts the search from the top of the displayed screen. Note that when SQL*Plus reaches the end of the SQL*Plus session display, SQL*Plus will not automatically continue searching from the top of the SQL*Plus session display.

Find Next

The Find Next option (you can also press F3 for Find Next) finds the next occurrence of the search text.

To find text:

  1. Display the screen where you want to start the search, using the Home, End, Page Up, and Page Down keys.

  2. Select Find and enter the text you want to find.

  3. Select the Case Sensitive check box if you want to match capitalization exactly.

Option Menu

Menu Item Function
Environment

The Environment dialog box contains three areas: Set Options, Screen Buffer and Non-Blocking support.

Set Options area provides a list of variables you can choose to establish aspects of the SQL*Plus environment for your current session, such as the following:

SQL*Plus allows you to make multiple changes to Options before clicking the OK button to commit the changes.

To establish an aspect of the SQL*Plus environment:

  1. In the Environment dialog box, select a variable from the list box.

  2. Depending on the variable you selected, SQL*Plus activates the Switch region and the Value region. The switch region toggles a variable on or off. The value region sets the variable to the default value or the value you specify. Click the switch buttons and enter the values for each variable you select, then click OK.

Note: SET command and variables are the command line equivalents of the options available from the Environment menu items.

Menu Item Function
Environment
(continued)

Screen Buffer

When you change the Screen Buffer option, SQL*Plus displays a warning dialog box to alert you that if you shorten the size of your screen buffer, some data may not be displayed on your screen. Click OK if you want to proceed.

The Screen Buffer dialog box consists of two text boxes: Buffer Width and Buffer Length.

Buffer Width

Sets the number of characters SQL*Plus displays on one line. If you enter a number smaller than the length of output data, SQL*Plus truncates the data to match the buffer width you specified. The default value of the Buffer Width parameter is 80 characters. You can specify from 80 to 1,000 characters on one line.

Buffer Length

Sets the number of lines SQL*Plus displays on the screen. If SQL*Plus displays more lines of data than you specify, the remaining lines of data will "wrap around" to the top of the screen buffer. The default value of the Buffer parameter is 100 lines. You can specify from 100 to 2,000 lines on

Non-Blocking

SQL*Plus provides non-blocking functionality while executing queries/commands. This functionality is present during sessions in which the database connection uses SQL*Net 2.1.4 or higher to an Oracle Server Release 7.1, 7.2, or 7.3 database. When the non-blocking functionality is enabled, it allows you to cancel long running SQL queries and DDL commands at any point during the query/command. This function can be enabled/disabled from the Options menu.

Help Menu

All SQL*Plus documents are included in the Oracle Documentation. To view the SQL*Plus documents, you must install the Oracle Documentation.

Menu Item Function
About SQL*Plus

It contains the version and the copyright information for SQL*Plus.

Using SQLPLUS.EXE for Windows NT/95

SQLPLUS.EXE is used to spawn any SQL*Plus executable that is defined in the PLUS_DFLT parameter (that is one of the Oracle parameters) located in the Windows NT/95 registry. SQLPLUS.EXE allows you to run any specified version and mode of SQL*Plus when it is started. You can modify the value in the PLUS_DFLT key thereby having SQLPLUS.EXE spawn the desired version and mode of SQL*Plus. By default, PLUS_DFLT is set to PLUS33, which is the command line interface of SQL*Plus.



Go to previous file in sequence Go to next file in sequence
Prev Next
Oracle
Copyright © 1996 Oracle Corporation.
All Rights Reserved.
Go to Product Documentation Library
Library
Go to books for this product
Product
Go to Contents for this book
Contents
Go to Index
Index