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.

Always include size when using varchar, nvarchar, char and nchar

There are several string data types in SQL Server. There are varchar, nvarchar, char, and nchar. Most front end languages do not require you to identify the length of string variables, and SQL Server is no exception. When you do not specify the length of your string objects in SQL Server, it applies its own defaults. For most things, the default length is one character. This applies to columns, parameters, and locally declared variables.

Read More...

SQL Server 2008 R2 Editions Pricing Announced

Microsoft has announced pricing and also what is new in the SQL Server 2008 R2 editions. First here is the pricing Editions Per Processor PricingRetail ** Per Server Plus CAL PricingRetail ** Parallel Data Warehouse $57,498 Not offered via Server CAL Datacenter $57,498 Not offered via Server CAL Enterprise $28,749 $13,969 with 25 CALs Standard $7,499 $1,849 with 5 CALs I wonder how many people will go to Datacenter or Parallel Data Warehouse editions?

Read More...

Balsamiq Mockups – Turn Any Computer Into a Napkin

I’ve been working on a new web site for a while now, and finally got to the point where I need to make it look a little better. Figuring out page layouts is far from my strong suit, so I was looking for something to help make it easier. I’d tried a couple of free applications, and either found them too limited or too complex for my needs. I think that Mockingbird probably came the closest to what I was looking for, but the interface was just a bit clunky.

Read More...

Test your Full Recovery model by restoring backups

A major point of failure in a full recovery model is not testing your backups. You should not limit this to your FULL backups either. If you have full recovery model on any of your databases there is more than likely (or should be) log backups being run based on either DR strategies or transaction log management. If you also have differential backups to take full advantage of the quickest path to restore, then all of these stages must be tested out.

Read More...

Don't prefix your table names with tbl

This is a naming convention issue. Tables should not be prefaced with tbl because it does nothing to add to the clarity of the code (self-documenting). It actually has the opposite effect because it takes longer to read it and causes you to perform an interpretation of the three letter abbreviation. How to detect this problem: Select * From Information_Schema.tables Where Table_Type = 'Base Table' And Table_Name Like 'tbl%' How to correct it: Rename the table to remove the prefix.

Read More...

Microsoft Access Wikis on LessThanDot

Here is a list of the wikis that refer specifically to Microsoft Access, however, a great many ideas from other areas, such as SQL Server, can be transferred to Access, so don’t stop here! You can also post in our forums (Access VBA & Jet SQL, Access Forms & Reports), if you need any help, or would like to help others. It is important to remember that Access uses the Jet database, for the most part, but both halves of this union, Jet and Access, can be used separately.

Read More...

Validating a domain model/objects

One of the biggest problems you will encounter in your career as a developer is pesky users. They always seem to enter the wrong data. So we need to validate their input into your brilliant system. There are several ways of doing this when using a domain model. First, you could make sure that all your properties and constructors are designed in such a way that your object can never be in an invalid state.

Read More...

Don't start your procedures with SP_

When SQL Server executes a stored procedure, it first checks to see if it is a built-in stored procedure (system supplied). It checks the master database for the existence of this procedure. If the procedure is not found, it will search the user database. It doesn’t sound like much, but in a high transaction environment, the slight performance hit will add up. Also, consider what would happen if Microsoft decides to ship a system stored procedure with the same name as the procedure you wrote.

Read More...

LessThanDot Redesign – Here We Go

Done, Skip to the bottom! Over the course of the next hour the LTD website will be undergoing conversion to the new format. What this means is that we will spend about the next 15 minutes or so without any visible changes. Then everything will break horribly. Then (hopefully) everything will look right again and we will be on the new layout. Done! – Basic Backups as precaution Done! – Copying new files and breaking site Done!

Read More...

SQL Server 2008 R2 Datacenter and SQL Server 2008 R2 Parallel Data Warehouse Editions Announced

Microsoft announced SQL Server 2008 R2 Datacenter and SQL Server 2008 R2 Parallel Data Warehouse Editions today at Pass. Also announced was a new world-record TPC-E benchmark result and the SQL Server 2008 R2 November CTP Microsoft is introducing two new offerings for high-scale, mission-critical applications. SQL Server R2 Datacenter delivers a high-performing information platform that provides high levels of scalability for large application workloads and managing an organization’s database infrastructure.

Read More...