07-02-2008
error in passing a variable to sqlplus from a shell script
hi,
I am using a shell script from where i will be conecting to sqlplus..
i am having a problem in passing a variable to sqlplus query..
i will be assigning the variable in the unix environment..whenever i am trying to pass a variable having the contents greater than 2500 characters, i am getting an error message saying that the input variable is too long...
is there any way with which i can overcome this issue... ?
thanks,
Krips.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ,
I want to pass parameters from a shell script to a sql script and use the parameter in the sql query ..and then I want to spool a particular select query on to my unix box... for 4 different locations by writing only one sql script
Right now no file is generated on the unix box...it is a... (2 Replies)
Discussion started by: phani
2 Replies
2. UNIX for Advanced & Expert Users
Hi,
I want to input unix variable to sqlplus.The following is working fine
sqlplus username/password @dummy.sql param1 param2 << EOF
create user $1 identified by $2;
EOF
But I dont want any file name to be passed,I just want to pass the parameter. Is there any way to that??
Thanks... (3 Replies)
Discussion started by: sakthi.abdullah
3 Replies
3. Shell Programming and Scripting
Hi,
I am writing a script which creates an external table using a shell script. My requirement is like this.
Usage: . ./r.ksh <table_name> - this should create an external table.
e.g . ./r.ksh abc - this should create an external table as abc_external.
How do i achieve this? Please... (5 Replies)
Discussion started by: Anaramkris
5 Replies
4. Shell Programming and Scripting
Dears,
Newbie here and tried to search this topic for 3 days now with results.
I have a shell array and I want to use it in sqlplus with one connection.
here is what I have for now
#!/bin/ksh
FileName=1000
FileName=2000
FileName=3000
FileName=4000
sqlplus /nolog <<EOF
connect... (20 Replies)
Discussion started by: roby2411
20 Replies
5. Shell Programming and Scripting
I want to pass a shell variable to awk script :
# cat file
PSAPSR3 3722000 91989.25 2 98
PSAPSR7 1562000 77000.1875 5 95
PSAPUNDO 92000 4087.5625 4 96
#... (8 Replies)
Discussion started by: Reboot
8 Replies
6. Shell Programming and Scripting
Hello All,
I am interested in finding out a way to pass parameters that are entered at the prompt from HP unix and passed to SQLPlus code with a Shell Script. Is this possible?
Thanks (4 Replies)
Discussion started by: compprog11
4 Replies
7. Shell Programming and Scripting
Hi All,
I'm new to Linux and scripting, apologies in advance for 'stupid' questions.
Please help... Im writing a script that calls a sqlplus script but the sqlplus requires inputs and i cant seem to get this to work.
here is my code.
#!/bin/sh
TERM=vt100
export TERM... (4 Replies)
Discussion started by: Mahomed
4 Replies
8. Shell Programming and Scripting
echo "set echo off"; echo "set feedback off"; echo "set linesize 4000"; echo " set pagesize 0"; echo " set sqlprompt ''"; echo " set trimspool on";
Select statement is mentioned below
echo "select res.ti_book_no from disney_ticket_history res where res.ti_status =${STATUS} and... (7 Replies)
Discussion started by: aroragaurav.84
7 Replies
9. Shell Programming and Scripting
Using ksh, I am using SQLPlus to execute a query with a filter using a string variable.
REPO_DB=DEV1
FOLDER_NM='U_nmalencia'
FOLDER_CHECK=$(sqlplus -s /nolog <<EOF
CONNECT user/pswd_select@${REPO_DB}
set echo off heading off feedback off
select subj_name
from subject
where... (5 Replies)
Discussion started by: nkm0brm
5 Replies
10. Shell Programming and Scripting
Hi ,
I am using below code :
for i in `ps -ef|grep pmon|awk {' print $8 '}|cut -f3 -d'_'|grep -v '^grep'`
do
ORACLE_SID=$i
export ORACLE_SID;
dest=`sqlplus "/ as sysdba" <<EOF
set heading off feedback on verify off
select DESTINATION from v\\$archive_dest where target in... (5 Replies)
Discussion started by: admin_db
5 Replies
KENV(1) BSD General Commands Manual KENV(1)
NAME
kenv -- dump or modify the kernel environment
SYNOPSIS
kenv [-hNq]
kenv [-qv] variable[=value]
kenv [-q] -u variable
DESCRIPTION
The kenv utility will dump the kernel environment if invoked without arguments. If the -h option is specified, it will limit the report to
kernel probe hints. If an optional variable name is specified, kenv will only report that value. If the -N option is specified, kenv will
only display variable names and not their values. If the -u option is specified, kenv will delete the given environment variable. If the
environment variable is followed by an optional value, kenv will set the environment variable to this value.
If the -q option is set, warnings normally printed as a result of being unable to perform the requested operation will be suppressed.
If the -v option is set, the variable name will be printed out for the environment variable in addition to the value when kenv is executed
with a variable name.
Variables can be added to the kernel environment using the /boot/loader.conf file, or also statically compiled into the kernel using the
statement
env filename
in the kernel config file. The file can contain lines of the form
name = value # this is a comment
where whitespace around name and '=', and everything after a '#' character, are ignored. Almost any printable character except '=' is
acceptable as part of a name. Quotes are optional and necessary only if the value contains whitespace.
SEE ALSO
kenv(2), config(5), loader.conf(5), loader(8)
HISTORY
The kenv utility appeared in FreeBSD 4.1.1.
BSD
May 11, 2012 BSD