Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have 2 windows 7 machines on a very high security domain one acting as a server, the other as a client.

Each box has a SQL Server Express 2005 database and application "A", however I'm only using one of them to store data (the server), the client machine just uses application "A" and a system data source to connect to the server machines database.

My problem is that applciation "A" is acting funny, I'd like to see how long its taking for the data to come from the Server machines database, to the client machine.

I'd normally just ping the server from the client, but due to the restrictive GPO on this high security domain, I cant...

There are obviously firewall exceptions to allow the connectivity to travel from Server -> Client. Is there a query I can run from the client machine to give me a response time/any other useful data?

share|improve this question

migrated from stackoverflow.com Nov 26 '12 at 3:43

This question came from our site for professional and enthusiast programmers.

add comment

2 Answers 2

I think you could run a query from SQL Server Management Studio from the machine that you can connect from and run the query with client statistics. That won't be exactly the same as a ping but you can see the server execution time (time from request sent from client to time server starts to send response back) and the client processing time (time from when the server starts to send to when the client receives it). That is why it isn't a ping because client execution time includes that network time and the time on the client to process.

I'd run a fairly simple query with a handful or so of rows returned. And maybe a slightly more complex query with more rows. You should also run each of these a few times in a row to eliminate any other slowdowns with the query.

Again, this won't really be a "ping" but it can at least show you some information and you can use this to trend information over time as well by running the same queries and looking at the info.

To look at client statistics - from within the query window of SSMS, go to Query and then select Include Client Statistics. You'll see the details in the Client Statistics tab of the results.

If you could also run SSMS queries on the actual server itself and run the same queries you can look at the difference in these times for the same queries and that should give a rough approximation of the impact of network latency perhaps.

share|improve this answer
1  
And I think the real answer is probably that you request permission to access proper network statistics, if you are experiencing network issues or worried that you are. The networking team should be monitoring this for you or at least be able to look at better tools than ping or my approach above to determine network latency issues. –  Mike Walsh Nov 26 '12 at 4:21
add comment
EXEC sp_configure 'xp_cmdshell', 1
GO
RECONFIGURE
GO

DECLARE @hostname nvarchar(20) = 'your_host',
        @cmd nvarchar(20)
SET @cmd = 'ping ' + @hostname
EXEC master.dbo.xp_cmdshell @cmd
share|improve this answer
2  
I don't like this answer. This opens up a backdoor past security and enabling xp_cmdshell opens your environment up to the potential for threats. If this is a high security environment you should keep that disabled. –  Mike Walsh Nov 26 '12 at 3:54
    
If he can't ping with his user, why'd you think he can ping with the SQL Server user? –  Marian Nov 27 '12 at 8:57
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.