SQL Server According to Bob

Two guys who work on SQL Server

Month: September 2019

How It Works: SQL Server LOGIN_STATS (sys.dm_exec_sessions)

To track the login statistical information, enable the sp_configure value ‘common criteria compliance enabled‘ setting and restart SQL Server. The sys.dm_exec_sessions DMV is one way to query the statistical login information. The rows shown in this example belong to the sa user on my system. The values are different because the values are obtained when […]

Read More

How It Works: SQL Server Lock Partitioning

Previous posts have discussed partitioning, for example, a partitioned memory object https://blogs.msdn.microsoft.com/psssql/2011/09/01/sql-server-20082008-r2-on-newer-machines-with-more-than-8-cpus-presented-per-numa-node-may-need-trace-flag-8048/ and how a latch maintains the desired access (exclusive, shared, …) https://blogs.msdn.microsoft.com/psssql/2009/01/28/hot-it-works-sql-server-superlatching-sub-latches/ Quick Refresher Over Partitioned Protection/Locking Acquiring shared access requires only the local partition be acquired (lightweight scalability) Acquiring exclusive access requires all partitions be acquired (heavier and can be slower) Shared […]

Read More