Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. How to calculate the total memory occupied by the database

How to calculate the total memory occupied by the database

Scheduled Pinned Locked Moved Database
databasesysadminperformancehelptutorial
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Krishna Aditya
    wrote on last edited by
    #1

    Hi, I am using sqlserver 2008, How can I calculate the total memory occupied by the Database with tables (>30) and also data in it. I mean if I have DB (DB_name) and with few tables(tblabc, tbldef......) with data in it, how to calculate the total memory occupied by the database in the server. Kindly Help me. Thanks Ramm

    D 1 Reply Last reply
    0
    • K Krishna Aditya

      Hi, I am using sqlserver 2008, How can I calculate the total memory occupied by the Database with tables (>30) and also data in it. I mean if I have DB (DB_name) and with few tables(tblabc, tbldef......) with data in it, how to calculate the total memory occupied by the database in the server. Kindly Help me. Thanks Ramm

      D Offline
      D Offline
      dan sh
      wrote on last edited by
      #2

      Like this:

      use YourDBName
      SELECT size FROM sys.database_files

      It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD

      K 1 Reply Last reply
      0
      • D dan sh

        Like this:

        use YourDBName
        SELECT size FROM sys.database_files

        It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD

        K Offline
        K Offline
        Krishna Aditya
        wrote on last edited by
        #3

        Hi D@nish, I executed the query, it showed, 1408 and 2768 without data in database. even with data it showd the same numbers. please help me. Thanks Ramm

        M A D 3 Replies Last reply
        0
        • K Krishna Aditya

          Hi D@nish, I executed the query, it showed, 1408 and 2768 without data in database. even with data it showd the same numbers. please help me. Thanks Ramm

          M Offline
          M Offline
          Mycroft Holmes
          wrote on last edited by
          #4

          Well have a rat around the management studio, sysobjects also has lots of info. Take a look at the system views, they are design to give you info on your databases.

          1 Reply Last reply
          0
          • K Krishna Aditya

            Hi D@nish, I executed the query, it showed, 1408 and 2768 without data in database. even with data it showd the same numbers. please help me. Thanks Ramm

            A Offline
            A Offline
            Andy_L_J
            wrote on last edited by
            #5

            Right Click your database in Object Explorer, Select Reports - Standard Reports - Disk Usage explore these reports for common reqs.

            I don't speak Idiot - please talk slowly and clearly I don't know what all the fuss is about with America getting it's first black president. Zimbabwe's had one for years and he's sh*t. - Percy Drake , Shrewsbury Driven to the arms of Heineken by the wife

            1 Reply Last reply
            0
            • K Krishna Aditya

              Hi D@nish, I executed the query, it showed, 1408 and 2768 without data in database. even with data it showd the same numbers. please help me. Thanks Ramm

              D Offline
              D Offline
              dan sh
              wrote on last edited by
              #6

              Size is the size of mdf and ldf file in 8K pages. Divide the value by 128 to get the size in MB. It might come same with/without data depending upon the amount of data your DB holds.

              It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups