Command-Line Syntax

The syntax for invoking SQL*Plus from a command-line prompt is:

sqlplus [username[/password]][@hostname] [@script] [parm1] [parm2] ...
username

The Oracle username for the account to be connected.

password

The password for the username. If the password is omitted, SQL*Plus prompts for the password.

hostname

The hostname assigned to the database being connected to, as contained in the tnsnames.ora file or Oracle Names.

script

The name of a SQL script to be executed upon successful connection to the database.

parm1, parm2 ...

Optional parameters that are passed to SQL*Plus and may be used as substitution variables within a SQL*Plus script. String parameters containing spaces or special characters must be enclosed in single quotes.

Tip

The actual name of the SQL*Plus executable may vary from platform to platform and from release to release. For example, the executable name for SQL*Plus Version 3.3 for Windows 95 (command-line version) is PLUS33.EXE, and the GUI version is PLUS33W.EXE.

Get Oracle Database Administration: The Essential Refe now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.