{"id":1588,"date":"2012-02-23T04:40:23","date_gmt":"2012-02-23T04:40:23","guid":{"rendered":"http:\/\/www.obieta.com\/?p=1588"},"modified":"2012-02-23T04:40:23","modified_gmt":"2012-02-23T04:40:23","slug":"list-all-sharepoint-2010-databasesyou-can-get-the-same-information-from-central-administration-upgrade-and-migration-review-database-status","status":"publish","type":"post","link":"http:\/\/obieta.com\/?p=1588","title":{"rendered":"List All SharePoint 2010 Databases"},"content":{"rendered":"<div>If you&#8217;re like me you&#8217;ve setup numerous SharePoint 2010 test boxes in order to get comfortable with all the great new features. Because I&#8217;m running in a test environment I hadn&#8217;t been paying too much attention to the SQL server I was using. Yesterday I logged in and found a staggering number of similarly named databases which were no longer being used because the test boxes were done.<\/div>\n<p>So how do you figure out which databases are which? There&#8217;s a great SharePoint Powershell cmdlet you can run on your SharePoint server that will give you a list of all the databases your server is using:<\/p>\n<p>Get-SPDatabase |\u00a0Sort-Object disksizerequired -desc |\u00a0Format-Table Name<\/p>\n<p>When you run the command, you&#8217;ll get a list of all the databases similar to the following:<\/p>\n<div><a href=\"http:\/\/3.bp.blogspot.com\/_peTHtPNQTtg\/S-raKca1muI\/AAAAAAAAAII\/cI7NfoLakkA\/s1600\/PSdatabases.jpg\"><img loading=\"lazy\" src=\"http:\/\/3.bp.blogspot.com\/_peTHtPNQTtg\/S-raKca1muI\/AAAAAAAAAII\/cI7NfoLakkA\/s400\/PSdatabases.jpg\" border=\"0\" alt=\"\" width=\"400\" height=\"221\" \/><\/a><\/div>\n<div>Now that you have your list, log into SQL Server Management Studio and delete the corresponding databases:<\/div>\n<div><a href=\"http:\/\/3.bp.blogspot.com\/_peTHtPNQTtg\/S-rat64DjQI\/AAAAAAAAAIQ\/_XCm7ijXD-w\/s1600\/PSSQL.jpg\"><img loading=\"lazy\" src=\"http:\/\/3.bp.blogspot.com\/_peTHtPNQTtg\/S-rat64DjQI\/AAAAAAAAAIQ\/_XCm7ijXD-w\/s400\/PSSQL.jpg\" border=\"0\" alt=\"\" width=\"400\" height=\"385\" \/><\/a><\/div>\n<div>\n<div>Get-SPDatabase | Sort-Object disksizerequired -desc | Format-Table Name | out-file c:databases.txt<\/div>\n<div>\n<div><a href=\"http:\/\/4.bp.blogspot.com\/_peTHtPNQTtg\/S-re4Xy6ufI\/AAAAAAAAAIY\/M5pdK1Zx1h4\/s1600\/pstext.jpg\"><img loading=\"lazy\" src=\"http:\/\/4.bp.blogspot.com\/_peTHtPNQTtg\/S-re4Xy6ufI\/AAAAAAAAAIY\/M5pdK1Zx1h4\/s400\/pstext.jpg\" border=\"0\" alt=\"\" width=\"373\" height=\"400\" \/><\/a><\/div>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<dd id=\"Blog1_cmt-4575030053871430682\">\n<p>You can get the same information from Central Administration &gt; Upgrade and Migration &gt; Review database status.<\/p>\n<\/dd>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/imperfectit.blogspot.com\/2010\/05\/list-all-sharepoint-2010-databases.html\">http:\/\/imperfectit.blogspot.com\/2010\/05\/list-all-sharepoint-2010-databases.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;re like me you&#8217;ve setup numerous SharePoint 2010 test boxes in order to get comfortable with all the great new features. Because I&#8217;m running in a test environment I hadn&#8217;t been paying too much attention to the SQL server I was using. Yesterday I logged in and found a staggering number of similarly named [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[5,1],"tags":[],"_links":{"self":[{"href":"http:\/\/obieta.com\/index.php?rest_route=\/wp\/v2\/posts\/1588"}],"collection":[{"href":"http:\/\/obieta.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/obieta.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/obieta.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/obieta.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1588"}],"version-history":[{"count":0,"href":"http:\/\/obieta.com\/index.php?rest_route=\/wp\/v2\/posts\/1588\/revisions"}],"wp:attachment":[{"href":"http:\/\/obieta.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1588"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/obieta.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1588"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/obieta.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1588"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}