TX Wine Trail


View Texas Wineries in a larger map

24 wineries in 3 days. Not bad if I do say so myself. I’ll try to write something more about the trip later. I need to find out how to attach the kmz of all the waypoints to this post.

Update:
The kmz with the waypoints can be downloaded here.

Debugging 64bit App Pools

So version 1.1 of MS Debug Diagnostics is currently the latest version of the debugger, however on Win 2008 x64 the only thing you can do with it directly is use the Analysis portion. It will not allow you to create dumps, so we will have to create one manually.

To capture a dump of an Application Pool we need to use adplus which is part of the debugging tools.  Adplus can be targeted at either a process name (w3wp.exe) or a PID.

To determine which PID belongs to our application pool we can use the native IIS tools:

H:\>%windir%\system32\inetsrv\appcmd list wp
WP “4072″ (applicationPool:RDWebAccess)

Then we can target that PID with adplus like this:

adplus –quiet –crash –p 4072 –o PATH_TO_DUMPFILE

Slow SQL Queries

Here is a query that works with SQL 2005 to pull the top 100 slowest queries of a database:

 

SELECT TOP 100

[Object_Name] = object_name(st.objectid),creation_time, last_execution_time,
total_cpu_time = total_worker_time / 1000,
avg_cpu_time = (total_worker_time / execution_count) / 1000,
min_cpu_time = min_worker_time / 1000,
max_cpu_time = max_worker_time / 1000,
last_cpu_time = last_worker_time / 1000,
total_time_elapsed = total_elapsed_time / 1000 ,
avg_time_elapsed = (total_elapsed_time / execution_count) / 1000,
min_time_elapsed = min_elapsed_time / 1000,
max_time_elapsed = max_elapsed_time / 1000,
avg_physical_reads = total_physical_reads / execution_count,
avg_logical_reads = total_logical_reads / execution_count,
execution_count,
SUBSTRING(st.text, (qs.statement_start_offset/2) + 1,
((CASE statement_end_offset WHEN -1 THEN DATALENGTH(st.text)
ELSE qs.statement_end_offset
END

- qs.statement_start_offset) /2) + 1) as statement_text FROM
sys.dm_exec_query_stats qs CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) st
ORDER BY total_worker_time / execution_count DESC