By default, SQL Server Management Studio limits the number of characters displayed per column when using Results to Text. The default limit is 256 characters. If a query or system stored procedure returns more than that, the output is silently truncated. You get partial results, which is often worse than getting an error. This post…
Data retention in SQL Server usually means deleting old data in a controlled and repeatable way. That might be driven by compliance requirements, table growth that’s starting to hurt performance, SQL Server Express size limits, or simply keeping log and audit tables under control. Whether this is a one-off cleanup or a permanent maintenance task,…
Part of the DBA-Tools Project. Most production SQL Server environments have backup jobs configured. The question that actually matters is whether those jobs are running, and succeeding, for every database that needs them. A database added last month might never have been folded into the backup plan. A job that’s been failing silently for weeks…
Part of the DBA-Tools Project. Every sp_configure setting on an instance tells a small story: a value someone changed deliberately, a value nobody’s touched since install, or a value that’s been changed but is still waiting for a restart to actually take effect. Without a full snapshot, most of that story is invisible, and configuration…
In SQL, you will often see queries written using WHERE 1=1 or WHERE 1=2. At first glance, both look pointless. One is always true, the other always false. In practice, both are deliberate patterns used for query construction and control, not filtering logic. They exist to make SQL safer, easier to manipulate, and more predictable…
Part of the DBA-Tools Project. Max Degree of Parallelism is one of the first things worth checking on any server, and one of the most commonly wrong. The default of 0 lets a single query use every scheduler on the box, which sounds efficient until 20 concurrent OLTP queries all decide to go parallel at…
Part of the DBA-Tools Project. Max Server Memory is the single most important memory setting on any SQL Server instance, and it’s astonishing how often it’s left unconfigured. Without a cap, SQL Server will happily consume nearly all available RAM for its buffer pool, leaving too little for the OS, and on a box running…
Running PowerShell as Administrator is required for many system-level tasks such as configuring Windows, installing software, or running administrative scripts. If a command fails unexpectedly, one of the first things to verify is whether the PowerShell session is actually elevated. Below are the most reliable ways to open PowerShell with elevated privileges on Windows. Quick…
Part of the DBA-Tools Project. Version and edition are two of the most basic facts about a SQL Server instance, and two of the easiest to get wrong when you’re relying on memory or an out-of-date wiki page. Whether a feature is available, whether a security patch has actually landed, and how many cores or…
The USE command changes the database context for the current session. Every statement in SQL Server runs in the context of a database. When you run USE, you are telling SQL Server which database subsequent statements should execute against until the context changes again or the session ends. That single behaviour explains a lot of…
Always On Availability Groups (4) Auditing (7) Backups (5) Blocking Locking (6) Collectors (7) Database Backups & Recovery (8) Database Backups and Recovery (5) Database Maintenance (7) DBA Tools (24) Disk Space (5) Extended Events (8) Features (6) High Availability (6) Indexes (7) Installation (7) Instance (3) Inventory (6) Jobs (3) Maintenance (6) Migration (13) Monitoring (24) Performance (21) Performance Troubleshooting (9) PowerShell (4) Queries (3) Query Behaviour (5) Security (7) SQL Agent (5) SQL Scripts (17) SQL Server Administration (10) SQL Server Configuration (7) SQL Server Errors (5) SQL Server High Availability (4) SQL Server Internals (3) SQL Server Management Studio (SSMS) (6) SQL Server Monitoring (7) SQL Server Networking (9) SQL Server Security (7) Storage and Capacity (7) T-SQL (9) Temp DB (3) Tracing (7) Transaction Logs (4) Troubleshooting (14) Windows Server (4)