10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello everyone,
I have a shell script, which connects to the database and runs .sql file.
after executing of .sql file, i need to store the results in error table.
How can i achieve this one? could you please give your suggestions.
here is my code.
#!/bin/sh
#set -vx
SCHEMA_NAME=$1... (1 Reply)
Discussion started by: Rami Reddy
1 Replies
2. Shell Programming and Scripting
Hi,
I have a script where I make a sqlplus connection. In the script I have multiple sql queries within that sqlplus connection. I want the result of the queries to be stored in shell variables declared earlier. I dont want to use procedures. Is there anyway else.
Thanks in advance..
Cheers (6 Replies)
Discussion started by: gonchusirsa
6 Replies
3. Shell Programming and Scripting
Hi,
I want to store the results of running ls in a directory on a remote host using ftp.
For example,
#!/usr/bin/ksh
ftp -n hostx <<EOF
user username password
ls /tmp/RandomFiles.*
#I need to put the results of that ls command into some file, so I can get the last file in... (3 Replies)
Discussion started by: mrskittles99
3 Replies
4. Shell Programming and Scripting
Hi all.
This is my first post on this forum. I've previously found great help in the huge knowledgebase that is here, but this time I have not been able to find a solution to my problem.
I have a large text file that looks like this:
typedef struct ABC_struct_nbr1_ {
char attr1; /*... (0 Replies)
Discussion started by: Yagi Uda
0 Replies
5. Shell Programming and Scripting
Hi
I want ot save SQL query result in one txt file. for that i have written one code line
sqlplus -s $dbstring @/usr/local/bin/sched/nightly_Cronjob/exec_123.sql >> /usr/local/bin/sched/nightly_Cronjob/result.txt
but it is not working .
database : Oracle
so please advice me how can i... (7 Replies)
Discussion started by: Himanshu_soni
7 Replies
6. Shell Programming and Scripting
Hi everyone,
I am new to unix and bash and in need of some help.
I am writing a script that will execute a SQL query. The script runs and the SQl query runs, but I cannot figure out how to save the results as a file that can be emailed to a user. Here is my scripts thus far:
#!/bin/sh
SID=$1... (2 Replies)
Discussion started by: alpinescott
2 Replies
7. Shell Programming and Scripting
I'm having problems with writing my sql results to a file:
sqlplus -S username/password@DB <<!!
set echo off
set verify off
set showmode off
set feedback off
set timing off
set linesize 250
set wrap off
set pagesize 0
set newpage none
set tab off
set trimspool on
set colsep... (1 Reply)
Discussion started by: avillanueva
1 Replies
8. Shell Programming and Scripting
I've got:
isql -U $USERID -S $SERVER -D $DATABASE -i inputfile.sql -o outputfile.txt
in inputfile I have:
go
sql#1
go
sql#2
go
sql#3
go
I also tried without "go" and with";" instead which did not work
SQL statements will work if I paste them directly into the script and use EOF
... (0 Replies)
Discussion started by: Cailet
0 Replies
9. Solaris
Hello,
On unix side, I have written below script for taking oracle db backup. But when I tried to execute it - i could not execute the sql statements from unix.
Please suggest
------------------------
$ more bkp.sh
#!/bin/ksh
# make sure database is shutdown cleanly
sqlplus '/ as sysdba'... (3 Replies)
Discussion started by: panchpan
3 Replies
10. Shell Programming and Scripting
I try to get the month (of last save) and the filename into a variable, is this possible ?
something like this :
for month in `ls -la | awk '{print $6}'`
do
if ]
then
a=filename of the matching file
cp $a /Sep
fi
thanks,
Steffen (1 Reply)
Discussion started by: forever_49ers
1 Replies