Store transient session state in memory-optimized SQL Server tables with native reads and writes, expiry checks, and clear durability rules.
Memory-Optimized Tables as a Key-Value Cache
Build a key-value cache with SCHEMA_ONLY memory-optimized tables, native get and set procedures, expiry checks, and bounded cleanup.
Attach an In-Memory Database With T-SQL: Include the Container
To attach an In-Memory database with T-SQL, use CREATE DATABASE with FOR ATTACH and list the data file, the log file and, when it moved, the container folder. This post builds a demo database, detaches it and attaches it twice. It also shows which rows survive.
SQL SERVER – Attach a Database with T-SQL
To attach a Database with T-SQL, I use CREATE DATABASE … FOR ATTACH. A customer asked about attaching existing data and log files.
Memory-Optimized TempDB Tables: List Them and Check Status
Memory-optimized TempDB tables are the system tables that SQL Server 2019 and later can keep in memory. This post shows two queries: one that checks whether the feature is on, and one that lists the tables it covers. It also explains the limits that come with the feature.
Metadata Contention in TempDB: When Memory-Optimized Metadata Helps
Metadata contention in TempDB happens when many sessions create and drop temporary tables at the same moment. This post reads the waits that point to it, explains why RESOURCE_SEMAPHORE is a different problem, and shows how SQL Server 2019 and later can keep that metadata in memory.







