O'Reilly logo

Oracle SQL*Plus Pocket Reference by Jonathan Gennick

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Interacting with SQL*Plus

This section covers essential information that you need to know in order to interact with SQL*Plus. Here you will learn how to start SQL*Plus, enter commands, delimit strings, and name variables.

Starting SQL*Plus

SQL*Plus is almost always invoked by issuing the sqlplus command from your operating system command prompt. On Microsoft Windows systems, you also have the option of selecting an icon from the Start menu. Early releases of SQL*Plus on Windows used executable names such as PLUS33 and PLUS80W depending on the specific release number and on whether the DOS version or the Windows version was to be invoked.

Syntax for the sqlplus command

The syntax used to invoke SQL*Plus looks like this:

sqlplus [[-S[ILENT]] [-R[ESTRICT] level]
   [-M[ARKUP] markup_options]
   [username[/password][@connect]|/|/NOLOG]
   [@scriptfile [arg1 arg2 arg3...]]] | - | -?

The -RESTRICT and -MARKUP parameters are new in release 8.1.6. The descriptions of the parameters follow:

-S[ILENT]

Tells SQL*Plus to run in silent mode. No startup messages will be displayed; no command prompt will be displayed; no commands will be echoed to the screen.

-R[ESTRICT] level

Restricts what the user can do from SQL*Plus. The level must be one of the following:

1

Disables the EDIT, HOST, and ! commands.

2

Disables the EDIT, HOST, !, SAVE, SPOOL, and STORE commands.

3

Disables the EDIT, GET, HOST, !, SAVE, START, @, @@, SPOOL, and STORE commands.

Level 3 also disables the reading of the login.sql file. The glogin.sql file ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required