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
SQL SERVER - 2005 - Retrieve Processes Using Specified Database

SQL SERVER – 2005 – Retrieve Processes Using Specified Database

March 15, 2008
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL System Table

Jim Sz shared a quick script to retrieve processes that use a specific database from sys.sysprocesses, with spid, status, host name and login.

Read More
Diagram of CLR inside SQL Server: a SQL query enters the query processor, which uses the SQL CLR module and the CLR hosting module; SAFE code reaches the database through the engine, EXTERNAL_ACCESS reaches files, registry and network, and UNSAFE reaches native and COM DLLs

SQL Server CLR: The Common Language Runtime Inside the Engine

March 14, 2008
Pinal Dave
SQL Tips and Tricks
CLR, SQL Function, SQL Server, SQL Server Architecture, SQL Stored Procedure

SQL Server CLR means running .NET code, such as C# stored procedures, inside SQL Server. A diagram shows how the pieces fit, and why CLR helps with the cursors and loops that slow down T-SQL.

Read More
SQL SERVER - FIX : Error : 3702 Cannot drop database because it is currently in use - Part 2

SQL SERVER – FIX : Error : 3702 Cannot drop database because it is currently in use – Part 2

March 13, 2008
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Scripts

Still see Error 3702, cannot drop database because it is currently in use? Why closing Management Studio works and how to find the connection.

Read More
SQL SERVER - 2005 - Find Nth Highest Record from Database Table - Using Ranking Function ROW_NUMBER

SQL SERVER – 2005 – Find Nth Highest Record from Database Table – Using Ranking Function ROW_NUMBER

March 12, 2008
Pinal Dave
SQL Performance
MVP, SQL Function, SQL Joins, SQL Scripts

Nicholas Paldino shared a neat way to find the Nth Highest Record from a table in SQL Server 2005 using the ranking function ROW_NUMBER. Here is his query.

Read More
SQL SERVER - How to Retrieve TOP and BOTTOM Rows Together using T-SQL - Part 3

SQL SERVER – How to Retrieve TOP and BOTTOM Rows Together using T-SQL – Part 3

March 11, 2008
Pinal Dave
SQL Performance
SQL Function, SQL Joins, SQL Scripts

Part 3 on how to retrieve TOP and BOTTOM rows together: Dave Arthur’s solution uses UNION ALL instead of an OR clause, and it is quite good.

Read More
Gouache painting of two groups of record cards connected by a stone bridge

Top and Bottom Rows With a CTE in SQL Server: Part 2

March 10, 2008
Pinal Dave
SQL Tips and Tricks
CTE, SQL Scripts, SQL Top, SQL Union clause

Top and bottom rows with a CTE come from two ordered queries, one for each end of the table. This follow-up tests the reader’s single-CTE version and a two-CTE version on SQL Server 2025. It also compares a ROW_NUMBER version that read 336 pages against 4 for TOP, and shows what ties, empty tables and one-row tables return.

Read More
A small garden gate with a latch polished bright from use beside a grand iron gate rusted shut.

Finding the Most Frequently Run Queries

March 9, 2008
Pinal Dave
SQL Performance
Query Store, SQL Cache, SQL CPU, SQL DMV, SQL Server

Most frequently run queries can consume large SQL Server resources even when each call is fast; use plan cache and Query Store to find them.

Read More
Previous 1 … 770 771 772 773 774 775 776 … 845 Next
  • Books
  • Testimonials
  • Privacy Policy

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