Month: August 2010

How to Script All Tables From a Database with PowerShell

Sal Young | August 22nd, 2010


PROBLEM: You need to script all the tables from a database.  Each table needs to be on its own file so they can be added to a source control repository. SOLUTION: The use of SQL Server PowerShell Extensions (SQLPSX) facilitates the solution I’m about to show. The first example is a straight to the point, […]

Read More

How to Change File Extension for all Files in a Folder

Sal Young | August 21st, 2010


PROBLEM: You have a directory with many files and would like to change the extension on many of them without having to do one by one. SOLUTION: You can solve this problem with PowerShell and in less than 3 lines of code. CLEAR CD [PATH TO FILE LOCATION] Get-ChildItem *.[FILE EXTENSION]|Rename-Item –NewName {$_.Name –replace “[FROM […]

Read More

Review SQL Server 2008 Administration in Action

Sal Young | August 19th, 2010


I got a copy of this book back in September of 2009 because I wanted to know more about the hardware configuration of production database servers.  Specifically, I wanted to know about best practices and recommendations in the areas of storage, memory and CPU.  While at the store, I read chapter 2 “Storage and System […]

Read More