-- Code and scripts from Chapter 3: Configuration -- The following query returns the protocol used -- for the current connection: SELECT net_transport FROM sys.dm_exec_connections WHERE session_id = @@SPID; GO -- You can observe when SQL Server is executing a query -- in parallel by querying the DMV sys.dm_os_tasks. -- A query that is running on multiple CPUs will have -- one row for each thread. SELECT task_address, task_state, context_switches_count, pending_io_count, pending_io_byte_count, pending_io_byte_average, scheduler_id, session_id, exec_context_id, request_id, worker_address, host_address FROM sys.dm_os_tasks ORDER BY session_id, request_id; GO -- You can determine the specific value for each -- configuration option by using the following statement: SELECT * FROM sys.configurations ORDER BY name; GO