Select Page

Getting friendly with MERGE

Here’s a simple example of how to use MERGE. I’ll do a follow up post on this later. SET NOCOUNT ON; /* TARGET TABLE */ DECLARE @Movies TABLE ( id INT IDENTITY(1,1) PRIMARY KEY CLUSTERED ,Title VARCHAR(20) ,Qty INT NOT NULL ,CreateDate DATETIME...

Get-WmiObject Performance

If you are new to PowerShell and have searched through the “google-verse” you’ll likely find millions of examples with most if not all filtering the results via “WHERE” cmdlet. One thing I noticed today while conducting research on...

PowerShell Get-Service

Since I have written a process that checks all of our SQL Services I have been researching other methods and might have found a quicker way using Get-Service but would require an addition step to pass the arguments accordingly on a server by server basis. Potentially...

PowerShell Change Service Startup

In the event you need to change the service startup from either “Manual”, “Automatic”, or “Disabled” on a remote server, PowerShell makes it extremely easy and here’s one of likely many ways you can do it. function...