This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
Asparagus shoots growing in close groups separated by a broad patch of bare soil

Sessionizing Events: Grouping Activity Into Sessions by Idle Gap

July 9, 2019
Pinal Dave
SQL Tips and Tricks
SQL Activity Monitor, SQL Extended Events, SQL Server

Your events have a user and a time but no visit ID. Here is how to infer sessions from an idle gap with LAG and a running sum.

Read More
Gouache painting of two matching teapots wearing each other's lids, one lid vermilion

Logical Name Mismatch: master_files vs database_files

July 8, 2019
Pinal Dave
SQL Tips and Tricks
AlwaysOn, SQL DMV, SQL Error Messages, SQL System Table

A logical name mismatch means sys.master_files and sys.database_files disagree about a file name. A tested demo shows both views on one server, and a script checks every database. The post explains the secondary replica case and its fix.

Read More
A small potted plant is connected to a larger source plant

What is Source_Database_ID in Sys.Databases?- Interview Question of the Week #232

July 7, 2019
Pinal Dave
SQL Interview Questions and Answers
Snapshot, SQL High Availability, SQL Scripts, SQL Server, SQL System Table

Question: What is Source_Database_ID in Sys.Databases and why it is mostly NULL? Very interesting question, I received indeed.

Read More
Gouache painting of a jammed grain chute in a barn with sacks piled high and the top sack in vermilion

sysxmitqueue in msdb: Why It Grows and How to Clear It

July 6, 2019
Pinal Dave
SQL Tips and Tricks
Service Broker, SQL Scripts, SQL Server, System Database

Sysxmitqueue in msdb fills up when Service Broker messages cannot leave the server. A tested demo in its own database shows the pile, the reason, a one conversation cleanup and the NEW_BROKER reset. The msdb steps follow the same order.

Read More
CLONEDATABASE

SQL SERVER – DBCC CLONEDATABASE Error – Msg 2601: Cannot Insert Duplicate Key Row in Object ‘sys.sysowners’ With Unique Index ‘nc1’.

July 5, 2019
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Server, SQL Server DBCC, SQL Server Security

Another DBCC CLONEDATABASE error, Msg 2601: cannot insert duplicate key row in object ‘sys.sysowners’. Here is why it happens and the workaround.

Read More
CLONEDATABASE

SQL SERVER – DBCC CLONEDATABASE Error: Cannot Insert Duplicate Key Row In Object ‘sys.sysschobjs’ With Unique Index ‘clst’.

July 4, 2019
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Scripts, SQL Server, SQL Server DBCC, SQL System Table, System Database, System Object

Learn how to fix: Cannot insert a duplicate key row in object ‘sys.sysschobjs’ with unique index ‘clst’ while using DBCC CLONEDATABASE.

Read More
Gouache painting of a sand timer with vermilion sand between two trays of pears on a wooden table

CHECKPOINT Impact on Memory: Watch Dirty Pages Go to Zero

July 3, 2019
Pinal Dave
SQL Performance
SQL DMV, SQL Memory, SQL Scripts

CHECKPOINT impact on memory is easy to measure. This post counts the dirty and clean pages of one database before and after a checkpoint. Dirty pages drop to zero, the clean pages grow by the same amount, and nothing leaves memory.

Read More
Previous 1 … 155 156 157 158 159 160 161 … 843 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com