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
Command window displaying PowerShell session.

SQL SERVER – Powershell – Get a List of Fixed Hard Drive and Free Space on Server

November 27, 2011
Pinal Dave
SQL Tips and Tricks
PowerShell, SQL Scripts, SQL Stored Procedure

A PowerShell way to get a list of fixed hard drives and free space on server: MVP Ravikanth’s short script with Get-WmiObject and Win32_LogicalDisk.

Read More
SQL Server xp_dirtree window.

SQL SERVER – Get Directory Structure using Extended Stored Procedure xp_dirtree

November 26, 2011
Pinal Dave
SQL Tips and Tricks
SQL Stored Procedure

Need to list a directory structure from T-SQL? The undocumented xp_dirtree procedure does it, and here is how to save its output in a temp table.

Read More
Rinsed empty milk bottles on a doorstep at dawn waiting for reuse, one still wearing a red foil cap.

Temp Table Caching: Why Some Temp Tables Get Reused

November 1, 2011
Pinal Dave
SQL Performance
SQL Server, SQL Statistics, SQL Stored Procedure, SQL TempDB, Temp Table

Understand temp table caching in stored procedures, avoid cache blockers, inspect creation counters, and review retained statistics.

Read More
A reusable pattern stamp and a hinged working jig serve visibly different tasks.

SQL SERVER – Question to You – When to use Function and When to use Stored Procedure

June 4, 2011
Pinal Dave
SQL Interview Questions and Answers
SQL Function, SQL Server, SQL Stored Procedure

Deciding when to use functions or stored procedures depends on the caller and required work. I want examples behind that choice.

Read More
SQL SERVER - 2012 - Executing Stored Procedure with Result Sets

SQL SERVER – 2012 – Executing Stored Procedure with Result Sets

April 28, 2011
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Stored Procedure

Denali lets you execute a stored procedure with result sets and rename its columns at run time, with no temp table needed. Here is a quick script.

Read More
Dairy cows walking home along a farm lane at dusk, one cow lagging far behind at a bend.

Finding the Slowest Stored Procedures With sys.dm_exec_procedure_stats

April 26, 2011
Pinal Dave
SQL Performance
SQL DMV, SQL Performance, SQL Server, SQL Stored Procedure

Find the slowest stored procedures with cache statistics, compare CPU and reads, and use two snapshots to isolate one busy hour.

Read More
Execution plan of SQL Server query.

SQL SERVER – System Stored Procedure sys.sp_tables

October 17, 2010
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Stored Procedure, SQL System Table

Most people run SELECT * FROM sys.tables to list tables. If you do not need all those details, sys.sp_tables returns tables and views with schema names.

Read More
Previous 1 … 16 17 18 19 20 21 22 … 35 Next
  • Books
  • Testimonials
  • Privacy Policy

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