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 database files to a different location

Sometimes it’s necessary to move the files associated with a database (.mdf, .ldf and .ndf) to a different drive or folder. Fortunately this is fairly easy to achieve, although it does require all users to be disconnected from the database. Here are two ways of doing this using either ALTER DATABASE or the sp_detach_db and sp_attach_db system stored procedures.

Featured Script

Clearing entries for failed jobs in the SQL agent history

SQL Server agent keeps a log of events in a table, this is used for the ‘View History’ which displays events for a job in the Log File Viewer. This script will delete selected rows from the history table, such as failed job runs.

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