Starts SQL*Plus from the operating system prompt.
Syntax
SQLPLUS [[-S[ILENT]] [logon] [start]]|-?
where:
logon | Requires the following syntax: |
username[/password] [@database_specification]|/|/NOLOG | |
start | Allows you to enter the name of a command file and arguments. SQL*Plus passes the arguments to the command file as though you executed the file using the SQL*Plus START command. The start clause requires the following syntax: |
@file_name[.ext][arg ...] | |
See the START command in this chapter for more information. | |
You have the option of entering logon. If you do not specify logon and do specify start, SQL*Plus assumes that the first line of the command file contains a valid logon. If neither start nor logon are specified, SQL*Plus prompts for logon information.
Refer to the following list for a description of each term or clause:
The SQL*Plus command may be known by a different name under some operating systems, for example, plus33. See your SQL*Plus installation documentation for further information on your specific operating system.
SQL*Plus supports a Site Profile, a SQL*Plus command file created by the database administrator. This file is generally named GLOGIN with an extension of SQL. SQL*Plus executes this command file whenever any user starts SQL*Plus and SQL*Plus establishes the Oracle connection. The Site Profile allows the DBA to set up SQL*Plus environment defaults for all users at a particular site; users cannot directly access the Site Profile. The default name and location of the Site Profile depend on your system. Site Profiles are described in more detail in the Oracle installation and user's manual(s) provided for your operating system.
SQL*Plus also supports a User Profile, executed after the Site Profile. SQL*Plus searches for a filenamed LOGIN with the extension SQL in your current directory. If SQL*Plus does not find the file there, SQL*Plus will search a system-dependent path to find the file. Some operating systems may not support this path search.
If you fail to log in successfully to SQL*Plus because your username or password is invalid or some other error, SQL*Plus will return an error status equivalent to an EXIT FAILURE command. See the EXIT command in this chapter for further information.
Examples
To start SQL*Plus with username SCOTT and password TIGER, enter
SQLPLUS SCOTT/TIGER
To start SQL*Plus, as above, and to make POLICY the default database (where POLICY is a valid SQL*Net database connection string), enter
SQLPLUS SCOTT/TIGER@POLICY
To start SQL*Plus with username SCOTT and password TIGER and run a command filenamed STARTUP with the extension SQL, enter
SQLPLUS SCOTT/TIGER @STARTUP
Note the space between TIGER and @STARTUP.