SQL Plus - Script

Card Puncher Data Processing

About

You must include:

  • a semicolon at the end of each SQL command
  • and a slash (/) on a new line at the end of each PL/SQL block

How to

Start

From the console

with the @ or the start command

From the SQL Plus utility

sqlplus login/pwd@connect_identifier @myScript MyArguments

where:

The exit error code is defined by the command whenever sqlerror and whenever oserror. Otherwise, it's always a SUCCESS.

From the cmd utility

cmd /c @echo @/mypath/myScript | sqlplus login/password@connectionString & pause 

The @ symbol before a command supress the command from being echoed to the console. It's useful in situations where you don't want to turn echo off, but don't want to see the command echoed on the screen.





Discover More
Card Puncher Data Processing
SQL Plus - Save (The SQL Buffer)

Saves the contents of the SQL buffer in a script.
Card Puncher Data Processing
SQL Plus - Special Characters

Useful command in sqlplus. The At & character is the default character that define a substitution variable. You can change it with the define system variable. The slash command (/): ...
Card Puncher Data Processing
SQL Plus - Start Command

Runs the SQLPlus statements in the specified script. The script can be called from the local file system or a web server. where: url supports HTTP and FTP protocols in the form: ...
Card Puncher Data Processing
SQL Plus - Store (System Variables)

Saves system variables in a script. where: set refer to the set command in order to save the system variables
Card Puncher Data Processing
SQL Plus - TERMOUT

Termout is a system variable that controls the display of output in the console generated by commandsexecuted from a script. If termout is off, no output will be send to the console (included the result...



Share this page:
Follow us:
Task Runner