Skip to content
SQLFolks
Menu
  • Tips & Tricks
  • Indexes
  • Query Hints
  • AI
  • Links
  • Contact

Author: admin

Tips & Tricks

SQL Server Bootcamp 2026 | Brno | Windows User Group – Czech Republic

September 4th, 2026 — from 09:00 to 18:00 Link: SQL Server Bootcamp 2026 | Brno | Windows User Group – Czech Republic Are you interested in the upcoming innovations within …

Tips & Tricks

Shrink Data Files to Appropriate Target Size

If you need to shrink data files for any reason, despite the potential negative impact on future performance due to file growth and fragmentation, this script can be used to …

AI / Tips & Tricks

SQL Studio Generated by AI (Copilot & Claude)

A lightweight SSMS‑style SQL dashboard built in PowerShell and WPF. It loads multiple SQL files as tabs, executes queries across one or more servers, displays results in an embedded browser, …

Tips & Tricks

Availability Group – How to Reduce False Failovers During Short Infrastructure Outages

To reduce false failovers during short infrastructure outages, it is common to increase: 1. LeaseTimeout — communication timeout between SQL Server Availability Group and WSFC from 20s to 60s SQL: …

Query Hints / Tips & Tricks

Unique Incremental Number for Each Inserted Row without Using an IDENTITY Column

If you need to generate a unique incremental number for each inserted row without using an IDENTITY column, you must protect the MAX() value lookup inside a transaction. This prevents …

Tips & Tricks

Database in SUSPECT State Due to DTC: How to Resolve

DATABASE REPAIR CHECKLIST Step 1 — Find the stuck distributed transaction If you see a GUID → go to Step 2.If you see all zeros → go to Step 3. …

Indexes / Tips & Tricks

SQL Index Creation Tutorial (Part 3): Composite Index Construction

Example: Estimated Execution Plan: 1. Open the index properties and select the Predicates section: 2. Copy the content: 3. Paste it into a prepared query and clean up the unnecessary …

Tips & Tricks

How to Enable SQL Email in SQL Express with T‑SQL

Query Hints / Tips & Tricks

Optimize Linked Server Performance with MAXDOP Settings

The working solution is to set Openquery:

Indexes / Tips & Tricks

SQL Index Creation Tutorial (Part 2): Performance and Execution Plans

Data source: Original query Estimated Execution Plan 1 Estimated Subtree Cost: 586.232 → far too high, indicating long execution time and heavy server load. The plan shows: Creating indexes Index …

Posts navigation

Older posts
SEARCH:

Brent Ozar’s Blog

“But NOLOCK won’t hurt me if I’m using an index!”
“But NOLOCK won’t hurt me if I’m using an index!”

NOLOCK is bad and you probably shouldn’t use it, but every time I mention that publicly, the pushback just keeps coming. I don’t know why people so firmly believe that their [...]

[Video] Office Hours on Mount Charleston
[Video] Office Hours on Mount Charleston

For this episode, I’m up in the mountains just outside Vegas, enjoying the nice cool temperatures, spending the weekend at Mount Charleston. Let’s go through your top-voted questions from https://pollgab.com/room/brento. [...]

Database Animations: How SQL Server’s JSON Indexes Work
Database Animations: How SQL Server’s JSON Indexes Work

By popular demand, SQL Server 2025 added JSON indexes. You can eat the cake of being able to store practically schema-less JSON blobs as part of each row, and have [...]

Set Your Application Names Before You Wish You Had.
Set Your Application Names Before You Wish You Had.

When you run monitoring queries like sp_BlitzWho and sp_WhoIsActive, you wanna see the program names that are running the queries. It’s super useful when you’ve got multiple apps running on [...]

Copyright © 2026 SQLFolks – OnePress theme by FameThemes