Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
31
Добавлен:
16.04.2013
Размер:
2.15 Mб
Скачать

4

Using iSQL*Plus

This chapter explains how to run and use iSQL*Plus.

Specific topics discussed are:

Running iSQL*Plus

Entering Statements

Loading Scripts

Entering Substitution Variables

Creating Dynamic Reports

Using SET and COLUMN Commands

Getting Help

Exiting iSQL*Plus

Using iSQL*Plus 4-1

Running iSQL*Plus

Running iSQL*Plus

The Oracle HTTP Server and the iSQL*Plus Server must be running on the middle tier before you can run iSQL*Plus.

To run iSQL*Plus

1.Enter the Uniform Resource Identifier (URI) of iSQL*Plus in the Location field of your web browser, for example:

http://host.domain/isqlplus

where host.domain is the URI for the Oracle HTTP Server you want to use. The iSQL*Plus Log In screen is displayed.

Each successful login is uniquely identified, so you can have multiple iSQL*Plus sessions running from the same machine, or from multiple client machines.

2.Enter your Username, Password and Connection Identifier.

3.Select the Privilege level you want to use to connect to Oracle9i.

4.Click the Log In button. The iSQL*Plus Work screen is displayed.

When you connect with AS SYSDBA or AS SYSOPER privileges, the URI changes from the form

http://host.domain/isqlplus

to the form

http://host.domain/isqlplusdba

When you are connected through the isqlplusdba URI, the Oracle HTTP Server authentication permits AS SYSDBA or AS SYSOPER connections through the Log In screen, or through a CONNECT command, but the Oracle9i username and password authentication may still prevent access.

Entering Statements

You enter multiple SQL statements, PL/SQL blocks, and SQL*Plus commands in the input area. You can use backspace and delete keys, and you can cut and paste using your browser’s edit keys to edit the statements in the input area. You can also cut or copy scripts or statements from other applications such as Notepad, and paste them directly into the input field.

4-2 iSQL*Plus User’s Guide and Reference

Loading Scripts

You can save scripts using the Save Script button. iSQL*Plus saves scripts to a text file. You can load scripts with the Load Script button. Saving and loading scripts may be useful when editing and testing scripts.

Click the Execute button to execute the contents of the input area. The results of your query are displayed below the input area. The last SQL statement or PL/SQL block entered is stored in a buffer in the iSQL*Plus Server. You can see this statement with the LIST command and you can re-execute it by entering a / in the empty input area, and clicking the Execute button.

iSQL*Plus executes a SQL or PL/SQL statement at the end of the input area, even if it is incomplete or does not have a final ";" or "/". If you intend to run iSQL*Plus scripts in the SQL*Plus command line, you should make sure you use a ";" or "/" to terminate your statements.

Remember that iSQL*Plus retains the state of your current SET variables and other options from one execution to the next. If you use the back button of your browser to find a script you previously entered in the input area, and re-execute it, you may get different results from those previously obtained, depending on the current option values.

Some SQL*Plus commands have no logical sense or are not applicable in iSQL*Plus. See Appendix C, "Unsupported SQL*Plus Commands" for a list of unsupported SQL*Plus commands.

Loading Scripts

Editing complex scripts in another text editor with more sophisticated tools for search and replace, and other text manipulation, may be an advantageous way to prepare original scripts or variants of existing scripts which can be subsequently loaded into iSQL*Plus for editing or execution.

You can load any SQL script into iSQL*Plus that you can access from your workstation. Make sure that scripts you load are valid SQL scripts for use with iSQL*Plus.

Some web browsers may require you to create a MIME type or application association for files with a .SQL extension in order to load them into iSQL*Plus. See "Adding MIME Types" in Chapter 2 for information on how to create a MIME or application association.

Using iSQL*Plus 4-3

Соседние файлы в папке Oracle 9.0.1