No Picture

Quest for MCSE

March 25, 2019 jlion 0

Last fall, I took and passed the microsoft 70-761 and 70-762 exams to achieve MCSA (Microsoft Certified Solutions Associate) status for sql server 2016.

I’m planning to take the next step this spring, to MCSE. Achieving MCSE certification consists of taking one exam after achieving MCSA. The exam options are listed here.…

No Picture

SQL Partitioned Tables

March 25, 2019 jlion 0

I’ve been looking into table partitioning as a way to manage large historical tables. The idea is to be able to keep the size of the table reasonably static as new rows are inserted by removing older rows. My goal is to avoid unnecessary locking. Typically I might write a stored procedure that does something like this:
1) insert new …

No Picture

Making a user DBO for all databases on a server

March 19, 2019 jlion 0

Recently I had a need to assign a user DBO to all databases on a server.

I put this script together, it seems to do the trick.

declare @login varchar(255)='testuser'

declare @databasename varchar(255),
		@sql varchar(max)

declare xcn cursor fast_forward local for 
	sys.sysdatabases a
order by

open xcn

fetch next from xcn into @databasename

No Picture

Automatically posting messages to slack

September 22, 2018 jlion 0

SQL Server supports SQL Mail for email notifications, and traditionally I’ve used SQL Mail to keep myself apprised of various server issues.

Slack is a great alternative to email, and a lot of folks make extensive use of slack. I thought it would be nice to receive notifications from SQL Server in a slack channel, and so started looking into …

No Picture

CLR stored procedures in sql server

September 13, 2018 jlion 0

To create a CLR stored procedure in SQL Server….

I used this nice blog posting by Scott Sutherland as a starting point:

If you are using SQL Server 2017 it will be necessary to sign your CLR assembly.

If you are doing this in a development environment, you may wish to create a public/private key pair:

Once you’ve …

No Picture

Microsoft Dynamics

August 4, 2017 jlion 0

One of the things that I really like about Microsoft products (and one of the reasons for their success) is the very well documented and very capable APIs that Microsoft provides. Dynamics is no exception.

Here are some helpful links that describe how to access the Microsoft Dynamics APIs, if you wish to create applications that query or report on …

No Picture

Reflection Notes

July 29, 2017 jlion 0

I’ve been doing quite a lot of work with C# reflection recently. Reflection is nifty stuff. It’s cool to have code that can inspect itself, execute itself dynamically.

I’ve been using reflection to create applications that use “plug-ins”. For example, the user might have a management GUI that allows them to select one of several similar but not identical assemblies. …

No Picture

HTML5 Clipping

July 23, 2017 jlion 0

Canvas is not supported

I love how easy it is to use HTML5 for animation. Recently I discovered another cool feature of the HTML5 graphics API: Clipping.

Clipping is a little like photoshop paths. You use the HTML5 api to draw shapes and then you can use clipping to show content only inside the boundaries of that path.

In a …

No Picture

Types of programming tasks

July 22, 2017 jlion 0

Not all programming work requires the same set of aptitudes and skills. Here is my take at some groupings:

  • Systems. This is the black art of developing software drivers or other software that requires an intimate knowledge of hardware or operating systems. Testing can be very difficult to do and is often a large part of the overall scope

The Fab Lab

June 29, 2017 jlion 0

My oldest son and I just completed a three day course in “mold making and resin casting” at the Northhampton Community College Fab Lab. It was a great experience. I signed us up because my son had been 3D printing fidget spinners. He had sold a couple that he made to friends, but they were relatively expensive to make …