Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
Administering
»
ping SQL Server instance?
ping SQL Server instance?
Rate Topic
Display Mode
Topic Options
Author
Message
EVCCDBA
EVCCDBA
Posted Friday, April 11, 2008 3:20 PM
Forum Newbie
Group: General Forum Members
Last Login: Thursday, December 02, 2010 6:48 PM
Points: 7,
Visits: 39
Hi there,
I have about 25 SQL Server instances in my company.
I am looking to write (or acquire) a monitoring script that can be run from a central server to 'ping' each of the instances to make sure they are up and running. If any instance is down, to send me an email.
It's easy enough to create a script to run locally and just check if the service is running or not, but it seems a bit harder to check remotely.
Is there an equivalent of the Oracle TNSPING command for SQL Server?
Thanks.
Post #483983
John Mitchell-245523
John Mitchell-245523
Posted Friday, April 11, 2008 3:40 PM
SSCarpal Tunnel
Group: General Forum Members
Last Login: Yesterday @ 8:44 AM
Points: 4,434,
Visits: 7,218
I believe there's a utility called sqlping, but anyhow, if you search for "ping" in Books Online, you'll probably find what you're looking for.
John
Post #483991
Todd Engen
Todd Engen
Posted Friday, April 11, 2008 3:49 PM
Ten Centuries
Group: General Forum Members
Last Login: Tuesday, May 07, 2013 11:02 AM
Points: 1,073,
Visits: 6,321
A good way to get an indication of whether the server is running and accepting connections is to just run a query against the master database from within your script. A response means it's 'up', otherwise 'down'.
For example:
SELECT TOP 1 message_id FROM sys.messages
Post #483993
K. Brian Kelley
K. Brian Kelley
Posted Friday, April 11, 2008 11:52 PM
Keeper of the Duck
Group: Moderators
Last Login: Yesterday @ 1:13 PM
Points: 6,584,
Visits: 1,790
Or simple SELECT @@SERVERNAME, which you can use to verify you are connected to the SQL Server you think you should be connecting to.
K. Brian Kelley, CISA, MCSE, Security+, MVP - SQL Server
Regular Columnist (Security), SQLServerCentral.com
Author of
Introduction to SQL Server: Basic Skills for Any SQL Server User
|
Professional Development blog
|
Technical Blog
|
LinkedIn
|
Twitter
Post #484037
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.