A. Terminal Monitor : sql Command--Access Line-based Terminal Monitor
 
Share this page                  
sql Command--Access Line-based Terminal Monitor
To access the line-based SQL terminal monitor, you must type the following command at the operating system prompt:
sql [flags]
The sql command accepts a variety of flags that define how the Terminal Monitor and the DBMS Server operate during your session. For a list of SQL option flags, see the Command Reference Guide.
Line-mode flags are as follows:
-a
Disables the autoclear function. This means that the query buffer is never automatically cleared; it is as if the \append command was inserted after every \go. This flag requires the query buffer to be cleared using \reset after every query.
-d
Turns off the display of the dayfile (a text file that displays when the Terminal Monitor is invoked).
-s
Suppresses status messages. All messages except error messages are turned off, including login and logout messages, the dayfile, and prompts.
-S
Runs the Terminal Monitor in silent mode, which shows query output only, and suppresses headers, footers, separators, lines, and row counts. This allows simple reports to be created as SQL scripts and then run without having to edit the output.
-vX
Sets the column separator to the character specified by X. The default is the vertical bar (|).
-P password
Defines the user password.
-Rrole-name role-password
Defines the role name and optional role password. Separate the name and password with a slash (/).
-history_recall
(Linux and UNIX only) (Default) Invokes the terminal monitor with history recall functionality, which includes the following:
left- and right- arrow
Browses the line entered.
Backspace
Erases a character to the left of the cursor.
Up- and Down- arrow
Retrieves the history of the commands typed in this session.
Ctrl+U
Erases the line.
Ctrl+K
Erases the line from the cursor to the end.
-nohistory_recall
(Linux and UNIX only) Invokes the terminal monitor without the history recall functionality.