pinging sql servers

  • Hi,

    I wanted to check the connectivity of sql servers over the network.

    How to ping the sql servers??

    Regards,

    Sushant

    Regards
    Sushant Kumar
    MCTS,MCP

  • To check to see if SQL is connectable, your best bet would be trying Telnet to the port it's on

    i.e. if you're using the default instance, open a cmd prompt and try:

    TELNET sqlservername 1433

    If it fails to connect, you have an issue with the server. If you just get a blank screen and it looks like nothing happened, that means the server is running, sql is running, and it's connectable.

  • @ derrick

    Ya, there is a blank screen and looks like nothing happened.

    That means it is running fine..

    Thanks..

    Regards,

    Sushant

    Regards
    Sushant Kumar
    MCTS,MCP

  • @ derrick

    What is the difference between checking this(pinging) and opening the sql server configuration manager and seeing if the sql server, agent, etc are running/???

    Regards,

    Sushant

    Regards
    Sushant Kumar
    MCTS,MCP

  • SKYBVI (10/5/2010)


    @ derrick

    What is the difference between checking this(pinging) and opening the sql server configuration manager and seeing if the sql server, agent, etc are running/???

    Regards,

    Sushant

    The services could be running but you could have routing issues, DNS issues, bad firewall rules, etc. If you telnet to the server, you're verifying that the service is running, AND that it's 100% connectible.

    But yeah, checking the config manager will also give you a quick glance to see if the services are up.

  • You could try SQLPing

  • @ derrick

    So, that means if it does ping successfully, then no need to check configuration manager?

    OR

    both are different and have to be checked seperately to ensure proper working of sql servers..

    Thanks,

    Regards

    Sushant

    Regards
    Sushant Kumar
    MCTS,MCP

  • SKYBVI (10/5/2010)


    @ derrick

    So, that means if it does ping successfully, then no need to check configuration manager?

    OR

    both are different and have to be checked seperately to ensure proper working of sql servers..

    Thanks,

    Regards

    Sushant

    Well..proper working of sql servers is a wide scope. Telnetting to it will verify that the SQL service is running, and is connectible. It won't tell you if the Agent is running or any other services, or if there are any other issues on the box.

  • If you can connect, the server is likely working properly. A simple query through SQLCMD can tell you this, or through SSMS can show you, but that's not easily scriptable.

    SQLCMD -S MyServer -E -Q "select @@version"

    If you get a 0 return code, then the server is connectable.

  • If you can connect, the server is likely working properly. A simple query through SQLCMD can tell you this, or through SSMS can show you, but that's not easily scriptable.

    SQLCMD -S MyServer -E -Q "select @@version"

    If you get a 0 return code, then the server is connectable.

  • A friend of mine just posted an excellent little PowerShell script that might be something you're looking for. Check out Aaron Nelson's blog post[/url].

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 11 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply