Home > Ask the SQL Server Experts > Denny Cherry - Performance Tuning Questions & Answers > How to retrieve SQL Server database disk space in use
Ask The SQL Server Expert: Questions & Answers
EMAIL THIS

How to retrieve SQL Server database disk space in use

Denny Cherry EXPERT RESPONSE FROM: Denny Cherry

Pose a Question
Other SQL Server Categories
Meet all SQL Server Experts
Become an Expert for this site


Expert advice on database administration
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


>
QUESTION POSED ON: 11 March 2008
I am trying to retrieve the current amount of disk space being used by our SQL Server databases. I'd like to enter the results into a table where I can use the fields to populate a report. How can I find this information?

>
EXPERT RESPONSE
The current size of the data files can be found within the SQL Server. You can use the sysaltfiles table (system view in SQL Server 2005 and up) to see how large each file is.

SELECT name, filename, (size*8)/1024
FROM sysaltfiles.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


RELATED CONTENT
SQL Server overview
Storing and searching for image files in SQL Server
Can you shrink your SQL Server database to death?
Physical data storage in SQL Server 2005 and 2008
SQL Server 2008 data types: Datetime, string, user-defined and more
SQL Server and data manipulation in T-SQL
Supertype and subtype tables in SQL Server
Enforcing data integrity in a SQL Server database
SQL Server database design disasters: What not to do
Using SQL Server datetime functions GETDATE, DATENAME and DATEPART
Tuning SQL Server performance via memory and CPU processing
SQL Server overview Research

SQL Server database design and modeling
SQL Server database design disasters: How it all starts
Physical data storage in SQL Server 2005 and 2008
SQL Server 2008 data types: Datetime, string, user-defined and more
Enforcing data integrity in a SQL Server database
SQL Server and data manipulation in T-SQL
Supertype and subtype tables in SQL Server
SQL Server database design disasters: What not to do
Check SQL Server database and log file size with this stored procedure
SQL Server tempdb best practices increase performance
FAQ: SQL Server databases how-to

Denny Cherry - Performance Tuning
Upgrading to SQL Server 2008 advantages and hardware requirements
Tool to synchronize two SQL Server databases
SQL Server tools don't appear in menu after SQL Server 2005 install
Troubleshoot SQL Server 2005 temporary table performance problems
Maintain large SQL Server database and resolve website 'Timeout Error'
Use SQL Profiler to find long running stored procedures and commands
Performance tuning for SQL Server 2005 and Exchange running on SBS
Upgrade databases to SQL Server 2005 after server upgrade
Upgrade to SQL Server 2005 or SQL Server 2008?
Merge replication to keep SQL Server databases in sync

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
application server  (SearchSQLServer.com)
comma-separated values file  (SearchSQLServer.com)
DDBMS  (SearchSQLServer.com)
entity-relationship model  (SearchSQLServer.com)
full-text database  (SearchSQLServer.com)
intelligent database  (SearchSQLServer.com)
OLE DB  (SearchSQLServer.com)
Quiz: Database Basics  (SearchSQLServer.com)
relational database management system  (SearchSQLServer.com)
SQL Server  (SearchSQLServer.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice

HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2005 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts