﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Article Discussions / Article Discussions by Author / Discuss content posted by Jason S Wong  / T-SQL CLR to query session hostname / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sun, 26 May 2013 01:52:47 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: T-SQL CLR to query session hostname</title><link>http://www.sqlservercentral.com/Forums/Topic1309477-1665-1.aspx</link><description>a touch overkill to get the hostname for sessions on your server perhaps?select s.host_namefrom sys.dm_exec_connections C        join sys.dm_exec_sessions S on S.session_id = C.session_IDwhere C.client_net_address = '127.0.0.1'will provide the same information a lot simpler and safer than allowing a CLR on your system with External_AccessHowever as an approach to allow a dns lookup from within sql server this is effective. I wrote something very similar 6 years ago when i was analysing web server logs associated with identifying click fraud and needed to do a lookup and at times a reverse lookup to fill the gaps in the data as provided by the logs.</description><pubDate>Sat, 02 Jun 2012 11:12:10 GMT</pubDate><dc:creator>Bill Galashan</dc:creator></item><item><title>T-SQL CLR to query session hostname</title><link>http://www.sqlservercentral.com/Forums/Topic1309477-1665-1.aspx</link><description>Comments posted to this topic are about the item [B]&lt;A HREF="/scripts/CLR/90565/"&gt;T-SQL CLR to query session hostname&lt;/A&gt;[/B]</description><pubDate>Thu, 31 May 2012 21:55:15 GMT</pubDate><dc:creator>Repriser-991084</dc:creator></item></channel></rss>