Jun 2026 Discount: Comprehensive Database Performance Health Check | Testimonials

Home
  • Consulting
  • Training
  • Free Videos
  • All Articles
    • Interview Questions and Answers
    • SQL Tips and Tricks
    • SQL Performance
    • SQL Puzzle
    • Big Data
    • Blog Stats
    • SQL Books
  • Hire Me
  • Health Check

SQL SERVER – 2005 – Retrieve Processes Using Specified Database

March 15, 2008
Pinal Dave
SQL, SQL Server, SQL Tips and Tricks
SQL Scripts, SQL System Table
Blog Reader Jim Sz posted quick but very interesting script. If user want to know how many processes are there in any particular database it can be retrieved querying sys.processes database. USE master GO DECLARE @dbid INT SELECT @dbid = dbid FROM sys.sysdatabases WHERE name = 'AdventureWorks' IF EXISTS (SELECT…
Read More
  • SQL Interview Q & A
  • Testimonials
  • Search
  • Privacy Policy

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

Go to mobile version