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
A wooden toy train with its colored carriages uncoupled and laid in a straight line on the floor, engine at the front.

STRING_SPLIT and Its Ordinal Column

February 10, 2010
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Server, SQL Server 2022, SQL String

STRING_SPLIT and its ordinal column preserve token positions when you request the third argument and sort by ordinal in SQL Server.

Read More
Gouache painting: two shallow pastry boxes sit end to end on a bakery counter, each holding a single row of identical tarts

smalldatetime: Minute Rounding Can Change the Day

February 9, 2010
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts, SQL Server

smalldatetime does more than hide seconds. These explicit conversions show minute rounding and a midnight carry, with complete original timestamps retained.

Read More
SQL SERVER - Find the Size of Database File - Find the Size of Log File

SQL SERVER – Find the Size of Database File – Find the Size of Log File

February 8, 2010
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL System Table, Transaction Log

A quick script on sys.master_files to find the size of database file and log file in MB. Remove the WHERE clause to see every database on the server.

Read More
Gouache painting: seven wooden stakes stand in a straight row across a white lime line marked on grass, with an apple orchard plot on one side and a pear orchard plot on the other

ISO Week Numbers: Find the Matching ISO Week Year

February 7, 2010
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts, SQL Server

ISO week numbers can belong to a different year from the calendar date. A Thursday-based calculation keeps the ISO year and week together across December and January.

Read More
Pebbles moving through a capture channel in a coastal workshop.

CDC Capture Lag: Read sys.dm_cdc_log_scan_sessions

February 6, 2010
Pinal Dave
SQL Tips and Tricks
Change Data Capture, SQL Monitoring, SQL Server, Transaction Log

CDC capture lag measures work committed at the source that the capture process has not yet exposed. Compare known markers, scan sessions and captured LSNs, and distinguish capture progress from a downstream consumer reading the changes.

Read More
SELECT COUNT (*) dialog from humanresources.

SQL SERVER – Stream Aggregate Showplan Operator – Reason of Compute Scalar before Stream Aggregate

February 5, 2010
Pinal Dave
SQL Tips and Tricks
SQL Scripts

Stream Aggregate is a common showplan operator, even in a simple COUNT(*) plan. I explain why a Compute Scalar often shows up right before it.

Read More
SQL SERVER - Get the List of Object Dependencies - sp_depends and information_schema.routines

SQL SERVER – Get the List of Object Dependencies – sp_depends and information_schema.routines

February 4, 2010
Pinal Dave
SQL Tips and Tricks
SQL Dependency, SQL Scripts, SQL Server, SQL Server Security, SQL System Table

sp_depends can return wrong dependency results where information_schema.routines gets it right. See where it fails and the DMVs recommended in its place.

Read More
Previous 1 … 661 662 663 664 665 666 667 … 841 Next
  • Books
  • Testimonials
  • Privacy Policy

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