10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. Windows & DOS: Issues & Discussions
Hello All,
Good Afternoon.
I am new to this platform and I need one small help regarding running a SQL file from Bat file. Below is what I am doing,
1. I placed the below command in one Bat file.
start putty.exe -ssh user@host -pw pwd -m C:\2.txt
2. In 2.txt, I have below command.
... (3 Replies)
Discussion started by: PavanPatil
3 Replies
3. Solaris
I am using following code to connect to oracle database from solaris shell script. which will try thrice to connect the database ...at the 4rth atempt it will exir=t.
count=0
while ; do
sqlplus -s $usrname/$password@dbSID <<-EOF | tee $logfile
WHENEVER OSERROR EXIT 9;
WHENEVER SQLERROR... (4 Replies)
Discussion started by: millan
4 Replies
4. Shell Programming and Scripting
Hi all,
on AIX 6.1 I want to run the following but for 5 DB. How should I do that ? Using FOR, WHILE ???? How ?
export ORACLE_SID=DB1
sqlplus / as sysdba << EOF
whenever sqlerror exit sql.sqlcode;
whenever oserror exit FAILURE
set define off
set head off
set feedback off
set echo off... (1 Reply)
Discussion started by: big123456
1 Replies
5. Shell Programming and Scripting
Hi all,
I am using the below given sqlplus command in my unix script to invoke a stored procedure which returns a value .It works fine.
RET_CODE=$(/opt/oracle/product/10.2.0.4.CL/bin/sqlplus -S $USER/$PASSWD@$DB_NAME <<EOF
EXEC MY_PKG.MY_SP (:COUNT);
PRINT COUNT;
commit;
... (6 Replies)
Discussion started by: Shri123
6 Replies
6. Shell Programming and Scripting
cron job not running the sqlplus command in shell script but the shell script works fine from command line..
Cronjob:
5 * * * * /home/dreg/script.sh
script.sh:
#!/bin/ksh
/oracle/u000/app/oracle/product/10204/GEN/bin/sqlplus -s <user>/<pass>@<sid/home/dreg/sqlscript.sh
... (18 Replies)
Discussion started by: Ikea
18 Replies
7. Shell Programming and Scripting
HELLO,
I am using such a command to write oracle sqlplus query result to text file:
sqlplus -S xxx/xxx@xxxxxxx @\tmp\2.sql>\tmp\123.txt
Is it possible to script that:
If command succesfull write in \tmp\log.txt:
timestamp and "succeded"
and create 123.txt with results
else
If error... (2 Replies)
Discussion started by: tomasba
2 Replies
8. Shell Programming and Scripting
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... (3 Replies)
Discussion started by: kripssmart
3 Replies
9. Shell Programming and Scripting
Hi,
Currently i have a .sql file 1.sql.
I need to pass that as a parameter through a shell script to the sqlplus inside the same shell script.
How I should I do.can anyone help me pls.
I have an req where I need to send the .sql file and the place where the script has to create a .csv... (9 Replies)
Discussion started by: Hemamalini
9 Replies
10. Shell Programming and Scripting
I have a script which connects to different database servers using sqlplus. Is there a way by which I can run a shell command on that host from sqlplus?
I know about 'host' command but it runs script on the local machine where the original script is running. Is there a way to run command on the... (9 Replies)
Discussion started by: dkr123
9 Replies