Passing parameters shell script sqlplus

Aug 27,  · Hi all, I need to know if it's possible to pass variables from a shell script to sqlplus. The script reads a Table Name from user input & executes a Select statement based on that input. Script. echo "Enter table name: \c "read answer sqlplus 'oracle/*** ' <<! spool tvandradio.net @tvandradio.net spool off exit! Inside tvandradio.net, i need to use the variable "answer" to run the query. With SQL*Plus, it is possible to use parameters in the form &1, &2, inside a script to be executed through the sqlplus command and pass the parameter values from the command line. Consider this script, contained in a file called tvandradio.net: SELECT '&1' FROM DUAL; This script can be executed from a unix shell using sqlplus as follows. passing parameters from a shell script to sqlplus Hi, I want to pass parameters from a shell script to a sql script and use the parameter in the sql tvandradio.net then I want to spool a particular select query on to my unix box for 4 different locations by writing only one sql script.

Passing parameters shell script sqlplus

Hi, I am trying to pass some of the variables in my shell scripts to the sqlplus call and use them as parameters. For example, I would like to replace | The UNIX. Hi gurus, In the shell script I need to call the procedure which has two I/P parameter and 2 o/p parameter. in the sql script we should put. I have developed a shell script which takes schema id and password as parameter to login into database using sqlplus,runs a query and mails. You appear to have a heredoc containing a single SQL*Plus command, though it doesn't look right as noted in the comments. You can either. Answer: Passing variables to shell scripts is tricky! one line (a requirement in Windows shell scripting), it's easy to pass a ksh shell script variable into sqlplus. Hello Tom, I am doing following thing, sqlplus -s /nolog <Watch Now Passing Parameters Shell Script Sqlplus
Shell Scripting Tutorial for Beginners 4 - Pass Arguments to a Bash-Script, time: 8:35
Tags: 2005 ford explorer manual , , Hum kashmakash e gham se , , Film twilight saga breaking dawn part 1-2 . passing parameters from a shell script to sqlplus Hi, I want to pass parameters from a shell script to a sql script and use the parameter in the sql tvandradio.net then I want to spool a particular select query on to my unix box for 4 different locations by writing only one sql script. I have a shell script that calls tvandradio.net I am looking for a way to pass some parameters to my tvandradio.net If I don't pass a variable with some value to the sql script, I will have to create tvandradio.net files with SELECT statement and all that would change is few words. Im writing a script that calls a sqlplus script but the sqlplus requires inputs and i cant seem to g | The UNIX and Linux Forums Passing a parameter from a shell script to .

5 thoughts on “Passing parameters shell script sqlplus

Leave a Reply

Your email address will not be published. Required fields are marked *