SQL*Plus Command Support
Last modified: October 30, 2023
dbForge Studio for Oracle supports some SQL*Plus commands in SQL code. Use these SQL*Plus commands just like usual SQL statements. These commands are supported in both full and short forms.
Command | Description | Supported |
---|---|---|
@, @@ | Runs the specified script. When debugging SQL scripts, you can step into scripts, called with @ or @@ commands. The Call Stack window will show stack of the documents. dbForge Studio for Oracle does not support running scripts from URLs. You should use filename or filename with a path. | Yes |
/ (slash)* | Executes the SQL command or PL/SQL block. Unlike SQL*Plus slash, it doesn’t execute the statements but is presented as a statements delimiter. | Yes |
ACCEPT | Stores the input value in a given substitution variable. When dbForge Studio for Oracle executes the ACCEPT command, it shows a dialog to enter a variable value. If you have specified a prompt, it will be displayed as the title of the dialog. Otherwise, default title Assign value to variable < variable name > (< datatype >) will be used. You can not use the NOPROMPT command option. | Yes |
APPEND | Adds specified text to the end of the current line in the buffer. | No |
ARCHIVE LOG | Starts or stops the automatic archiving of online redo log files, manually (explicitly) archives specified redo log files, or displays information about redo log files. | No |
ATTRIBUTE | Specifies display characteristics for a given attribute of an Object Type column, and lists the current display characteristics for a single attribute or all attributes. | No |
BREAK | Specifies where and how formatting will change in a report, or lists the current break definition. | No |
BTITLE | Places and formats a specified title at the bottom of each report page, or lists the current BTITLE definition. | No |
CHANGE | Changes text on the current line in the buffer. | No |
CLEAR | Clears the Output window. | Yes |
COLUMN | Specifies display characteristics for a given column, or lists the current display characteristics for a single column or for all columns. | No |
COMPUTE | Calculates and prints summary lines, using various standard computations, on subsets of selected rows, or lists all COMPUTE definitions. | No |
CONNECT | Connects a user to the Oracle server. If the connection with entered connection parameters already exists, the existing connection will be opened. Otherwise, a new connection is created. If you have not specified the password, the connection dialog will appear. The CONNECT command in the form CONNECT user/password@host:port/sid creates the Direct connection. | Yes |
COPY | Copies results from a query to a table in a local or remote database. | No |
DEFINE | Specifies a user or predefined variable and assigns a CHAR value to it, or lists the value of a single variable or all variables. If you use it to list variable value, it will be displayed in the Data Window. Variables, declared with DEFINE can not be viewed in the Watches window when debugging. | Yes |
DEL | Deletes one or more lines of the buffer. | No |
DESCRIBE | Lists the column definitions for the specified table, view or synonym, or the parameter specifications for the specified function or procedure. The result is displayed in the Data window. | Yes |
DISCONNECT | Commits pending changes to the database and logs the current user off Oracle, but does not exit SQL*Plus. | No |
EDIT | Invokes a host operating system text editor on the contents of the specified file or on the contents of the buffer. | |
EXECUTE | Executes a single PL/SQL statement. | Yes |
EXIT | Terminates SQL*Plus and returns control to the operating system. | Yes |
GET | Loads a host operating system file into the SQL buffer. | No |
HELP | Accesses the SQL*Plus help system. | No |
HOST | Executes a host operating system command without leaving SQL*Plus. | No |
INPUT | Adds one or more new lines after the current line in the buffer. | No |
LIST | Lists one or more lines of the SQL buffer. | No |
PASSWORD | Allows a password to be changed without echoing the password on an input device. | No |
PAUSE | Displays the specified text, then waits for the user to press Return. | No |
Displays the current value of a bind variable. | No | |
PROMPT | Displays the specified message in the General pane of the Output window. | Yes |
QUIT | Terminates SQL*Plus and returns control to the operating system. QUIT is identical to EXIT. | No |
RECOVER | Performs media recovery on one or more tablespaces, datafiles, or the entire database. | No |
REMARK | Begins a comment. | Yes |
REPFOOTER | Places and formats a specified report footer at the bottom of each report, or lists the current REPFOOTER definition. | No |
REPHEADER | Places and formats a specified report header at the top of each report, or lists the current REPHEADER definition. | No |
RUN | Lists and executes the SQL command or PL/SQL block currently stored in the SQL buffer. | No |
SAVE | Saves the contents of the SQL buffer in a host operating system file (a script). | No |
SET | Sets a system variable to alter the SQL*Plus environment for the current session. | No |
SHOW | Shows the value of a SQLPlus system variable or the current SQLPlus environment. | No |
SHUTDOWN | Shuts down a currently running Oracle instance. | No |
SPOOL | Stores query results in an operating system file and, optionally, sends the file to a printer. | No |
START | Executes the contents of the specified script. The script can only be called from a URL. | No |
STARTUP | Starts an Oracle instance and optionally mounts and opens a database. | No |
STORE | Saves attributes of the current SQL*Plus environment in a host operating system file (a script). | No |
TIMING | Records timing data for an elapsed period of time, lists the current timer’s title and timing data, or lists the number of active timers. | No |
TTITLE | Places and formats a specified title at the top of each report page, or lists the current TTITLE definition. | No |
UNDEFINE | Deletes one or more user variables that you defined either explicitly (with the DEFINE command) or implicitly (with an argument to the START command). | No |
VARIABLE | Declares a bind variable that can be referenced in PL/SQL or shows variable or all variables with their data types. The result is displayed in the Data window. Bind variables, declared with VARIABLE command, can be viewed in the Watches window when debugging. | Yes |
WHENEVER OSERROR | Performs the specified action Exits SQL*Plus if an operating system command generates an error. | No |
WHENEVER SQLERROR | Performs the specified action Exits SQL*Plus if a SQL command or PL/SQL block generates an error. | No |
If you try to execute script, containing unsupported SQL*Plus commands, warning messages will appear in the Error List and these commands will be ignored.
Was this page helpful?
Want to find out more?
Overview
Take a quick tour to learn all about the key benefits delivered by dbForge Studio for Oracle.
All features
Get acquainted with the rich features and capabilities of the tool in less than 5 minutes.
Request a demo
If you consider employing this tool for your business, request a demo to see it in action.