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.

Firefox and Lessthandot

You might think that this post will be about a bug in Lessthandot that only manifests itself in Firefox but you are completely wrong. If like me (and most other people I know) you like Lessthandot than you want to make the tab a permanent resident of your browser. And isn’t that what everybody wants in the first place? Of course I hear you thinking that FF already saves the state of the tabs when you close it so why would you need it.

Read More...

Microsoft reportviewer and setting displaymode to printlayout

When working with the reportviewer I found it very annoying that it shows its report in a not printlayout mode. Like this But I want it in printlayout mode by default. After looking through Google and the properties and nearly giving up I found that they made this a function. vbnet _viewer.SetDisplayMode(DisplayMode.PrintLayout) Nope no DisplayMode property in sight. While all the other settings are properties. Oh joy. SO when you intend to make an API, please be consistent.

Read More...

6 ways to import data into SQL Server

I’m going to go over some methods to import data from text files into SQL Server today. The particular file I went out and grabbed is comma delimited and with a few qualifiers in it. It is a typical file you may get and a request made to import or just for your own administrative tasks. Below is the location of field layout and file that I grabbed off the net to play with.

Read More...

Microsoft reportviewer: domainobjects and ReportDataSource needs a collection.

I’m switching from a previous reporting engine to the microsoft reporting engine that comes free. No, I never used Crystal reports and I don’t know yet how much I’m gonna hate this one either. But the word free makes up for a lot in this world. And they all seem to have pros and cons. Okay So I wanted to use an objectdatasource since I work with domainobjects and I would have liked to make reports from them.

Read More...

CTE and hierarchical queries

One of my favorite additions to T-SQL language in SQL Server 2005 is Common Table Expressions, CTE for short. Primarily I use them instead of derived tables to improve maintenance and code readability. See also this interesting article on recursive CTE implementation T-SQL: Using common table expressions (CTE) to generate sequences and this interesting discussion about commonly-known problem of splitting delimited values. You may find this article by SQLUSA (Kalman Toth) very interesting.

Read More...

Using Mirroring to Reduce DB Migration Downtime (Part 2)

Part 1 In the first part to this article we went over setting up the lab to show exactly how to perform a migration of databases to a new server with limited downtime. If you haven’t read the first part, you can find it here. Together we went over how to create a mirror and prepare a test lab for utilizing this method. If you already have a mirror in your test or development landscape then you can use that for the follow up.

Read More...

Using Mirroring to Reduce DB Migration Downtime (Part 1)

The History A few years ago I needed to move an active set of databases from their current environment to a new server. The move was for a much needed hardware upgrade and, given the 24⁄7 nature of the business, required as little interruption to normal operations as possible. While reviewing the typical migration methods it occurred to me that we might be able to utilize mirroring to reduce the downtime at the cost of a little more up-front preparation.

Read More...

East Iowa SQL Saturday Oct. 17th

I’ll be attending my first SQL Saturday in October. The event is the East Iowa SQL Saturday. I’m excited about having the chance to go to one finally. Over the years I’ve found it very important to stay current with the SQL Server community. One of the goals I set way back in the beginning of the year was to start teaching and sharing what I know about SQL Server and development on the many services we have at our disposal.

Read More...

SQL Server Extracting Data (again)

In a recent article, I explained how to extract numbers from a string. This blog post is slightly different. In the previous article, I show how to extract single numeric values (consecutive numbers). In this article, I will show how to extract all values (non-consecutive). This functionality is particularly useful for formatting data (when you need to export in a consistent way). For example, phone numbers (in the U.S.) are usually 10 digits long, but some people like to use (111) 222-3333 or 111-222-3333 or even 111.

Read More...

How I got started with SQL Server

I was tagged by Denis in hopes I could actually remember back far enough to talk briefly on how I got started in SQL Server. So here it is… Quiet often DBAs are accidentally created. There have been dozens of blogs and articles written about how that happens in some peoples careers in IT. My story is basically the same as most of the other accidental DBAs out there. Every time I think of it I’m reminded of a sign posted near some bluffs here in WI I visit often.

Read More...