July 2008
No temporary tables or table variables are needed to perform FOR XML PATH concatenation, so the resulting query is not only fast but also high performing.
June 2008
If you have a lot of data to import into or export out of a SQL Server table, here are some tips that can save you a lot of time and aggravation.
May 2008
Ensuring that databases are being backed up properly is an important but time-consuming task, especially for DBAs who manage multiple servers and databases. The sp_ShowBackups stored procedure makes this task quick and easy.
April 2008
If you have to perform a full index analysis, here are two T-SQL stored procedures you can use to get detailed information about the indexes in a single table or an entire database.
February 2008
It's not uncommon for MDX programmers to create an elegant calculated member, only to discover that it's so slow that it can't be used in queries against a full data set. Learn why performance problems can occur and ways to work around those problems.
February 2008
Using SQL Server Management Studio (SSMS) to document job schedules involves a lot of mouse-clicking and cutting and pasting. You can avoid all that hassle by using the sp_ShowJobSchedules stored procedure.
January 2008
This user-defined function is flexible and easy to maintain because it uses a matrix and simple math to locate the date you need.
December 2007
LoadTraceFileToTable loads the data from a trace file into a trace table so that you can easily sort and analyze that data.
December 2007
Although SQL Server offers a variety of string functions, it doesn't have a function that strips out non-alphanumeric characters. Here's a user-defined function to fill that gap.
December 2007
It used to be difficult to answer questions such as "When was the last time this job was run?" and "What jobs will be affected if we bring down the system for maintenance?" With the cspJobMonitor procedure that's no longer the case.
November 2007
If you've ever come across the problem of hitting the 900-bytes limitation for unique constraints, you'll want to check out this simple solution.
November 2007
To determine the number of occurrences of a substring within a string, a user-defined function (UDF) performs a simple arithmetic calculation.
November 2007
Here's a stored procedure that consolidates the basic functions of osql and bcp. Switching between these utilities' output is simply a matter of changing the value of an input parameter.
October 2007
A reader's tests reveal that although various row-concatenation solutions produce the same results, the time it takes to get those results can vary significantly.
September 2007
The procedure cspBackupListing can list your databases’ most current backups, back up databases with previous backups older than 24 hours, or list all the backups for a database.
September 2007
If you often need to display the current date in different formats, you know that it can take a lot of code and effort. The FormatDate function changes that. By providing just two parameters, you can display any date in the format you need.
August 2007
Use a stored T-SQL procedure called ResetIdentities.sql to globally reset all identity values in a database to their initial seed value.
August 2007
This reader’s remote client needed a new virtual SQL Server 2005 machine within 24 hours to test a project release update. Learn how he added this server from 200 miles away.
July 2007
When a SQL Server job fails, SQL Server Agent sends a notification but it doesn't include the error message generated by that job failure. Here's how you can have the error message emailed to you.
July 2007
If you're having trouble connecting to a hidden SQL Server named instance, try adapting the connection string. Here's how.
Add these Headlines to your Website