Database Size

  • In My Production server i am facing following problem.

    Totally my database size showing 134 GB.But my data size is 10GB and index size is 3 GB.whenever i use this sp_spaceused command.

    i am getting following result

    database_name database_size unallocated space

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

    XYZ 137353.13 MB 122962.30 MB

    reserved data index_size unused

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

    14720464 KB 11105104 KB 3625280 KB -9920 KB

    How to reduce this MDF file size ? what is unallocated space?

  • It means your database was once 134 GB big, but now it contains only for 10GB on data.

    When data is deleted, space isn't automatically released. You can shrink your database files, but there are a whole bunch of reasons not to do that. (index fragmentation is one of them).

    If you think your database will never be this big again, you can use DBCC SHRINKFILE.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Please don't cross post. It just wastes peoples time and fragments replies.

    No replies to this thread please. Direct replies to: http://www.sqlservercentral.com/Forums/Topic1350030-145-1.aspx

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply