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
Gouache painting of a water wheel at a stream mill with a single vermilion bucket among gray ones

WHILE 1 = 1 Loop in T-SQL: Run Forever, Stop Safely

November 30, 2020
Pinal Dave
SQL Tips and Tricks
Best Practices, SQL Scripts, SQL Server

A WHILE 1 = 1 loop never ends on its own, so every one needs a planned exit. This post builds a once-a-second sampler with three ways out, a stop flag, a round limit and a time limit, then shows how to stop a loop from a second window and what the recursion limit does.

Read More
Gouache painting of a long curved sandy path around a lawn with a vermilion wheelbarrow standing on the grass

Default Query Shortcuts in SSMS: Alt+F1, Ctrl+1 and Ctrl+2

November 26, 2020
Pinal Dave
SQL Tips and Tricks
SQL Server, SQL Server Management Studio, SQL Shortcut

The default query shortcuts in SSMS are Alt+F1, Ctrl+1 and Ctrl+2, and each runs a system procedure on the text you select. This post shows what sp_help, sp_who and sp_lock return, why sp_lock has a better replacement, and which keys you can change.

Read More
A local doorway is inspected separately from the longer route beyond the courtyard.

SQL SERVER – Database Engine TCP Port and Browser UDP Port

November 24, 2020
Pinal Dave
SQL Tips and Tricks
Computer Network, SQL Scripts, SQL Server

I inspect TCP listeners to find the actual Network port in use. A customer wanted a query rather than an assumption.

Read More
Three vessels retain a supplied tag, an older tag and an empty tag loop.

SQL SERVER – Capturing INSERT Timestamp in Table

November 23, 2020
Pinal Dave
SQL Tips and Tricks
SQL Constraint and Keys, SQL DateTime, SQL Scripts, SQL Server

A default can insert timestamp values when the caller omits a datetime column. I use a session-local CURRENT_TIMESTAMP example.

Read More
Gouache painting of a pegboard with a spoon, a vermilion-handled screwdriver, a brush, a scoop and a mallet hanging in a row

Custom Query Shortcuts in SSMS: Run Your Own Procedure

November 19, 2020
Pinal Dave
SQL Tips and Tricks
SQL Server Management Studio, SQL Shortcut, SQL Stored Procedure

Custom query shortcuts in SSMS run a stored procedure of your own on the text you have selected. This post writes a small procedure that explains any session, tests it the way the shortcut calls it, assigns it to a free key, and explains which keys you can use.

Read More
Repeated source tiles sit beside a distinct selection tray and a separate two-tile jig.

SQL SERVER – Logical Processing Order of the SELECT Statement

November 18, 2020
Pinal Dave
SQL Tips and Tricks
SQL Operator, SQL Performance, SQL Scripts, SQL Server

Logical Processing places DISTINCT before TOP in a SELECT statement. Questions after my video prompted this explanation.

Read More
A row of market shutters locked with heavy padlocks at night, one held shut only by a twist of wire.

CHECK_POLICY and CHECK_EXPIRATION for SQL Logins

November 16, 2020
Pinal Dave
SQL Tips and Tricks
DBA, SQL Login, SQL Password, SQL Server Security

Audit CHECK_POLICY and password expiration for SQL logins, inspect LOGINPROPERTY evidence, and plan safe service-account exceptions.

Read More
Previous 1 … 41 42 43 44 45 46 47 … 570 Next
  • Books
  • Testimonials
  • Privacy Policy

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