.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

Space usage - Database

Posted By:      Posted Date: September 21, 2010    Points: 0   Category :Sql Server

Hi Gurus,

My sql server 2005 instance has 83 databases. I would like to know how much space is being used by all the databases and top 5 list. Please let me know how to get this information.





View Complete Post

More Related Resource Links

MDW Disk Usage for Database Report Error - A data source has not been supplied for the data source D

Hello, On the MDW Disk Usage Collection Set report, I get the following error when I click on a database hyperlink. A data source has not been supplied for the data source DS_TraceEvents SQL profiler shows the following SQL statements are executed (I've replaced the database name with databaseX) 1. exec sp_executesql N'SELECT dtb.name AS [Name] FROM master.sys.databases AS dtb WHERE (dtb.name=@_msparam_0)',N'@_msparam_0 nvarchar(4000)',@_msparam_0=N'databaseX' this returns zero rows as databaseX does not exist on my MDW central server, but is a database on a target server (i.e. one that is being monitored and uploaded into the MDW central server). 2. USE [datatbaseX] this produces the following error: Msg 911, Level 16, State 1, Line 1 Database 'databaseX' does not exist. Make sure that the name is entered correctly. why is the report looking for the database on my server? thanks Jag Environment: MDW (Management Data Warehouse) on SQL 2008 R2  

how to do sharepoint database disk usage analysis and selective replication?



I have a SharePoint 2007 database that is 16GB in size and I want to know why, and how I can reduce the size. Ideally I would like a trimmed replica to use as a developer workstation that retains a good sample data set, and has the ability to be refreshed.

Can you please tell me if there are any third party tools or other methods to accomplish this? I have found the Microsoft tool (stsadm) to be very limited in this regard.

Many thanks.

Do I need free space when doing full database restore in SQL Server 2005?


I have a drive 'F' with 40G free space. I try to restore a database whose data + log file size is 60G.

The restore fails. Is it because a full restore needs  free disk space of 60G in this case?


How can I reclaimed Content Database space.

I recently deleted a very large amount on data from a site (~500 gigs).  Unfortunately the database still shows a size of 570 gigs to the operating system.  When I did a stsadm -o ENUMSITES -url thesite.  It shows onyl 112 gig of used storage space.  I have run the DefragIndices from this KB article http://support.microsoft.com/kb/943345.  What else can I do to reclaim this space.  We are extremely close to filling up this drive array.  Thanks.

How do I limit size of Usage ( Usage and Health Data Collection ) database size please?



How do I control the size of my usage database ( Usage and Health Data Collection database ) in SP2010 so it never exceeds a certain size?

Its not clear how you do this - does anyone know? I want to set it so it never exceeds 100 GB in size but logs pretty much everything.

Thanks in advance,


T-SQL for database size and space available (like on Database Properties page on SQL 2008 SSMS)


How can i (using T-SQL) get the database size and free space like the database properties page of SQL 2008 SSMS shows? I want to be able to display that information in our software.


Replace special character with space throughout the database



My requirement is to replace the special characters with space throughout the databse. How can I do this? I am new to this sql server. So any one could you please help me in this aspect.

Thanks in advance

Could not allocate space for object 'dbo.WebProxyLog'.'IX_WebProxyLog_DateTime' in database 'w3

I have a SQL Server 2008 running on Windows 2008.

The main database is located on the D: drive and the total capacity of the disk drive is 435GB.

I have started to receive the following messages in the error log file:
"Could not allocate space for object 'dbo.WebProxyLog'.'IX_WebProxyLog_DateTime' in database 'w3proxy' because the 'PRIMARY' filegroup is full".

The database "w3proxy" has totally filled the D: dirve and there nothing else to delete on the D: drive to free some disk space.

At the moment I am unable to get an extra disk drive which I believe would solve the disk space problem.

But can anyone suggest any other way to free up the disk space until I can get an extra disk drive?

Thank you.

Question about unallocated space and unused space in a database


Hi, every expert,

I am running SQL server 2008 SP1, I've got a question about unallocated space and unused space in a database.

In my DB I run sp_spaceused as follows:

exec sp_spaceused 'DB_00001'

database_name database_size unallocated space


DB_00001 2004.13 MB 49.64 MB

reserved data index_size unused

------------------ ------------------ ------------------ --------------

1531248 KB 412720 KB 165168 KB 953360 KB

Question 1: As I understand, the unallocated space is never used by the database, while the unused space is once used by database but got freed by deleting etc (I mean deleting only removes part of the pages in section, for removing all the pages in section, see my 2nd question) ..am I correct?

Question 2:  if the deleting operation frees up the whole section, will the free section show as unallocated space? If the answer is no, how does SQL server handle this free section?

Question 3: If we shrink the datafile using the TRUNCATEONLY option, according to my understanding, the unallocated space can certainly be freed up as the following statement in Book Online, am I correct?

TRUNCATEONLY Releases all free space at the end of the file to the operating system but does not perform any page mov

WSS 3 Storage Space vs. Database File Size


Our SharePoint (WSS 3.0) databases are on a SQL-2000 server that's starting to get low on disk space. In order to buy some time to move content into either our MOSS or SP-2010 environment we did some cleanup in SharePoint by archiving & removing several old sites and removing older document versions in a couple of libraries. These changes were made 3 days ago. The Site Settings | Storage Space Allocation page indicates that content size is a little under 37 GB, down from a bit more than 40 GB. (I did make sure that the deleted files / versions were also removed from the site collection recycle bin.)

What has us puzzled is that the physical database file on the SQL Server has not gotten smaller and the amount of "free space" that can be reclaimed has actually gone down - it's currently at about 200 MB. The database file size is over 57 GB; 20 GB larger than SharePoint reports.

So, I have a few questions:

  1. Is it normal for the content database file size to be significantly (50-60%) larger than the amount of content that SharePoint reports?
  2. Is it normal for the database not to get smaller (or at least have more internal free space) when a large amount of content is removed?
  3. Is there any way that we can recover some of this space to get some breathing room on the SQL Server?



database usage suddenly got spark


Hi there,

i got a question.. i'm new with my company and with sql server. i realized one issue with my db here. everyday at 7.30 am till 8.30 am the db usage will got spark, the server will out of synch and we got server down.. but when i stay on that time to check what is running, i found out nothing is running at that time. no processes no scheduled activity. is there any way to know what is hidden running so that i will know what cause for this issue.




Multiple database support with Entity Framework

One of the features introduced in Entity Framework is being database independent. Which mean each database provider can support Entity Framework by implementing its provider.

This feature allows you build applications independent from the underplaying database provider. In this post I'm going to show how to build an application that support multiple databases using same conceptual model made by Entity Framework.

Export Visio Database Table Names to Excel

If you use the Enterprise Architect edition of Microsoft Visio for data modeling regularly, then there is a good chance that at some point you've wanted to export just the table names into Excel. You might want to do this to map logical ERD entities to physical data model tables, track project status by entity, or track overlap between database versions.

MS SQL Server: Disconnect Users From Database - Kill User Session

If you ever wanted to restore your database from a SQL backup file (.bak), but there are still users connected to your database, the backup operation will fail causing the error: Exclusive access could not be obtained because the database is in use.

Publishing SQL Server Database using Publishing Wizard : Tips & Tricks

We can use SQL Server Publishing Wizard to deploy our local Database to remote hosting server/production server.This feature is available in SQL Server 2008/VWD 2008.

Below is the complete step by step guide of this process.

Adding Rows in GridView without using a Database

This article describes on how to add rows in GridView without using a database. Basically the GridView will be populated with data based on the values entered in the TextBox on Button Click and retain the GridView data on post back.

Adding Multiple Columns and Rows in GridView without using a Database

This article describes on how to add multiple columns and rows in GridView without using a database. Basically the GridView will be populated with data based on the values entered in each TextBoxes on Button Click and retain the GridView data on post back.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend