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.

T-SQL Tuesday #38 – Resolving an SSIS package performance problem

It’s this time of the month again: the T-SQL Tuesday is back and Jason Brimhall (blog | twitter) is hosting the 38th installment. The theme is “standing firm”, which basically means to tell a story about one of these words: resolve, resolution or resolute. My contribution will be a story on how I once resolved an issue with an SSIS package taking more than one hour to complete.

Read More...

Use the sys.database_mirroring DMV to quickly check if the databases are in principal or mirror role and what state they are in

I have been using mirroring for about three years now and I must say it is one of the best features that have been added to SQL Server. We used to do plain old replication and log shipping in the past but almost all of those have been replaced by mirroring. Someone at work asked me how to check what state the databases are in and if a database on one server is the principal or the mirror.

Read More...

Truncate rollback differences between SQL Server and Oracle

I wrote a blogpost about the fact that there is a common myth that you can’t rollback a truncate statement in SQL this post was written on June 13, 2007 and it showed you that you could rollback a truncate. Here is some code that shows that. First create this very simple table CREATE TABLE dbo.TruncateTest (ID int IDENTITY PRIMARY KEY, SomeOtherCol varchar(49)) GO Add the following two rows

Read More...

What is the Dual table in Oracle and why do I need it?

When coming from SQL Server, you might find it weird that you don’t see code that looks like this in Oracle’s PL/SQL select 2 select sysdate -- getdate()in SQL Server Unlike with SQL Server that code won’t run in Oracle, Oracle requires the use of the FROM clause in its syntax. This is why Oracle has the DUAL table. If you try to run something like this select 2; you will get the following error

Read More...

Making an interface for plugwise with nancy

Introduction People who follow me might have heard me complain about plugwise and their poor service and late delivery. So I have at least some mixed feelings about plugwise, to say the least. But their product is awesome and works. So what does plugwise do I hear you ask. Well, you plug them in to an electricity socket and then you plug your device into the plugwise. You can now see how much electricity the device or devices are using and you can turn them on or off from a distance or via a schedule.

Read More...

Differences between Oracle and SQL Server when working with NULL and blank values

If you ever have to start working with Oracle you have to keep in mind that NULLs and blank values don’t work exactly the same as in SQL Server. Let’s take a look at some examples Create this table and insert some rows create table TestNull(Col2 varchar(100)); insert into TestNull values(NULL); insert into TestNull values('Bla'); insert into TestNull values(''); insert into TestNull values(' '); As you can see we inserted four rows, one row is null, one row is blank, one row has a space and one row has Bla.

Read More...

Creating MongoDB as a service on Windows 8

In addition to Scala I decided to mess around with MongoDB as well. This post is about how to install MongoDB as a service on Windows 8. BTW this should also work exactly the same on Windows 7 Here is what wikipedia has to say about MongoDB MongoDB (from “humongous”) is an open source document-oriented database system developed and supported by 10gen. It is part of the NoSQL family of database systems.

Read More...

Installing Scala 2.10 on Eclipse Juno

As part of my resolutions for the year I said I would write more blog posts and also get into different technology. I decided to take a look at Scala. Well it turns out Scala 2.10 was released yesterday. But first what is Scala anyway? From the Scala site: Scala is a general purpose programming language designed to express common programming patterns in a concise, elegant, and type-safe way.

Read More...

Book Review: Expert Performance Indexing for SQL Server 2012

I just finished reading Expert Performance Indexing for SQL Server 2012 by Jason Strate (blog | twitter) and Ted Krueger (blog | twitter). This is the only index-specific book that I know of for SQL Server, and it was a long-overdue resource. The progression of the book is very logical, from index fundamentals to special types of indexes, index maintenance to a method to analyze and implement changes. The examples and queries that are included are thorough yet understandable.

Read More...

Why you shouldn't use SELECT *

A customer’s DBA team created a checklist for the development teams with some best practices for writing proper T-SQL and asked me to write some contributions for their tips document library. So if I do the research and write the documents I might as well post them here. The content may not be all sparkling and new but since there is a demand from customers, there are still people out there having trouble finding the correct information.

Read More...