SQL server

External hosts connecting to SQL server.

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
on doh.default_memory_clerk_address=domc.memory_clerk_address

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.

Advertisements
Standard

Thinking about someting? Leave a Reply...

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s