Solved

Calling a sybase stored procedure from a unix shell script

Posted on 2001-07-20
2
2,967 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 50 total points
Comment Utility
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
Comment Utility
That's exactly what I needed..

0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

771 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now