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.

Financial Functions for .NET released

Luca Bolognese has released a .NET library that provides the full set of financial functions from Excel. The main goal for the library is compatibility with Excel, by providing the same functions, with the same behavior. Note though that this is not a wrapper over the Excel library; the functions have been re-implemented in managed code so that you do not need to have Excel installed to use this library.

Read More...

SQL Friday, The Best SQL Server Links Of The Past Week Episode 1

I decided to do a weekly post with the best SQL Server related links of the week. These are articles that I find useful and think that they also might be beneficial to you the reader. Here we go Space Used By Worktables Kalen Delaney explains how to find the amount of space occupied by a worktable by using DMVs Defensive database programming: eliminating IF statements Alexander Kuznetsov explains why the following logic can fail 40% of the time

Read More...

SQL Server Case/When Data Type problems

When you write a case/when statement in T-SQL, it’s critically important that you cause all return values to have the same data type. If you don’t do this, you open yourself up to conversion problems. This problem can occur even if some branches of the code are never executed. When SQL Server compiles the code, it analyzes all branches of execution and determines the return data type. It does not matter that your particular query does not use a particular branch of execution.

Read More...

Failed to access IIS metabase or why it is important to do things in the correct order

So yesterday I got a new machine at work. I decided to only install SQL Server 2008 and Visual Studio 2008 on this box. First I installed Visual Studio 2008, after that I installed Visual Studio 2008 Service Pack 1 and then I installed SQL Server 2008. I still remember when I tried to install SQL Server 2008 RTM on my older machine with Visual Studio 2008 and it wouldn’t do it because you needed SP1 for the framework first, this got released 2 days later or so.

Read More...

sqltrace: A Tool Every SQL Server Developer Should Have

sqtlrace is a stored procedure written by Lee Tudor (a.k.a Mr Tea.) The procedure takes an SQL batch as its first argument, sets up a trace filtered to include the current connection only, runs the batch, and summarises the trace information per statement in the batch. This can be a very handy tool to track down performance bottlenecks in a longer stored procedure, not the least if there are calls to nested procedures.

Read More...

VB.Net and C# – the difference in OO syntax part 3

Part 2 Understanding C# Class and Member Modifiers How to: Control the Availability of a Variable Access Levels in Visual Basic Working with .NET access modifiers Classes and their access modifiers Protected or protected Let’s start with an easy one. In VB_Class_Libraby_2 Protected Class Class1 End Class``` Which gives us a very interesting error message. > Protected types can only be declared inside of a class. Which seems more than logical.

Read More...

Index and Statistic creation with SQL Server DTA

You have to have the concept of indexing and the pros and cons if you’re in a DBA role or taking on that role while in another position. If anything you have the understanding that when you create an index there are going to be maintenance tasks and a certain impact on your system that go along with the objects. At the least, you need to understand that fragmentation is a major concern and how indexing can affect the size of your databases.

Read More...

SQL Server Application and Multi-Server Management Private CTP

There are some cool things announced by Microsoft _SQL Server Application and Multi-server Private CTP – Registration As part of SQL Server “Kilimanjaro”, we have announced baseline investments for application and multi-server management. We are recruiting customers to participate in a private CTP with SQL Server Engineering. Registration for the Private CTP will take place until December 15, 2008 and the 4-5 week Private CTP will begin in mid-January. Microsoft is looking for participants in entities with at least 1 DBA, more than 25 PCs, and SQL Server installations across their organization.

Read More...

SQL Server Fibonacci Sequence

This probably falls under the category of ‘Why bother’. However, there has been some recent interest in calculating arbitrarily large fibonacci numbers. There is nothing particularly difficult about calculating these numbers until you reach the maximum number that a bigint (or decimal) can hold. With Fibonacci numbers, you reach this limit pretty fast. There’s nothing particularly difficult about calculating this sequence, it merely involves adding 2 numbers together. But, since we run in to the data type limit, we need to start thinking outside the box.

Read More...

Securing your password for SQL Server 2005 and 2008 and more

Do you know your sa password? Or let me put that a different way and say, does anyone besides you know the sa password? To build on that question, does anyone know the AD SQL Server service account password? Or any service account passwords. How about some of the sql authenticated users you’ve setup for reporting, system integration etc… ???? If you just said yes and they are in an excel file sitting either in a network drive or on your machine then you should be flipping burgers at McDonalds.

Read More...