Running SQL commands in the SQL interactive interface
After connecting to the SQL interactive interface with a user name and password, a numbered prompt is displayed. Enter firewall bridge server SQL commands at the prompt.
About this task
The prompt looks like this:
1>
To
issue a command, use the following steps:
- Enter your command at the prompt and press Enter.
- On a new line, enter the keyword go (in lowercase letters), and press Enter to process the command.
Note: The nco_sql utility does not allow whitespace
before the go keyword. For example, if you run nco_sql commands
from a script and use whitespace to indent the go keyword,
the SQL statements in the script will fail.
The SQL interface
has the following characteristics:
- You can enter multiple commands, separated by semicolons (;), and run them all with a single go command.
- You can split a single command over several lines.
- To run the default editor (as defined by the EDITOR environment variable) in the nco_sql utility, enter vi at the beginning of a new line.
- To cancel a command, enter reset at the beginning of
a new line, or press Ctrl+C anywhere on a line.
Any commands that have not been run are discarded.
- To read in a file, enter :r filename at
the beginning of a new line.
Do not include the go command in the file. Instead, enter the go command at the beginning of a new line.
- To run an operating system command, enter !! followed by the command at the beginning of a new line. For example: !!ls
Commands have a limit of 4094 characters per line. If you need to use a longer command, you can split it over several lines or use the default editor to issue the command.