• Pingback: Tweets that mention How much memory is each SQL Server database using? | John Sansom - SQL Server DBA in the UK -- Topsy.com

  • Pingback: SQL Server Memory Configuration and MemToLeave | John Sansom - SQL Server DBA in the UK

  • Geo

    I never knew that we could calculate the memory utilization of each DB!!! It was very helpful. Thanks.

  • rahul

    it was good.
    it help me lot………..

  • Claire

    Quick and nice way of getting memory usage, this query certainly works on both SQL 2005 and 2008…

  • Pingback: The SQL Server Buffer Pool and Buffer Cache Hit Ratio

  • http://www.hitgrove.net/ Hitgrove

    yeah… finally i got to know how much space a database can have 

  • Pingback: Performing fast SQL Server delete operations

  • Vaishu105

    hii can u please tell me the query to find the db size.. :) 

    • http://www.johnsansom.com/ John Sansom

      There are quite a few different ways you can achieve this. If you just want to look at the overall database size you can use the system stored procedure sp_helpdb. If you want to look at the size of each database data/log file individually then you can run the following query from Pinal Dave’s blog I hope this helps.

  • daniel

    Hey Great article, is this page count in MB or kilobytes? thanks

    • http://www.johnsansom.com John Sansom

      Hi Daniel,

      Page count is the number of 8KB pages. So the following should give you what you want:

      (COUNT (*) * 8) / 1024

  • Pingback: SQL Server Memory Configuration and MemToLeave

  • daniel

    HI John,

    I stumbled upon your website via Kevin Kline’s web site. I really enjoyed your website and what you have posted. It is very didactic and fun as well. One of the blogs that I like is the “Over-confidence” blog when you ran the query to create a Subscriber on a Publication….then it created locking…. I was thinking that if this happened to me, I would probably peed on my pants!-:)
    Great blog!

    Best of luck,
    Daniel.

    • http://www.johnsansom.com John Sansom

      Daniel – delighted you discovered the blog sir! No one is perfect, which is why I try to share posts that are authentic as well as helpful. The time you describe was certainly a nerve wracking moment for me but thankfully pee free. It’s experiences such as this when a Data Professional really earns their keep, as well as provide opportunities for reflection and growth. Certainly helps to keep things interesting ;-)

      Thanks for your comments.

  • Pingback: SQL Server memory consumption by database | Enterprise IT Notes