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.

What does a SQL Server developer need to know?

I have been interviewing people for a SQL Server position for the past six weeks and all I can say that I am glad it is over. What a frustrating experience, people with over 10 years’ experience could not tell me the difference between UNION and UNION ALL, most of the people never heard of TRUNCATE. We finally got our guy and he starts tomorrow. So I would like to ask you the reader what a SQL Server developer should know when he falls into these levels.

Read More...

Latest article by SQL Server MVP Erland Sommarskog is a gem

SQL Server MVP Erland Sommarskog has posted his latest article yesterday and I highly recommend printing it out/transferring it to your ebook reader and reading it. Of course I think most of you are already familiar with Erland’s article The curse and blessings of dynamic SQL, this article I am sure will be linked in answers as much as the dynamic SQL one Remember all those question you get where a query is fast in SSMS but slow from ADO.

Read More...

Professional Development Week, An introduction to this week on SQL University

Welcome to this semester’s Professional Development week at SQL University. This week long course will dive deep into professional development in order to better build ourselves for the careers we are already far into building. This week is being taught by Andy Leonard (Twitter | Blog) and Ted Krueger (Twitter | Blog). Andy is well known for bringing the community together and having the ability to mentor from the individual level to large groups of the community with developing skills to build their careers.

Read More...

Parsing the FullName field to individual components

This post expands on my previous post on the similar topic Parsing the Address field to its individual components I encourage the readers who are unfamiliar with the CROSS APPLY technique used in this blog to read this very interesting blog by Brad Schulz T-SQL Tuesday #017: APPLY: It Slices! It Dices! It Does It All! This time I will be solving a similar problem of parsing names to individual components.

Read More...

Windows 7 SP1 RTM available for MSDN and TechNet customers

If you are a TechNet or MSDN subscriber then you can download Windows 7 Service Pack 1 or Window Server 2008 R2 Service Pack 1 today. Below is an image of what is available If you are a not a TechNet or MSDN subscriber, you have to wait until February 22nd to download yours. If you have been patching your Windows 7 machine then you already have most of what is in the service pack, the service pack is just a rollup of all the patches that have been issued since Windows 7 was released.

Read More...

Trapping errors when working with linked servers

I have a bunch of linked servers to SQL Servers and also to Sybase ASE Servers ON AIX machines. There are some interesting things that can happen. For example if you type the name of the object or the linked server itself wrong, you can’t trap this….. or can you? Let’s take a look. Open up SSMS and connect to your local instance. Now create a linked server named TestLinkedServer which points to the local server.

Read More...

Changing a SQL Server Database Owner

Fact: every SQL Server database has an “owner”. You can check the owner of a database by running this query: SELECT NAME, SUSER_SNAME(owner_sid) FROM sys.databases WHERE NAME = 'DatabaseName' However, there may come a day when you run into this error: There was error outputting database level information for ServerName.DatabaseName. Property Owner is not available for Database ‘[DatabaseName]‘. This property may not exist for this object, or may not be retrievable due to insufficient access rights.

Read More...

24 Hours of PASS, WIT Edition: Register! Learn! Listen to Me!

![24 Hours of PASS logo][1] Last month, I asked a group of amazing women to submit sessions for the Spring 2011 24 Hours of PASS, focusing on Women In Technology (WIT). 24 HOP will take place on Tuesday, March 15 and Wednesday, March 16, 2011. The call for speakers came and went. I was stoked when I heard that 59 sessions were submitted. 59! That’s enough for two and a half days of training!

Read More...

Inverse Mapped Collections and NHibernate's Second-Level Cache

In order to simplify saving some entities, I recently changed some mappings in my application to use the inverse attribute. In less cryptic terms, this means that the collection item is responsible for maintaining the relationship to the collection owner. In contrast, when using a standard relationship the parent entity is responsible for managing the collection items. The reason for this is that it lets you save the collection items without going to the database (or second level cache) to get the collection’s owner.

Read More...

MailMessage and changing the name of an attachment

Whenever my application doesn’t close correctly (meaning it probably crashed) I get sent the log files at next startup via mail. In this mail I have the log files attached. Because the log files are locked at the time of sending I first take a copy of them like this, you can take a copy of a file while it is locked. vbnet For Each _Filename As String In _attachements _Filename = Environment.

Read More...