Select Page

R Services Will Not Start After Install

If you are here, then you have experienced the same issue with the R Service not wanting to start after installing it on an existing instance. You have seen that pesky message to the left. In this particular case our server was previously patched to (SQL Server 2016...

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...

PowerShell: Monitoring Servers

I’m relatively new to PowerShell. I’ve known about it and have dabbled with it here and there but as of lately I’ve been digging in a bit deeper. One of my projects was to build a homegrown monitoring system. Being a DBA it’s natural that I...

Deleting a duplicate record

Recently a friend of mine asked me about deleting a duplicate record from a table without deleting both records. Having been in a situation I drafted up a sample script and emailed it to him. DECLARE @tbl1 TABLE ( id int, color varchar(50) ) INSERT INTO @tbl1 (id,...

Consolidate multiple records into a single row

I worked on a restore script that had to consume values from the network share and produce a restore statement. This database happened to be striped to eight files. I needed a way to construct the restore statement into a single row and I was able to achieve the...