Archive for August, 2007

Indexing for Dummies

Thursday, August 23rd, 2007

From time to time these days I have to put my DBA hat back on and review database schema designed by those whose focus is on application development. What I often find is that attempts to improve performance through indexing have been done in vain as the query optimizer either doesn’t use them enough to merit their creation or they have been created on the wrong columns.

Frequently, optimisation is referred to as a dark art, but here I am going to attempt to give some basic pointers to help enighten the novice database designer…

High Performance SQL Server DBA: Tuning & Optimization Secrets: Tuning and Optimization Secrets (IT In-Focus)

(more…)

SSIS Unpivot Component Example

Tuesday, August 21st, 2007

In my previous post on the pivot component, we created a report from a partially populated translation table.

In this post I’m going to show how we re-import our completed report back to our SQL Server table using the SSIS Unpivot component.

Microsoft® SQL Server™ 2005 Reporting Services Step by Step (Step by Step (Microsoft))

(more…)

SSIS SQL Command Component Inline Comments

Tuesday, August 14th, 2007

The SQL Command OLE DB component doesn’t like inline comments when using the Native SQL Server OLEDBConnection. Leave them in your SQL Code and you get the following error:-

An OLE DB error has occurred. Error code: 0×80004005.  An OLE DB record is available.  Source: “Microsoft SQL Native Client”  Hresult: 0×80004005  Description: “Syntax error, permission violation, or other nonspecific error”.

Take them out and hey presto…

SSIS Pivot Component Example

Thursday, August 2nd, 2007

It may be me, but as yet I haven’t seen too much written about the SSIS pivot and unpivot components.

Whilst they are not the easiest to configure, when faced with the option of importing to SQL Server and using a UNION or the new PIVOT clauses, I actually prefer the SSIS component.

Rather than actually explain the component, I thought it might be useful to go through a real example, so here goes…

Professional ASP.NET 3.5: In C# and VB (Programmer to Programmer)

(more…)