I am currently working on the next beta of the Database Health Reports.  I you haven’t seen the program check it out at http://DatabaseHealth.SteveStedman.com. I am looking for idea of new features to add in the next beta, and I just want to ask…. Any Suggestions?   Do you have any suggestions for another report or feature to add to …

Working on the next beta of the Database Health Reports… Any requests? Read more »

This is intended as a brief overview of indexing on SQL Server. Understanding and using indexes can lead to some major performance improvements. Non-Clustered Indexes Non-Clustered indexes are often times considered traditional indexing – contains pointers to the data. This is similar to the index at the back of a book. If you open a book to the index, then …

Index Overview – Clustered and Nonclustered Read more »

For more information on cursors, also take a look at the free SQL query training provided by Steve Stedman. Cursors are a feature of SQL Server that allow users to iterate through a result set one row at a time. This can be useful in situations where a user needs to perform a set of operations on each row of a …

T-SQL: A Simple Example Using a Cursor Read more »

In my Common Table Expressions presentation the topic of recursion often comes up, but for scalar functions in T-SQL, it might not be as common. This article has been written to show how a scalar function in SQL Server can call itself, thus being considered recursive. The example uses a recursive scalar function to calculate the Fibonacci sequence. What is …

Recursive Scalar Function in T-SQL Read more »

Here is a quick rundown on the T-SQL DATEPART function for SQL Server. DATEPART is used to pull a single part of a date/time element out as shown below. The following query uses DATEPART to extract the year from the datetime input. The following query uses DATEPART to extract the quarter from the datetime input. The following query uses DATEPART …

T-SQL DATEPART Explained Read more »

As I work on testing the Database Health Reports project, I have configured several test servers running as virtual machines using Hyper-V. Part of setting these up for testing, I usually end up installing the sample databases for SQL Server. The sample databases give me something to test against, and what usually ends up happening is I end up polluting …

Installing Sample Databases for SQL Server 2008R2 Read more »

The Database Health Reports project is going strong. Database Health Reports is a free application for monitoring the key metrics on your SQL Server. Created by Steve Stedman. Database Health Reports Includes Wait time monitoring. Once installed, keeps a historic record the database, query, program, user, and wait type. Real time reporting. Backup Status, Current Connections, Disk Space by Table, Identity Column …

Database Health Reports Beta 5 is Going Strong Read more »

My Common Table Expression presentation was accepted for SQL Saturday 212 in Redmond WA. This is the session that I am the most familiar with, and that I have presented the most times. I think this will be the 8th time I have presented this session, and after every previous presentation it has been improved. Over the last several months …

Common Table Expression accepted for SQL Saturday 212 in Redmond WA Read more »

SQL Server 2012 adds a new function called DateFromParts.  This new function simplifies the creating of a DATE type in TSQL over the older ways of doing it. The information here has been extracted from my SQL Saturday presentation on Whats New in TSQL 2012. Pre-SQL 2012 First lets take a look at how you would do the equivalent to DateFromParts before SQL …

DATEFROMPARTS function in TSQL Read more »

SQL Server 2012 adds many new features to Transact SQL (T-SQL).  One of my favorites is the Rows and Range enhancements to the over clause. These enhancements are often times referred to as the windowing functions. Want to learn more about the windowing functions? Check out this aggregation class that I have created: Overview:ROWS PRECEDING, FOLLOWING, UNBOUNDED, refers to the …

Rows and Range, Preceding and Following Read more »