?
Solved

Calling a sybase stored procedure from a unix shell script

Posted on 2001-07-20
2
Medium Priority
?
3,609 Views
Last Modified: 2008-02-01
How do you call a sybase stored procedure within a unix shell script? The script and the database reside on the same server.  I never did something like this before, even calling a straight sql statement.  An example would be nice.
0
Comment
Question by:tchous
2 Comments
 
LVL 3

Accepted Solution

by:
mathavra earned 200 total points
ID: 6303297
You can just create a file with the T-SQL statements to call the Stored procedures and pass that file to the isql.

Sample:

file1.sql
---------

use master
go

exec sp_who
go


file2.sh

isql -Ulogin -Ppassword -ifile1.sql -ofile1.out -SSERVERNAME

You can run the file2.sh (you can have all sorts of shell commands in here). It will throw the output to the file1.out

Hope this helps!


0
 

Author Comment

by:tchous
ID: 6303340
That's exactly what I needed..

0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Moore’s Law has proven itself time and time again since it was first introduced. So what’s next? Will Moore’s law continue to remain relevant, or will new technology take over and bring us the next big advancement in computing?
In the below post we have mentioned the best hosting type for startups. Also, check out some of the superlative web hosting companies that are proposing affordable web hosting solutions to host your startup website.
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question