SQL Server Management Studio Tools Pack

Every so often in the middle of a task, you can get stymied by the simplest of things and by the time you’ve spent 15 minutes looking for a shortcut, you give in to temptation and go off at a tangent to try and solve the minor problem yourself.

Some time ago I wrote a simple and easy to use generic tool to script out a Table/Database as INSERT statements. Well, I couldn’t find it today! After downloading 2 scripts that wouldn’t work for some undiscovered reason(!), I resisted the temptation to knock something up, did a quick search and found Mladen Prajdić‘s SMSS Tools Pack 1.5. Not only does it have the generate a table as INSERTS as a right-click action within SSMS but a whole lot of other really nice to have features (the full feature list is here), including Window Connection Coloring.

It’s available for SQL Server 2005 and 2008 in full or Express versions.

SQL Server 2008 Analysis Services Performance Guide

This white paper, SQL Server 2008 White Paper: Analysis Services Performance Guide, describes how application developers can apply query and processing performance-tuning techniques to their SQL Server 2008 Analysis Services OLAP solutions. This white paper is organised into three sections: Enhancing Query Performance, Enhancing Processing Performance and Tuning Server Resources.

These may also be of interest:

SQL Server 2008 Upgrade Guide

The SQL Server 2008 Upgrade Technical Reference Guide has been designed to achieve a smooth transition, and emphasises the need for sufficiently planning for the upgrade. This 490 page document covers the essential phases and steps involved in upgrading existing SQL Server 2000 and 2005 instances to SQL Server 2008 by using best practices. These include preparation tasks, upgrade tasks, and post-upgrade tasks.

It gives an overview of the technical issues and decisions that are involved in an upgrade to SQL Server 2008, as well as recommendations for planning and deploying an upgrade. It also contains a table of allowed SQL Server 2008 version and edition upgrade paths, as well as an upgrade planning checklist.

MVP Certification Program

Apologies for posting this info late (there was a hiccup obtaining the promotion code):

From now till March 31, 2009, Microsoft Certification are running a program where you receive a 10% discount on the cost of an exam and free retake offer.

You can use this Promotion Code AU2CDE16 to obtain the discount (valid only in Australia; talk to your local MVP(s) if you’re in another country).

The Exam Voucher Code is valid for exams taken by May 31, 2009 in Australia. Note that the limited time offer is valid for Microsoft Certified Technology Specialist (MCTS), Microsoft Certified IT Professional (MCITP) and Microsoft Certified Professional Developer (MCPD) exams only.

More information on how to obtain the vouchers and the Terms & Conditions of Usage are available at http://www.learnandcertify.com/.

Team Foundation Server Power Tools (October 2008)

I missed this new release of the Visual Studio Team System 2008 Team Foundation Server Power Tools back in October.

New in the October Release:

Team Members

  • Adds a new node under each Team Project to the Team Explorer called “Team Members” that identifies people who work on the project. Serves as a “pivot point” for information about and operations on people and teams.

Windows Shell Extension

  • Allows core version control operations within Windows Explorer without using Team Explorer.

PowerShell Support

  • Provides a PowerShell pipeline and cmdlets for TFS. Initial support is for basic version control operations.

TFPT (updated)

  • tfpt searchcs – the Search Changesets Power Tool brings up a dialog from which the user can search for changesets that match specific combination of criteria including server path, committed date range, committed user, check-in comments and check-in notes.
  • tfpt unshelve /undo – finds all pending changes in your workspace that match the changes in the shelveset and undoes them (including deleting the local files for pending adds).

Think Your PC has a Fast CPU?

I’m in the process of putting together the spec. for a new PC using one of the new Intel i7 chips, the Quad core 920 2.66MHz. I’ve been holding off until they (and the motherboards) fall out of the premium price bracket, which due to the less than stellar Aussie Dollar, is taking a bit longer than expected. I was interested how the top end CPUs compared and came across this very interesting benchmark graph. (OK, I know benchmarks should be taken cum grano salis)

Check out that quad Opteron 8354. Sweet!

SQL Server’s Built-in Traces

Most people are aware that when SQL Server is installed, it starts a lightweight background trace known as the default trace. If this has not been disabled (and it’s unlikely that it will have been), this trace will be running with a trace ID of 1:

SELECT * FROM sys.traces

This trace includes a small set of events for server starts and stops, object deletion and creation, log and data file autogrowth and other changes at the database level. One of the things this trace is useful for is unexpected events, such as finding out who dropped a table. You can examine the default trace’s contents in the same way as any other trace using fn_trace_gettable():

DECLARE @path varchar(256)

SELECT @path = path
FROM sys.traces
where id = 1

SELECT *
FROM fn_trace_gettable(@path, 1)

Another less known background trace that comes preconfigured with SQL Server 2005 is the BlackBox trace. Its primary use is in diagnosing intermittent server crashes and can be started by setting the @options parameter of sp_trace_create to 8. This trace uses 2 rollover files and toggles between them as one reaches its maximum size, which is configurable. A great tip from Chapter 2 of “Inside Microsoft SQL Server 2005: Query Tuning and Optimisation” is to wrap the blackbox trace definition in a stored procedure, and configure the stored procedure to run when SQL Server starts (that way intermittent problems are more likely to be captured after restarts):

USE master
GO
CREATE PROCEDURE StartBlackBoxTrace
AS
BEGIN
DECLARE @TraceId int
DECLARE @maxfilesize bigint
SET @maxfilesize = 25 –- 25MB maximum file size
EXEC sp_trace_create
@TraceId OUTPUT,
@options = 8,
@tracefile = NULL, — NULL = default SQL Server data file folder location: you might want to change this…
@maxfilesize = @maxfilesize
EXEC sp_trace_setstatus @TraceId, 1
END
GO

Set the procedure to start automatically when SQL Server is started:

EXEC sp_procoption ‘StartBlackBoxTrace’, ‘STARTUP’, ‘ON’