Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003
    Posts
    20

    Unanswered: 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?

  2. #2
    Join Date
    Oct 2002
    Location
    Baghdad, Iraq
    Posts
    697

    Re: ms-sql server alive test from unix(aix)

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •