# sqlplus invocation

**URL:** <https://community.unix.com/t/sqlplus-invocation/159339>\
**Category:** Shell Programming and Scripting\
**Created:** [February 7, 2006, 2:40am UTC](https://community.unix.com/t/sqlplus-invocation/159339 "2006-02-07T02:40:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![new2ss](https://community.unix.com/letter_avatar/new2ss/32/6_449c533f586939b6e5f246632a46421f.png) [@new2ss](https://community.unix.com/u/new2ss)\
**Post date:** [February 7, 2006, 2:40am UTC](https://community.unix.com/t/sqlplus-invocation/159339/1 "2006-02-07T02:40:02Z")

</div>

sqlplus -s /nolog \<\<! set serveroutput on size 100000 @/path\_of\_my\_script exit !

hi, i encountered the above statment in a unix script file and i have some questions, would appreciate if someone can enlighten me.

1. What is the purpose of \<\<! ?
2. What is the purpose of exit ? does it exit the sqlplus program?
3. Why does the statment ends with a ! ? The '!' probably is to match the one at the beginning of the statement, i guess. Would appreciate if someone explaines the meaning of the !!. Thank you.

---

<div class="post-metadata">

**Author:** ![rahulrathod](https://community.unix.com/letter_avatar/rahulrathod/32/6_449c533f586939b6e5f246632a46421f.png) [@rahulrathod](https://community.unix.com/u/rahulrathod)\
**Post date:** [February 7, 2006, 3:05am UTC](https://community.unix.com/t/sqlplus-invocation/159339/2 "2006-02-07T03:05:26Z")

</div>

Your understanding is right.

sqlplus user/password@SID \<\<!

This statement means give input to the sqlplus command until you encounter a !. The '\<\<' operator is called the here document. You can get more information on this from other threads too. exit is the exit command of sqlplus to exit from the sql prompt.

Rahul.

---

<div class="post-metadata">

**Author:** ![new2ss](https://community.unix.com/letter_avatar/new2ss/32/6_449c533f586939b6e5f246632a46421f.png) [@new2ss](https://community.unix.com/u/new2ss)\
**Post date:** [February 7, 2006, 3:22am UTC](https://community.unix.com/t/sqlplus-invocation/159339/3 "2006-02-07T03:22:50Z")

</div>

so it means 'set serveroutput on size 100000 @/path\_of\_my\_script exit' is fed into the sqlplus command? the (!) just acts as a delimiter.

Would you mind explaining:

1. What does the -s stands for ?
2. i read from another post about /nolog. One of the replies was that, it means no initial connection is made to the db. I do not understand it. If not conenction is made, how does it query the db later on?

---

<div class="post-metadata">

**Author:** ![rahulrathod](https://community.unix.com/letter_avatar/rahulrathod/32/6_449c533f586939b6e5f246632a46421f.png) [@rahulrathod](https://community.unix.com/u/rahulrathod)\
**Post date:** [February 7, 2006, 3:34am UTC](https://community.unix.com/t/sqlplus-invocation/159339/4 "2006-02-07T03:34:04Z")

</div>

-s stands for silent connection.

The post was correct /nolog does not actually connect to the database. The connection to the DB is probably done by your script (@/pathOfMyScript)

Try the following on your system.

$ sqlplus --help

SQL\*Plus: Release 9.2.0.6.0 - Production

Usage: SQLPLUS [[\<option\>] [\<logon\>] [\<start\>] ]  
where \<option\> ::= -H | -V | [[-L] [-M \<o\>] [-R \<n\>] [-S] ]  
\<logon\> ::= \<username\>[/\<password\>][@\<connect\_string\>] | / | /NOLOG  
\<start\> ::= @\<URI\>|\<filename\>[.\<ext\>] [\<parameter\> ...]  
"-H" displays the SQL_Plus version banner and usage syntax  
"-V" displays the SQL_Plus version banner  
"-L" attempts log on just once  
"-M \<o\>" uses HTML markup options \<o\>  
"-R \<n\>" uses restricted mode \<n\>  
"-S" uses silent mode

Rahul.

---

<div class="post-metadata">

**Author:** ![new2ss](https://community.unix.com/letter_avatar/new2ss/32/6_449c533f586939b6e5f246632a46421f.png) [@new2ss](https://community.unix.com/u/new2ss)\
**Post date:** [February 7, 2006, 3:41am UTC](https://community.unix.com/t/sqlplus-invocation/159339/5 "2006-02-07T03:41:20Z")

</div>

Rahul, thank you for the detailed explaination. Greatly appreciated.
