If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > ms-sql server alive test from unix(aix)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-22-03, 09:42
noober noober is offline
Registered User
 
Join Date: Oct 2003
Posts: 20
ms-sql server alive test from unix(aix)

Hey all. I have a script that runs on my aix box that checks lots of stuff including whether or not other servers in my shop are alive. I would like to somehow execute something from this script (on the aix machine) that would reach out to my sql server and at least verify that the database is up...currently I have just scripted some basic ping tests to the server that hosts my SQL Server database.

Anyone help with this scripting?
Reply With Quote
  #2 (permalink)  
Old 11-02-03, 19:09
sco08y sco08y is offline
Registered User
 
Join Date: Oct 2002
Location: Baghdad, Iraq
Posts: 697
Re: ms-sql server alive test from unix(aix)

Quote:
Originally posted by noober
Hey all. I have a script that runs on my aix box that checks lots of stuff including whether or not other servers in my shop are alive. I would like to somehow execute something from this script (on the aix machine) that would reach out to my sql server and at least verify that the database is up...currently I have just scripted some basic ping tests to the server that hosts my SQL Server database.

Anyone help with this scripting?
perl -MIO:ocket::INET -e 'IO:ocket::INET->new("127.0.0.1:80") || exit 1'

This will return a failure code if it can't connect to the webserver on the local host. You could put it in an "if" statement, such as:

if perl ...
then #success
else #failure
fi

I forget what the MS SQL Server port number is, but you can look that up easily enough.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On