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.

Using VS.NET 2005 SP1 with SQL Server 2008 connectivity

When I first installed SQL Server 2008 in my environment one of the first things I did was open up VS.NET 2005 and start messing around with connectivity to the instance. That failed miserably. Errors were abound! All hope is not lost though… The last thing I want to do is install side by side versions of VS.NET. The IDE is heavy and sucks the life out of any developer machine.

Read More...

Answers To The SQL Server Quiz: Can You Answer All These Post

Yesterday I wrote the SQL Server Quiz, Can You Answer All These? post and asked 10 question. Today I will give you the answes 1) Name three differences between primary keys and unique constraints A primary key cannot have any null values and a unique constraint can have one null value A primary key is by default clustered and a unique constraint is not A table can only have one primary key but can have more than one unique constraint

Read More...

Disable SQL Agent Jobs with TSQL based on events

Altering SQL Agent jobs during job runtime can give you some options as to how you can force other jobs to react based on events. There are a listing of system procedures in the MSDB database available for you to use so you can literally alter your entire timelines and schedules based on a failure, success or even OS or network related issues. Here is a basic example of disabling and enabling a job

Read More...

Space heater * power strip = support disaster

The help desk manager I often work with on high level issues were talking the other day about a problem she had with a user. The problem the user was having had been her laptop was turning on briefly and then shutting down for no apparent reason. The reason the topic even came up was due to the user throwing a childish tantrum at the help desk manager’s desk about how IT had purposely done something to her laptop.

Read More...

SQL Server Quiz, Can You Answer All These?

Here is a quick SQL Server quiz. Do you know the answer to all of these question? I will give the answers in a blog post tomorrow 1) Name three differences between primary keys and unique constraints 2) If your database is in simple recovery model and you run code that looks like this BULK INSERT Northwind.dbo.[Order Details] FROM 'f:orderslineitem.tbl' WITH ( FIELDTERMINATOR = '|', ROWTERMINATOR = '|n' ) Will this be minimally logged?

Read More...

Search the Internet Archive with the Wayback Machine

Surprisingly not many people know but there is an actual internet archive. Yes they have snapshots through history of the internet. Not many sites get by without having snapshots done when alterations to the sites core structure is found. If you’ve been in web development for awhile or did web development years back I would check it out. It’s fun to remember just how bad some of the sites you built were 🙂

Read More...

Client Statistics in SSMS. Check execution times

How many times have you done something like this testing speed Declare @cnt_test bigint Declare @st datetime Set @st = getdate() Set @cnt_test = (Select count(*) From dbo.test_scan) Select DateDiff(ms,@st,getdate()) Specifically the DateDiff() in milliseconds to see how long the execution took. There is a nice little option in SSMS that I leave on when working on a query over time. It’s called Client Statistics. When set on you can get the same results and much more that can help you measure your performance while altering your code.

Read More...

Optimizing with indexing where commonly overlooked

This is a quick and probably extremely basic trick to get rid of a scan when optimizing your code. Getting a index scan to a index seek can be a great increase in speed. Several places in normal day-to-day coding you will use Count(*), Max(col) etc.. to get data in order to return the required data set. Although this tip will be based on the data you are working on and the tables structure, it can be used several times to remove scans where you possibly were overlooking them.

Read More...

Check your MSN status from ASP.NET

I decided that I wanted to provide a “live chat” link on my website so I had a look around for what software I could use to do it. There were quite a few good options, but none that were good enough for me and free. So, I had a look into using my MSN account which turned out to be quite easy. First off, you will need to sign in and go to:

Read More...

IE8 doesn’t like me, it wants me to guess what to click.

Anybody want to make a guess which one of these is internet options? Perhaps it has something to do with Windowblinds I was running. And it was. Such a shame. But pretty funny none the less. Which also seems to solve the last problem I had. Bad, bad windowsblinds.

Read More...