Solved

Need a Script to check the sybase database connectivity from Unix

Posted on 2003-12-11
3
811 Views
Last Modified: 2012-08-14
Hi,

I am working on Websphere 4.x which sits on AIX 5.1

I have a  Sybase 12 databse configured as application database.

I need a script, to check the database connectivity from the AIX 5.1.
So that i will run the cron job everyday morning.So it will generate a mail.

thanks in advance...
0
Comment
Question by:katta1976
[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
3 Comments
 
LVL 2

Accepted Solution

by:
ianmb earned 250 total points
ID: 9921330
Try the following:

echo "exit" | isql -S<servername> -U<username> -P<password>        \
                                                        2> /dev/null             \
                              && echo success | mailx "email_addr"       \
                               || echo fail | mailx "email_addr"

Cheers,
Ian
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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 ASE 15.7 do not know datepart function 2 1,245
SQL Time Syntax 4 316
Pivot and Unpivot in Sybase 2 1,778
remote logins for proxy table in sybase 5 69
I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

734 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