Solved

Calling a sybase stored procedure from a unix shell script

Posted on 2001-07-20
2
3,200 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
[X]
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
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
sybase license update 3 509
VB6 to VB.NET transition 1 494
SQL Query 2 347
Pivot and Unpivot in Sybase 2 1,722
After-hours service is a fact of life for most MSPs. While not the most pleasant aspect of the job, there are ways to make after-hours servicing a more profitable and organized enterprise.
Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

735 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