Recent Blogs and Articles

Welcome to SQL Matters

SQL Matters is a resource for SQL Server Developers, Architects, DBAs and others interested in SQL Server and related technologies . Our site contains a wide range of articles, tips, blogs, quiz questions and other information about the SQL Server range of products. This includes Integration Services (SSIS), Reporting Services (SSRS), Analysis Services (SSAS) and some other products that we feel might be of interest to the SQL Server community such as PowerPivot and Report Builder.

Here are some examples of technical information that you might be interested in :

Featured Tip

Moving a Table to a Different Filegroup

By default a database has a single filegroup called PRIMARY and all tables are stored in this filegroup. However it’s possible to create other filegroups and store tables in these new filegroups. One of the most common reasons for doing this is if you have some high performance disks and want to store certain tables on those faster disks. This is especially useful for data warehouses and other large databases where you might have some data that is accessed more frequently and where response times are particularly important. This article shows how to create another filegroup and move existing tables into the new filegroup (if you are creating new tables then you can just create them on the new filegroup). I have used the AdventureWorks2008R2 demo database which can be downloaded from the CodePlex website.

Featured Script

Checking For Unused Database Files

It's useful to periodically check if there are any old database files that can be deleted from a SQL Server. Usually database files will be deleted along with the database, however this is not always the case. This script will identify unused files.

Quick Quiz : DATALENGTH results

What is the result of the following SQL query ?
DECLARE @MyStr NVARCHAR (100)
SET @MyStr = 'ABC'
SELECT DATALENGTH(@MyStr)
Choose one : a) 3    b) 6    c) 50    d) 100