Posts

Showing posts from January, 2011

Identify uncompressed tables in SQL Server database with Powershell

Today I will illustrate how to check whether data compression is enabled on your SQL Server. This script is highly flexible and you may adjust it to your liking. I will only concentrate on compression today, in the next installment I will show how to modify this script and get other things done on your database server. #This is how you comment in Powershell v.2 for big paragraphs <# Artem Ervits Database Services Group Check whether compression is enabled Ver. 1.0.1 01/04/10 Added prompt to enter server name Ver. 1.0.0 12/07/10 Initial Script #> #cls is an alias for clear screen cls #you may take input from a list of servers in your txt file but we’re going to concentrate on one server at a time right now. #$hostname = Get-Content "C:\servers.txt" echo "Please Enter Server Name:" #This next line will prompt you to enter a SQL Server N