Solved

Need a Script to check the sybase database connectivity from Unix

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Each year, investment in cloud platforms grows more than 20% (https://www.immun.io/hubfs/Immunio_2016/Content/Marketing/Cloud-Security-Report-2016.pdf?submissionGuid=a8d80a00-6fee-4b85-81db-a4e28f681762) as an increasing number of companies begin to…
As a business owner, there are many things that keep you up at night. Profit margins, employee retention, human resource protocols, whether your product or service will remain competitive. When you own or manage a technology company that operates la…
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.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

803 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