sqlplus invocation


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting sqlplus invocation
# 1  
Old 02-07-2006
sqlplus invocation

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.
# 2  
Old 02-07-2006
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.
# 3  
Old 02-07-2006
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?
# 4  
Old 02-07-2006
-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.
# 5  
Old 02-07-2006
Rahul, thank you for the detailed explaination. Greatly appreciated.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sed: deleting last line prevents '$' address from working in the multi-script invocation

It looks like if matching and deleting the last line confuses 'sed' so it does not recognize '$' address. Consider: sed -e '/^3/d' -e '$ a text' supposed to delete a line starting with '3' and then append 'text' after the last line of input. But, if it is the last line of input which starts... (2 Replies)
Discussion started by: msz59
2 Replies

2. Shell Programming and Scripting

Sqlplus error - sqlplus -s <login/password@dbname> : No such file or directory

i am using bash shell Whenever i declare an array, and then using sqlplus, i am getting sqlplus error and return code 127. IFS="," declare -a Arr=($Variable1); SQLPLUS=sqlplus -s "${DBUSER}"/"${DBPASS}"@"${DBASE} echo "set head off ; " > ${SQLCMD} echo "set PAGESIZE 0 ;" >> ${SQLCMD}... (6 Replies)
Discussion started by: arghadeep adity
6 Replies

3. Shell Programming and Scripting

Automatically invocation of unix command

Dear All, I have a directory when i received files by means of FTP, i want to invoke my shell scripts as soon as file hit the directory, if the files hit 10 times then the shell scripts should also get executed 10 times. thanks rajesh (1 Reply)
Discussion started by: guddu_12
1 Replies

4. Shell Programming and Scripting

command invocation

Hello, I've tested something like this: tcpdump -r /tmp/out.out > /tmp/out.ra 2> /dev/null works fine - there is no status message visible. if I place in a bash-script this line: $(tcpdump -r /tmp/out.out > /tmp/out.ra 2> /dev/null) I get status information on executing :confused:. I... (2 Replies)
Discussion started by: daWonderer
2 Replies

5. Red Hat

Problem in REMOTE DESKTOP INVOCATION

Hello sir, I am using VNC package for invoking the remote desktop to and from a FEDORA 8 machine and a WINDOWS XP machine. I have downloaded the VNC for both OSs and run it successfully. 1)When I invoked WINDOWS XP server, the I got it successfully as :-... (0 Replies)
Discussion started by: nsharath
0 Replies

6. AIX

JVM Invocation in AIX 6.1

Hi all, I'm trying to do JVM invocation from C++ in AIX 6.1. So inorder to do that, i'm loading libjvm.a. When i load the libjvm.a from the path where jre is installed (i.e /usr/java5/jre/bin/classic), it loads correctly and the program works correctly. But according to my requirement, the... (0 Replies)
Discussion started by: d_ccc
0 Replies

7. Solaris

xscreensaver invocation location

i have an issue where it appears i'm running version 3.24 of xscreensaver but when the screensaver actually activates it shows version 4.12 on the xscreensaver unlock/lock screen. the node is running solaris 8 which is connected to a server running irix. the node has no .xscreensaver in any of the... (1 Reply)
Discussion started by: nixwins
1 Replies

8. Shell Programming and Scripting

Remote script invocation

Hi, Had this weird issue that need expertise help. Here is the scenario. I have Server A (Unix) and Server B (Windows 2000). I need to invoke a script on Server B from Server A. If it was a windows to windows invocation, I could have done it with WMI. How do I go about it from Unix to... (4 Replies)
Discussion started by: hollysmoke
4 Replies
Login or Register to Ask a Question