Solved

Calling a sybase stored procedure from a unix shell script

Posted on 2001-07-20
2
3,025 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

We need a new way to communicate time sensitive or critical info.   The best part of my role at xMatters is visiting our clients all over the world to learn about how they operate their businesses, share insights that xMatters has gleaned across…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

895 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