Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Calling a sybase stored procedure from a unix shell script

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SyBase SQL Syntax 7 320
Sybase - Backup and restore db into other server 1 575
How do I get Sybase ASE to throw an error that Java can catch? 4 558
sql statement error sybase 2 59
ConnectWise and their customers need to ensure critical alerts automatically reach the right person at the right time. MSP superheros efficiently respond to these alerts key is providing automatic, intelligent alerting that generates a complete audi…
The Nano Server Image Builder helps you create a custom Nano Server image and bootable USB media with the aid of a graphical interface. Based on the inputs you provide, it generates images for deployment and creates reusable PowerShell scripts that …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

856 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