I have been validating different aspects of SQL mirroring and in the process I wanted a quick and automated way to handle database mirroring functions. This includes listing all mirrored databases, failing over databases manually to a mirrored instance...
Here is an improved version of the script I am using to get the database space usage details. This is one of the utility scripts I have been using and will be publishing soon as PoshUtils on Codeplex. Function Get-DBSize { [CmdletBinding()] param ( [Parameter...
First of all, I am not SQL guy. I work on SharePoint quite a bit and venturing into SQL now. So, the first thing is to learn how I can script my SQL management tasks. I know there are quite a few things on the Internet but exploring all this myself gives...
< # .SYNOPSIS This script sets options on a SQL Server using SMO .DESCRIPTION This script first loads the SQL cmdlet and provider snapin and displays information about the SQL Server. The script then sets ...
I am doing some work at the moment building SQL PowerShell training for an upcoming PowerShell MasterClass . In my searching, I came across a small project being done by Chad Miller, called SQLIse. As Chad describes in his blog, SQLISE is an ISE add-on...
Microsoft.SqlServer.Management.Smo.Server < # .SYNOPSIS This script uses SQL Server Server SMO objects to display server information. .DESCRIPTION This script first loads the SMO assembly and then creates a server object. ...
I just got news of an interesting SQL PowerShell web cast coming up tomorrow. In the webcase, Microsoft SQL Server guru Aaron Nelson is going to look at how you perform everyday database administrator tasks using POwerShell. He’ll cover backing up user...
< # .SYNOPSIS This script displays the versions of SQL Server running on a system .DESCRIPTION This script uses WMI to get the SQLServiceAdvancedProperty class from the ComputerManagement namespace to print out...