LessThanDot Site Logo

LessThanDot

A decade of helpful technical content

This is an archive of the posts published to LessThanDot from 2008 to 2018, over a decade of useful content. While we're no longer adding new content, we still receive a lot of visitors and wanted to make sure the content didn't disappear forever.

Nancy and VB.Net: testing your modules.

Introduction In my previous post I made a Plantsmodule which had 2 routes. One of those routes had a problem when tried to put a string in the parameter and that was less than optimal. It was time for tests to make it easier on myself to test these kinds of things. The module So here is my module. Imports WebApplication2.Model Imports Nancy Public Class PlantsModule Inherits NancyModule Public Sub New() MyBase.

Read More...

SQL Advent 2012 Day 13: Features enabled that are not used

This is day thirteen of the SQL Advent 2012 series of blog posts. Today we are going to look at servers where everything is installed and enabled. Before we start this post let’s look back in time a little. Before SQL Server 2005 came out when you installed SQL Server pretty much everything was turned on by default. This of course widened the attack vector against the database servers. With SQL Server 2005 pretty much everything is turned off and you have to turn the features on if you want to use them.

Read More...

\"The What, Why, and How of Filegroups\" – I-380 PASS Materials

Last night I had the pleasure of presenting “The What, Why, and How of Filegroups” for the East Iowa I-380 SQL Server user group. Thanks for having me! My presentation materials are available [here][2]. During the presentation, I show the DBCC CHECKFILEGROUP command. An attendee asked if running this command instead of a full DBCC CHECKDB would reduce the size of the snapshot created. I asked my good friend Erin Stellato (blog | twitter), and she gave me this excellent information:

Read More...

SQL Advent 2012 Day 12: Proactive notifications

This is day twelve of the SQL Advent 2012 series of blog posts. Today we are going to look at SQL Server proactive notifications. In the SQL Server Maintenance post from yesterday I touched upon proactive notifications a little, today I want to dive a little deeper into this subject. The last thing you want as a DBA is to hear any of the following things from the end users

Read More...

Nancy and VB.Net: the razor view engine

Introduction Yesterday I started using Nancy, and I used the SuperSimpleViewEngine but I was told to use the razor view engine instead. And because I’m a good boy I did that. Getting it to work First thing to do is to install the Nancy.Viewengines.Razor package from nuget. This of course downloads the needed assemblies and adapts your webconfig. And it makes a mistake when adapting the webconfig. Your webconfig will look like this when it is done.

Read More...

SQL Advent 2012 Day 11: Cursors and loops

This is day eleven of the SQL Advent 2012 series of blog posts. Today we are going to look at cursors and loops. Why do we hate those poor cursors? Let’s first see why people tend to use cursors. Let’s say you come from a procedural language and this is the first time you are using SQL. In the procedural language you know how to traverse a list, you of course will look for something that is similar in SQL…….

Read More...

Database Projects – Setting up Source Control

For some time I wanted to document the possibilities of the SQL Server Database Project and how developers and DBA’s can benefit from it. Problem Statement Many companies I’ve worked for struggle with their database lifecycle management: Production databases are copied to Test, Staging, UAT… environments by the DBA’s with production (sensitive) data DBA’s spend too much time doing the copy operations Backup chains are broken because of the lack of use of the WITH COPY_ONLY option Changes are made by the DBA executing individual scripts, sometimes breaking because the development database and production database were out of sync.

Read More...

Update Table Based on a JOIN

This month’s T-SQL Tuesday is hosted by Sebastian Meine (blog | twitter) and the topic is joins. He has a whole month worth of topics about joins: A Join A Day – Introduction. I thought I’d write about a question I get often from Developers and some DBAs. This may seem like a simple and basic task but it is a common question asked, “How do I update a column based on a query that has joins in it?

Read More...

Nancy and VB.Net: getting data in your page

Introduction A few hours ago I started a website in Nancy. Now I want to show data I have in my webpage. And here the docs were not all that helpfull. But I made it. The Model First of all I need a Model. Namespace Model Public Class PlantsModel Public Property Id As Integer Public Property Name As String Public Property LatinName As String End Class End Namespace And I put that in a Model folder.

Read More...

Nancy and VB.Net

Introduction After having tried out Servicestack it is time to try Nancy. Nancy is a lightweight, low-ceremony, framework for building HTTP based services on .Net and Mono. The goal of the framework is to stay out of the way as much as possible and provide a super-duper-happy-path to all interactions. Nancy has some nice docs and I like that. And Nancy has a nice ecosystem and dedicated masters.

Read More...