01-24-2017
Calling Sybase Stored proc from UNIX Shellscript.
Hi, I am new to shell scripting and Sybase database i need a help that i try to execute a SYBASE stored procedure from a Unix shell script and wanna write the output of the SP into a Text File, somehow i tried to find a solution but when i try to run the script i am not getting the output file with the desired records. i have created the input file "test.sql" which executes the SP and all the server details and input output file details are in ".SH file" i have the Output file also in the same location. i tried to execute the SP in rapid sql and found that the SP works well.
Please correct me if i am wrong anywhere. and this is an Urgent requirement.
.SH FILE :
#!/bin/ksh -x
isql -S${Servername} -D${Database name } -I$ test.Sql -O$ Outfile.OUT -U${username} -P${password}
INPUT FILE: test.sql
use BenefitDB
go
exec Sample_SP
go
10 More Discussions You Might Find Interesting
1. Solaris
I have created 3 Procedures all similar to this one:
I then created 3 shell sripts which will call the sql? finally created a calling script to call the procedure. I am a bit unsure how to this all works, can someone check my code and I am doing this right? Also could I add my procedure (first... (0 Replies)
Discussion started by: etravels
0 Replies
2. Shell Programming and Scripting
hai,
can anybody say how to call or to execute an oracle stored procedure in oracle from unix...
thanks in advance.... for ur reply....
by,
leo (2 Replies)
Discussion started by: Leojhose
2 Replies
3. UNIX for Dummies Questions & Answers
Hi All,
Want to know if is it possible to run / execute any stored procedures (sybase) from unix command prompt.?
Thanks for your help in Advance.
Regards,
Arvind S. (0 Replies)
Discussion started by: Arvind_temp
0 Replies
4. UNIX for Advanced & Expert Users
Hi All,
I want to run/execute a stored procedure (sybase) from unix command prompt not by login in isql utility which is provided my Sybase guys.
Is there way ..?
Thanks in advance for your help !!!
Regards,
Arvind S. (0 Replies)
Discussion started by: arvindcgi
0 Replies
5. Shell Programming and Scripting
Greetings,
I need to make an open server call to a shell script from inside a Sybase Stored procedure.
Coul any one please provide a sample code?
TIA (0 Replies)
Discussion started by: rajpreetsidhu
0 Replies
6. Shell Programming and Scripting
Hi,
I am writing a script that needs to call a stored proc which would update a column in a table based on a condition.
I need to also capture the number of rows updated.
However, When I execute the script I keep getting this error:
./test_isql.sh: syntax error at line 33: `end of file'... (3 Replies)
Discussion started by: karthikk
3 Replies
7. UNIX for Dummies Questions & Answers
Hi,
My stored procedure returns a value.
How to retrieve the value and display in unix.
Stored procedure
CREATE OR REPLACE
PROCEDURE gohan(num INT) IS
BEGIN
DBMS_OUTPUT.PUT_LINE('My lucky number is ' || num);
END;
Unix Scripting i used
sqlplus -s... (7 Replies)
Discussion started by: gohan3376
7 Replies
8. Shell Programming and Scripting
Greeting everyone. Ok, I have spent the past few days googling for this and I keep hitting a wall. Many results brought me here, but the solutions were not quite right for this.
Basically my script (ksh) is run with an arg for a csv. My script so far appears to be storing the values from my... (4 Replies)
Discussion started by: dezdiggler
4 Replies
9. How to Post in the The UNIX and Linux Forums
Hi, I am new to shell scripting and Sybase database i need a help that i try to execute a SYBASE stored procedure from a Unix shell script and wanna write the output of the SP into a Text File.somehow i try to find a solution but whwn i try to run the script i am not getting the output file with... (1 Reply)
Discussion started by: Arun619
1 Replies
10. Shell Programming and Scripting
Hi, I am new to shell scripting and Sybase database i need a help that i try to execute a SYBASE stored procedure from a Unix shell script and wanna write the output of the SP into a Text File.somehow i try to find a solution but whwn i try to run the script i am not getting the output file with... (1 Reply)
Discussion started by: Arun619
1 Replies