🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Server & Configuration Two Messaging Systems That Run Quietly Until They Don’t Service Broker and Database Mail are both messaging infrastructure, and both are easy to forget. Database Mail itself runs on Service Broker in msdb, and it sits idle until something needs…
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Server & Configuration Check for Collation Mismatches and Dependencies Before a migration, rename, or decommission, run Get-CollationConflicts on the target instance and Get-CrossDatabaseDependencies in every database whose objects may reference the one being changed. The first compares online database collations with the server…
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Storage & Capacity Where Compression Actually Pays Off Row and page compression trade CPU for storage and I/O, and that trade is worth making on some tables and not others. The biggest, least-frequently-updated tables are usually the best candidates: maximum space and I/O…
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Server & Configuration “What Changed on This Server Recently?” A query that worked yesterday now errors, a report comes back empty, a job that always succeeded fails, and everyone says nothing changed. Before chasing the symptom, answer the basic question directly: did anything…
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Performance & Troubleshooting The Check Before You Take Anything Offline Taking a database offline, whether for a decommission, a restore, or a maintenance operation that needs exclusive access, starts with the same question: is anyone actually using it right now? Guessing wrong means…
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Server & Configuration Two Features, Same Risk: They Both Grow the Transaction Log Change Data Capture and Change Tracking answer a similar question, “what changed and when,” for two different audiences, ETL/replication consumers for CDC, application-level conflict detection for Change Tracking. They’re unrelated…
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Migration & Deployment You are about to move logins to a new server, or you just did and something cannot log in. These 2 scripts cover both ends: Get-MigrationLoginAudit tells you what each login needs on the target, and Get-PostMigrationValidation gives you 13…
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Migration & Deployment Before You Upgrade: What’s Actually Going to Break Migration Risk Assessment covers per-database risk findings when moving to different hardware or infrastructure. This post covers a narrower, earlier question: on THIS server, staying on the same infrastructure, what needs attention…
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Performance & Troubleshooting › Query & Performance Tuning “What Changed Today” and “Is the Plan I Forced Still Any Good” A query that was fine yesterday is slow today, or a plan you forced has stopped protecting it. The first script compares each…
Almost every SQL Server developer has copied WITH (NOLOCK) onto the end of a query at some point, usually because someone said it “makes queries faster” or “avoids blocking.” Both of those things are technically true. What rarely gets explained is what you’re trading away to get them. WITH (NOLOCK) doesn’t make a query faster…