SQL Plus - Script

> Procedural Languages > (SQL Plus|SqlCl) (Oracle Database Console)

1 - 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
Advertising

3 - How to

3.1 - Start

3.1.1 - From the console

with the @ or the start command

3.1.2 - From the SQL Plus utility

sqlplus login/[email protected]_identifier @myScript MyArguments

where:

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

3.1.3 - 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.

lang/sqlplus/script.txt · Last modified: 2017/05/09 16:51 by gerardnico