Calling Sybase Stored proc from UNIX Shellscript.


 
Thread Tools Search this Thread
Contact Us Post Here to Contact Site Administrators and Moderators Calling Sybase Stored proc from UNIX Shellscript.
# 1  
Old 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
# 2  
Old 01-24-2017
Moderator's Comments:
Mod Comment This thread is file in an inappropriate forum and duplicates the thread Sybase Stored Proc call from UNIX script.

Continue any discussion on this topic there.

This thread is closed.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sybase Stored Proc call from UNIX script.

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

2. How to Post in the The UNIX and Linux Forums

Calling a Sybase Stored procedure from a UNIX Script

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

3. Shell Programming and Scripting

PL/SQL stored proc from ksh just inserts thumb and does nothing

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

4. UNIX for Dummies Questions & Answers

Calling stored procedure from unix

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

5. Shell Programming and Scripting

Error when calling sybase stored proc from shell script

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

6. Shell Programming and Scripting

Executing Shell Script from Within a Sybase Stored Proc

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

7. UNIX for Advanced & Expert Users

Executing Stored Proc from unix prompt.

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

8. UNIX for Dummies Questions & Answers

Executing Stored Proc from unic prompt.

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

9. Shell Programming and Scripting

Calling an Oracle Stored Procedure from Unix shell script

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

10. Solaris

Calling Oracle Stored Procedures in UNIx(sun 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
Login or Register to Ask a Question