Solved

Need a Script to check the sybase database connectivity from Unix

Posted on 2003-12-11
3
785 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
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

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

Scenario: Your operations manager has discovered an anomaly in your security system. The business will start to suffer within 15 minutes if it is a major IT incident. What should she do? We have 6 recommendations for managing major incidents (https:…
With the rapid rise in mobile usage, mobile devices are here to stay and have become an integral part of doing business. Here are 9 great apps for your BYOD environment.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

920 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