Get all SharePoint database sizes

October 4, 2013By Maarten PeetersPowerShell, SharePoint No Comments

SharePoint creates 15+ databases during installation and configuration and it’s possible you want to know the size of each database without connecting to the database server or manually checking each size. You can easily get the size of each database using the following PowerShell one-liner: Get-SPDatabase | Sort-Object disksizerequired -desc | %{write-host  “Size: $($_.disksizerequired/1mb)MB – … Read More

Getting SQL Instance Edition or service pack for SQL 2012

October 2, 2013By Maarten PeetersSQL No Comments

I have posted the below query before for SQL Server 2005, 2008 and 2008 R2 on and it is still usable for SQL Server 2012 SELECT SERVERPROPERTY(‘Edition’) AS ‘Edition’, SERVERPROPERTY(‘ProductVersion’) AS ‘ProductVersion’, SERVERPROPERTY(‘ProductLevel’) AS ‘ProductLevel’, SERVERPROPERTY(‘ResourceLastUpdateDateTime’) AS ‘ResourceLastUpdateDateTime’, SERVERPROPERTY(‘ResourceVersion’) AS ‘ResourceVersion’ GO (It is possible you need to change the ‘)