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 meadow with one wide worn path and a vermilion stile at its start

Frequently Run Stored Procedures: Find Them in the Cache

August 5, 2019
Pinal Dave
SQL Tips and Tricks
SQL Cache, SQL CPU, SQL Scripts, SQL Stored Procedure

Frequently run stored procedures leave an execution count in the plan cache. A tested demo ranks three procedures by count, reads and calls per minute. It also shows what the cache forgets and when to use Query Store instead.

Read More
A small boat leaves a visible wake beyond its old mooring

How to Write in Text File from T-SQL in SQL Server? – Interview Question of the Week #236

August 4, 2019
Pinal Dave
SQL Interview Questions and Answers
SQL Scripts, SQL Server, SQL Server Configuration, SQL Stored Procedure, SQL String

Question: How to Write in Text File from T-SQL in SQL Server?
The question above was actually asked in an interview and also was not asked in the same word.

Read More
Gouache painting of a clay pot beside the vermilion wooden form it was shaped around

Compiled Parameter Values in SQL Server: Read Them From the Cache

May 7, 2019
Pinal Dave
SQL Performance
Execution Plan, SQL Cache, SQL DMV, SQL Stored Procedure

Compiled parameter values show which value SQL Server used when it built a cached plan. This post reads them from the plan cache with one query, then shows how the first caller shapes the plan for everyone after. It ends with the usual ways to break that link.

Read More
A blank wooden fingerpost on a moor, one arm pointing to the stone footings of a vanished cottage

Finding Procedures That Reference Databases That No Longer Exist

March 13, 2019
Pinal Dave
SQL Tips and Tricks
DBA, Dynamic SQL, SQL Dependency, SQL Stored Procedure

Find procedures that reference databases missing from the instance, retain review coverage, and check dynamic SQL and synonyms separately.

Read More
Gouache painting of a slate blue jug on a small wooden pouring stand pouring glaze into a vermilion jar

Dynamic SQL Result Into a Variable with sp_executesql

November 20, 2018
Pinal Dave
SQL Tips and Tricks
Dynamic SQL, SQL Scripts, SQL Stored Procedure, SQL Variable

To get a dynamic SQL result into a variable, use sp_executesql with an OUTPUT parameter. This post tests the pattern on a small demo, explains Msg 214 and shows counts, JSON, new identity values and generic table names. It also covers INSERT with EXEC for result sets.

Read More
Torn continuous printer paper spilling off a bench under a red desk lamp

SQL SERVER – XML Document Could Not be Created Because Server Memory is Low. Use sp_xml_removedocument to release XML documents

October 30, 2018
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Server, SQL Stored Procedure, SQL XML

XML document could not be created, error 6624, on a server with 300 GB free. What OPENXML really costs, measured, and why XQuery is the fix.

Read More
A candle snuffer positioned over one lit candle among several unlit candles

Finding Hard-Coded Passwords in Stored Procedures

August 21, 2018
Pinal Dave
SQL Tips and Tricks
Best Practices, SQL Server, SQL Stored Procedure

A short regular expression can list the procedures that hide a password, without printing it. Here is the scan, its false alarms and its blind spots.

Read More
Previous 1 … 5 6 7 8 9 10 11 … 35 Next
  • Books
  • Testimonials
  • Privacy Policy

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