In this issue

Featured Contents


Featured Script

Take the Database Development survey $100 Amazon Vouchers Up For Grabs!
Take our short survey about database development and be entered into the prize draw! Begin database development survey.
Read Hard Earned Lessons from a DBA Top 5 Hard-earned Lessons of a DBA
Lesson two has now been released! Read ‘Beating Backup Corruption’ and learn from the very best. Read now.
Automate deployments with Deployment Manager NEW! Automate your .NET deployments
Deploy ASP.NET applications and SQL Server changes fast, frequently, and without fuss, using Deployment Manager, the new tool from Red Gate. Try it now.

In This Issue

Update statistics in parallel

This articles shows a technique that generates and launches an SSIS package to update statistics in parallel. More »

SQL Server 2012 Build List

A list of the builds of SQL Server 2012 through CU#4. More »

Beating Backup Corruption

The most critical task for all DBAs is to have a Backup and Recovery strategy that ensures, every day, that in the event of a disaster they can restore and recover any database, within acceptable limits for data loss and downtime. Even with all the required backups in place, it's easy to miss subtle failings in the overall plan that can, and eventually will, defeat your recovery plans.  More »

From the SQLServerCentral Blogs - Adding new data files to a log shipped database

I ran into an interesting problem recently. There is a 4TB database that is log shipped to a DR site,... More »

From the SQLServerCentral Blogs - Why is My New Server Under CPU Pressure?

Signal waits frequently translate to the amount of time that SQLOS is under pressure for CPU resources, as outlined in... More »

Editorial - Still 32

I was listening to a presentation recently and the presenter talked about some of the restrictions in working with 32 bit SQL Server on 64 bit Windows hosts. Another person joked that any companies still running 32 bit software were way behind the times. I heard a comment that surely everyone runs 64 bit hardware these days, don't they?

Do they? How many servers in large companies are still running on the x86 architecture? I know I have old laptops still running those processors, though I'd like to think that most companies have a hardware refresh rate that's no longer than 5 years, and most laptops and servers would be x86.

The platform architecture, however, doesn't necessarily imply our software has been upgraded to 64 bit. There are problems with various drivers that won't run under 64-bit architectures. Excel is often a problem as SQL Server moves to 64-bit versions. There are 64-bit drivers, but the change, testing, etc. effort for many companies may not be worth pursuing. It can be annoying for us data professionals, but it's a valid business decision. The same argument often applies to those companies running SQL Server 2000 (or older versions).

Five or six years ago I heard a presenter that worked for a large Fortune 100 company say that their policy was for applications to last ten years. That included the hardware and software, since the cost of change, whether through new software or major upgrades, was significant. With many companies still running SQL Server 2000, I suspect that many companies have a similar, unofficial, policy. 

I don't know whether the majority of software we use in our careers is 32 bit or 64 bit, but I am sure that we will have to deal with the former for years to come. You can complain about it, but you better learn to work with it.

» Join the debate, and respond to today's editorial on the forums

The Voice of the DBA Podcasts

We publish three versions of the podcast each day for you to enjoy.

Everyday Jones

The podcast feeds are available at Comments are definitely appreciated and wanted, and you can get feeds from there. Overall RSS Feed: or now on iTunes!

Today's podcast features music by Everyday Jones. No relation, but I stumbled on to them and really like the music. Support this great duo at

You can also follow Steve Jones on Twitter:

» To submit an article, rant or editorial, log in to the Contribution Center

Question of the Day

Today's Question:

Using SQL SERVER 2012

/* Version:
Microsoft SQL Server 2012 - 11.0.2218.0 (X64)
 Jun 12 2012 13:05:25
 Copyright (c) Microsoft Corporation
 Developer Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) */

USE AdventureWorks2012


I create the following temporary table

CREATE TABLE #Seasons(Hdate DATE,Season VARCHAR(10))

I then execute the following T-SQL:

INSERT INTO #Seasons(Hdate,Season)  

   SELECT HireDate, CHOOSE(MONTH(HireDate),'Winter','Winter', 'Winter','Spring',   'Spring','Summer','Summer','Summer','Fall','Fall','Fall','Winter') AS Season_Hired  FROM  [HumanResources].[Employee] 

SELECT COUNT(Season),Season 
 FROM #Seasons 
 GROUP BY Season.

The questions are:  Which season has the least number of hires? Which season has the largest number of hires? (select 2)

Think you know the answer? Click here, and find out if you are right.

This question is worth 1 point in this category: CHOOSE. We keep track of your score to give you bragging rights against your peers.

We'd love to give you credit for your own question and answer. To submit a QOD, simply log in to Contribution Center.

Securing SQL Server

Written by Denny Cherry, a Microsoft MVP for the SQL Server product, a Microsoft Certified Master for SQL Server 2008, and one of the biggest names in SQL Server today, Securing SQL Server, Second Edition explores the potential attack vectors someone can use to break into your SQL Server database as well as how to protect your database from these attacks. In this book, you will learn how to properly secure your database from both internal and external threats using best practices and specific tricks the author uses in his role as an independent consultant while working on some of the largest and most complex SQL Server installations in the world. This edition includes new chapters on Analysis Services, Reporting Services, and Storage Area Network Security.

Get your copy from Amazon today.

Yesterday's Question of the Day

What is the difference between COALESCE and ISNULL? (choose 2)


  • Coalesce can take more than two parameters, and IsNULL takes exactly two parameters
  • The result returned by coalesce depends on data type precedence

Explanation: COALESCE can use a variable number of paramters, where ISNULL takes just two parameters. The return type of COALESCE does depend on the data type precedence rules and only COALESCE is an ANDI standard function.


» Discuss this question and answer on the forums

SQL Server 2012 T-SQL Recipes: A Problem-Solution Approach

SQL Server 2012 T-SQL Recipes is an example-based guide to the Transact-SQL language that is at the core of SQL Server 2012. It provides ready-to-implement solutions to common programming and database administration tasks. Learn to create databases, insert and update data, generate reports, secure your data, and more. Tasks and their solutions are broken down into a problem/solution format that is quick and easy to read so that you can get the job done fast when the pressure is on. Get your copy from Amazon today.

Featured Script

List Database Users and their Corresponding Roles

Database Users and their Corresponding Roles and type login. More »

Database Pros Who Need Your Help!

Here's a few of the new posts today on the forums. To see more, visit the forums.

SQL Server 2005 : Business Intelligence

where to install the new warehouse SQL Server? - I’m starting to build the DM design for BI data warehouse; I have two SQL server 2008 databases that will...

Custom DLL deployment - Hi, I have two SSIS packages which uses the Custom DLL in a script task. This Custom DLL has code which...

SQL Server 2005 : Development

Create string using input values - Hi, I have a beginning Year and a End year and i have to compute/create a string based on the given...

SQL Server 2005 : SQL Server 2005 General Discussion

Strored procedure returns different row counts - I have a Select statement based on few joins. When I run it on my development server and test development...

Running a batch job in a sql stored proc - We have someone who executes a batch job the result of which is some data is moved from txt files...

Barcode 128 generator (using scalar function) - I'm looking for a barcode generating Function that uses the standard Code128. Apparently no function that fixes this has been...

Auto Save / Auto recover in Management Studio? - I have come in today to find my PC rebooted, I suspect due to windows updates, (it decides to reboot...

SQL Server 2005 : T-SQL (SS2K5)

plz i need help!!!! - i want the entry for adding 2 value but i want show in the third cloumn all result with null...

SQL Server 7,2000 : T-SQL

How to Reduce the Logical Reads, to imporve the Performance of the Query - Hi, I heard abt the Logical/ Physical Reads In Sql Server. Could any one please explain me What are Logical Reads? What are Physical...

SQL Server 2008 : SQL Server 2008 - General

sql writer issues - hi.......guys. sql writer while taking backup it backup for entire volumes or it take only sql backup ??? thnx...........reply

partitioning - swapping in from smaller higher grain to lower grain - I have a table partitioned at the grain of Year. I have a second table partitioned at the grain of month. I...

SQL SERVER CPU Usage 100 % even at no traffic time - HI, SQL SERVER CPU Usage shoots up to 100 % even at a time when user is not accessing application or any...

The query has been canceled because the estimated cost of this query - Hi Experts, I am getting below error while executing the stored procedure. The query has been canceled because the estimated cost of...

Import Excel using OPENROWSET only works for SA - In our development environment web application we're uploading excel files to the SQL server and importing them using openrowset. This...

facing serious performance issues, please see the scenario below need urgent help - Please chk the code below - declare @MLLCMBI_GH_YR varchar(50)='2012' declare @MLLCMBI_GH_MNTH varchar(50)='March' --declare @MLLCMBI_GH_WK varchar(50)='W2' --declare @MLLCMBI_GH_BNK varchar(50)='ADB' declare @TMPVW table ( userType varchar(50), status varchar(100), bank varchar(50), date datetime, WEEK VARCHAR(50) ) --WHILE @chrind > 0 --...

CSV to Excel - How to automate the process of converting csv file to excel file?

Join Values from 2 columns - Hi geniuses, I have a table which contains groups inside Receivers and Payers (2 columns). Some groups can be Receivers and Payers,...

SQL Server 2008 : T-SQL (SS2K8)

WHERE vs. GROUP BY again - The following two T-SQL statements return exactly the same row set whatever data is: [font="Courier New"]SELECT [i]something [/i]FROM [i]somewhere[/i] WHERE [i]condition[/i]...

t-sql 2008 r2 error message - This is the first time I am writing a trigger. I am getting the following error message on a sql...

Case sensitivity when declaring paramters - My server is case sensitive (CS) My DataBase is no (CI) The smss query editor works fine for this kind of query...

Update works on some systems but on few others - Hi All, I have some update and insert queries to update GEO location data, which when I execute on my system...

sql trigger problem - I am trying to write my first trigger on a sql server 2008 r2 database. I keep getting a procedure error...

Stuck with PIVOT - Hi, To simplify the problem, I have JOINed 3 tables together to create a new table with the following output: [img][/img] I...

Help on how to count guests in hotel every day - I have a table keeps guest records in a hotel. For each guest I have check in date and check...

How To Validate in Procedure - I Created a one Procedure ..its given Below... [code="sql"]create procedure [dbo].[USP_Reliance_Master_Upload] as begin declare @dt datetime , @Mnth varchar(10) BEGIN TRY SELECT @dt...

SQL Server 2008 : Working with Oracle

Oracle 9i to sql server 2008 migration - I want to migrate from Oracle 9i to Sql server 2008 using SSMA. Please let me know what steps will...

SQL Server 2008 : SQL Server Newbies

Property Collation is not available for Database - Backup job failed last night - viewing the history logs gave the following message "Could not find database ID 15. Database...

how to attach database with variable path by storedprocedure?? - please help me, how to attach database with variable path??

SQL Server 2008 : SQL Server 2008 Administration

migrating dts 2000 packages to ssis 2008 packages - can please any one tell me that step by step process of how to migrate dts 2000 packages to ssis...

Career : Certification

Would using the MS Press books be sufficient? - After being an MS SQL DBA for over a decade I'm finally looking at getting some certifications. Unfortunately though it'll...

Reporting Services : Reporting Services

barcode generation problem in RDLC local report - I am trying to encode [url=]barcodes in RDLC reports[/url], I am using vs 2008 and C# class library. It works well...

Data Warehousing : Integration Services

SSIS doesn't import TXT file - I'm trying to do import of that TXT file [url=][/url] into that table [url=][/url] via this DTSX [url=][/url]. Surprisingly, it gives me no error at all...

where to install the new warehouse SQL Server - I’m starting to build the DM design for BI data warehouse; I have two SQL server 2008 databases that will...