{"id":1423,"date":"2013-11-08T02:37:53","date_gmt":"2013-11-07T20:37:53","guid":{"rendered":"http:\/\/techsatwork.com\/blog\/?p=1423"},"modified":"2016-01-07T11:31:03","modified_gmt":"2016-01-07T05:31:03","slug":"quick-way-get-size-databases-sql-server-instance","status":"publish","type":"post","link":"https:\/\/techsatwork.com\/?p=1423","title":{"rendered":"Quick way to get size of databases on a sql server instance"},"content":{"rendered":"<p>Here is a dirty little sql that will give you the size of all the databases in your instance :<\/p>\n<p>select DB_NAME(database_id) as DatabaseName, sum((size*8\/1024) SizeInMB<br \/>\nfrom sys.master_files<br \/>\ngroup by\u00c2\u00a0database_id;<\/p>\n<p>This will list all the databases in the instance and add the size of the database file and log file.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here is a dirty little sql that will give you the size of all the databases in your instance : select DB_NAME(database_id) as DatabaseName, sum((size*8\/1024) SizeInMB from sys.master_files group by\u00c2\u00a0database_id; This will list all the databases in the instance and add the size of the database file and log file.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-container-style":"default","site-container-layout":"default","site-sidebar-layout":"default","site-transparent-header":"default","disable-article-header":"default","disable-site-header":"default","disable-site-footer":"default","disable-content-area-spacing":"default","footnotes":""},"categories":[358,658],"tags":[872,873,874],"class_list":["post-1423","post","type-post","status-publish","format-standard","hentry","category-how-to","category-sql-server-2","tag-database-size","tag-master_files","tag-size-of-database-in-sql-server"],"_links":{"self":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts\/1423","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1423"}],"version-history":[{"count":1,"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts\/1423\/revisions"}],"predecessor-version":[{"id":1424,"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts\/1423\/revisions\/1424"}],"wp:attachment":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1423"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1423"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1423"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}