The sys.dm_os_hosts DMV can be used to track the resources used by hosts external to the SQL Server executable. SQL allows these hosts to allocate memory and participate in non-preemptive scheduling. The hosts can be one of the following
SOSHOST_CLIENTID_SERVERSNI= SQL Server Native Interface
SOSHOST_CLIENTID_SQLOLEDB = SQL Server Native Client OLE DB Provider
SOSHOST_CLIENTID_MSDART = Microsoft Data Access Run Time
To see the memory used by these hosts use the following TSQL to connect with sys.dm_os_memory_clerks:
select * from sys.dm_os_hosts doh
left join sys.dm_os_memory_clerks domc
I want to test this out by creating a host process using OLE DB and seeing if I can track it by the host_address. It would be fun to see the memory usage live. The main reason I am doing this is to see what exactly ‘external hosts’ mean. If anybody has a good explanation, please comment below.