In this issue

Featured Contents

Editorial

Featured Script

 
 advertisement
 
SQL DBA Bundle Top 5 hard-earned lessons of a DBA
In part one, read about ‘The Case of the Missing Index’ and learn from the experience of The DBA Team. Read now.
 
SQL Developer Bundle 12 essential tools for database professionals
The SQL Developer Bundle contains 12 tools designed with the SQL Server developer and DBA in mind. Try it now.
 
SQL Skills Deep technical training by world-renowned experts in 2013.
You can't get better ROI for your training budget. Read more.

In This Issue

Stairway to SQL Server Replication: Level 1 - Introduction to SQL Server Replication

In this Stairway, Sebastian will be covering the details of SQL Server transactional and merge replication, from understanding the basic terminology and methodology of setting up replication, to describing how it works and how the basic replication processes can be monitored.  More »


How to create and use Temp tables in SSIS

Creating temp tables in SSIS seems like a straight-forward process using the Execute SQL Task, however there are a couple of properties that must be changed. In this tip, we’ll walk through creating a simple temp table in SSIS. More »


From the SQLServerCentral Blogs - SSIS Precedence Constraint Tutorial

Recently we decided to create a series of videos for our SSIS Precedence Constraint Tutorial which is part of our... More »


Editorial - The Shortage of Programmers

This editorial was originally published on May 12, 2008. It is being re-run as Steve is on vacation.

At least at the top. I was reading the Joel on Software latest entry the other day about architecture astronauts and it seemed to make some sense in terms of developers building things they only think people will need, but the tone of the article was quite a rant. It actually sounds very different and a little angry compared to other things he's written in the past.

It was at the end of the rant that I saw this: "Why I really care is that Microsoft is vacuuming up way too many programmers." and "...between Microsoft and Google the starting salary for a smart CS grad is inching dangerously close to six figures and these smart kids, the cream of our universities, are working on hopeless and useless architecture astronomy..."

That last paragraphs (there's more ranting I left out), seem to sum up why Joel is angry. Whether he should be or not is another story. I tend to believe that if someone can pay more and someone wants to work for more and accept the environment, they should be allowed to do so. It might not seem fair and seem to give an advantage to a larger company, but I think we should all be allowed to choose for whom we work and why we go there.

The top graduates in any field are always in demand, really the top people in any field, and they will end up getting bigger salaries, and help to drive up the cost of labor. It happens in movies, in sports, and many other fields, and the top people get the headlines. But for every baseball or basketball player making $10 million a year, there are dozens getting $200k or $300k and that's not reported quite as widely.

The same thing happens here. Or at least I think it is happening here with the top graduates getting close to 6 figures. While that might push up the cost of the second tier and other CS grads (and other people changing jobs), I'm not sure it means that all programmers will cost this much. I think the salaries might rise a little over time, but overall it takes time for those averages to filter through to the HR departments and raise salaries. So most of us don't benefit and it's not worth getting upset about.

In smaller companies this might happen quicker as managers or even owners have the flexibility to quickly decide to pay more for a particular person, but I'm not sure how many companies want to match the larger salaries or perks of a Microsoft or Google. Or even can match that environment. If someone wants to go to work at a large company, with a big budget, lots of resources, the prestige of being in the news, etc., why is that a bad thing?

I guarantee you that for every 10 people that want to work at Microsoft or Google, there are some other very talented people that want to work in a smaller environment, avoid bureaucracy, have a larger impact on the company, or just live in a different place. I'm a good example of this.

A lot of people have mentioned they think I have some talent in the database area and I think it would be cool to work for Microsoft, especially in the SQL Server group, but unless I can work from Denver, there probably isn't an offer they can make to get me to move to Redmond. There's a lot more to my career than money or perks.

'Course I wouldn't mind them making an offer. Being the "Voice of Microsoft" has a nice ring to it :P.

Steve Jones


The Voice of the DBA Podcasts

Everyday Jones

The podcast feeds are now available at sqlservercentral.podshow.com to get better bandwidth and maybe a little more exposure :). 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 www.everydayjones.com.

I really appreciate and value feedback on the podcasts. Let us know what you like, don't like, or even send in ideas for the show. If you'd like to comment, post something here. The boss will be sure to read it.

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

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


Question of the Day

Today's Question:

When you run the following code, what will be printed to the Messages pane?

SET NOCOUNT ON;

CREATE TABLE HeapTest (ID INT IDENTITY(1, 1), DESCR VARCHAR(255));

IF EXISTS(SELECT *
FROM sys.dm_db_index_physical_stats(DB_ID(), OBJECT_ID('HeapTest'), NULL, NULL, 'SAMPLED')
WHERE page_count > 0)
 PRINT 'Table Contains Pages After Create';

INSERT INTO HeapTest (DESCR)
SELECT TOP 20000 REPLICATE('X', 255)
FROM sys.objects o1
CROSS JOIN sys.objects o2;

IF EXISTS(SELECT *
FROM sys.dm_db_index_physical_stats(DB_ID(), OBJECT_ID('HeapTest'), NULL, NULL, 'SAMPLED')
WHERE page_count > 0)
 PRINT 'Table Contains Pages After Load';

DELETE FROM HeapTest;

IF EXISTS(SELECT *
FROM sys.dm_db_index_physical_stats(DB_ID(), OBJECT_ID('HeapTest'), NULL, NULL, 'SAMPLED')
WHERE page_count > 0)
 PRINT 'Table Contains Pages After Delete';

INSERT INTO HeapTest (DESCR)
SELECT TOP 20000 REPLICATE('X', 255)
FROM sys.objects o1
CROSS JOIN sys.objects o2;

IF EXISTS(SELECT *
FROM sys.dm_db_index_physical_stats(DB_ID(), OBJECT_ID('HeapTest'), NULL, NULL, 'SAMPLED')
WHERE page_count > 0)
 PRINT 'Table Contains Pages After Load';

TRUNCATE TABLE HeapTest;

IF EXISTS(SELECT *
FROM sys.dm_db_index_physical_stats(DB_ID(), OBJECT_ID('HeapTest'), NULL, NULL, 'SAMPLED')
WHERE page_count > 0)
 PRINT 'Table Contains Pages After Truncate';

DROP TABLE HeapTest;

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

This question is worth 1 point in this category: page. 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.

Pro SQL Server 2012 Practices

Expert SQL Server Practices 2012 Edition is an anthology of high-end wisdom from a group of accomplished database administrators who are quietly but relentlessly pushing the performance and feature envelope of Microsoft SQL Server 2012. With an emphasis upon performance—but also branching into release management, auditing, and other issues—the book helps you deliver the most value for your company’s investment in Microsoft’s flagship database system.

Get your copy from Amazon today.


Yesterday's Question of the Day

Santa receives a list from you of things that you would like to receive this Christmas. The list has 7 items, and Santa decides that you have been good enough this year to receive 5 of them. In order for the elves to find the items that Santa has marked as approved, which index type is best chosen for the list of gifts that Santa has marked with an approved flag?

Answer: filtered index

Explanation: This should be an easy one. A filtered index, which filters on the approved flags, is the best choice for Santa's gift list.

Ref: Filtered Indexes - http://msdn.microsoft.com/en-us/library/cc280372%28v=sql.100%29.aspx

» Discuss this question and answer on the forums

Microsoft SQL Server 2012 Master Data Services

Harness your master data and grow revenue while reducing administrative costs. Thoroughly revised to cover the latest MDS features, Microsoft SQL Server 2012 Master Data Services, Second Edition shows how to implement and manage a centralized, customer-focused MDS framework. See how to accurately model business processes, load and cleanse data, enforce business rules, eliminate redundancies, and publish data to external systems. Security, SOA and Web services, and legacy data integration are also covered in this practical guide.

Get your copy from Amazon today.


Featured Script

Get record count for a specific database

This will sum all of the records of a specified database, excluding the 'sysdiagrams' table. 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 : Administering

SQLServerAgent could not be started (reason: Unable to connect to server ''XXX; SQLServerAgent cannot start). - Hi Everyone.... I am getting this issue in windows server 2003 server cluster....I try to bring agent node online but no...

SQL Server 2005 : SQL Server 2005 General Discussion

Insert Error: Column name or number of supplied values does not match table definition. - We are migrating from sqlserver 2000 to sql server 2005 and Now i am stcuk with this strange thing which...

SQL Server 2005 : SQL Server Newbies

Stripping out all non-numerical characters - SELECT accountid,New_Column = REPLACE(telephone1,SUBSTRING(telephone1,PATINDEX('[^0-9]',telephone1),1),'') INTO #YourNewResults FROM #TelephoneTable I have the script above which I thought would remove all non-numerical characters from the field...

SQL Server 7,2000 : Administration

Replication problem - Hi Guys Whereas I did not find my problem here, I am posting the new one. Actually I set up a transactional...

SQL Server 2008 : SQL Server 2008 - General

how to refresh a table in subscriber - hi i have two program ([U]App1[/U] And[U] App2[/U]) on two seperate system.on [U]App1[/U] there is a database named [U]DB1[/U] and on...

SQL Question - I am using Sql 2008 server and Dreamweaver cs4 and wanting to use asp.net. Or how to connect to Sql...

Query balance of account from two or more tables - I am having two tables as follows voucherCr srno vouchertype voucherprefix voucherno crparty cramount 1 PURCHASE P 1 2 55000 2 PAYMENT R 1...

big table insert advice - Hi I need to refresh data in a table from another table. It has about ~14 million records that need...

Triangle join on same table - Hello, I have a problem that I need to have a solution for. The problem today is performance. I have a row...

Dynamically adding the schema name or populating the schema name - We have a script that we run on various different databases of customers. so for example it may have a line...

Len did not display right size - I use len function to find out varchar column data size but did not display right size. For example, in some...

SSRS 2008 mail issue - Hi, i have setup the database mail fine and can send database mail. But from SSRS subcription on SQL 2008 sp1....

tempdb fileplacement - Hi all, I have a 1T, high I/O database in a SAN environment on which I have planned the database files...

SQL Server 2008 : T-SQL (SS2K8)

How often are indexes updated? - When an index is created with STATISTICS_NORECOMPUTE = OFF, how frequently is the index updated? Is it updated every time the...

Data type precedency ntext and hierarchyid - Tinyint and bit have a higher precedence than ntext. Why is this? Couldn't ntext we complex alphanumeric values? Tinyint and...

Cross Apply to get child parent value from Xml in SQL Server - I have following xml: [quote]<root> <row value="US"> <col value="00">Jon</col> <col value="01">David</col> <col value="02">Mike</col> <col value="03">Nil</col> </row> <row value="Canada"> <col value="C1">Pollard</col> </row> ...

t-sql 2008 avoid a cartesian product - For a customer, I need to load data from excel 2010 spreadsheets into a sql server 2008 r2 database for...

Time - Adding minutes and seconds - I have the 2 columns with time datatypes. select top 5 [Connect Time2],[totalTime2] from dbo.verizonDetails Connect Time2 totalTime2 08:05:44.0000000 00:13:00.0000000 08:05:57.0000000 00:01:00.0000000 09:07:42.0000000 00:03:00.0000000 09:07:46.0000000 00:09:00.0000000 09:08:08.0000000 00:01:00.0000000 I want to add the...

SQL Server 2008 : SQL Server Newbies

force input of another field when putting a value of 1 in field - I have a field to indicate a delete which will be a text char of "1" in a field called...

Number weeks of work - Number weeks of work Hi there. I should check that the the number weeks of work for the five names is...

Create Table and Bulk Insert - Hi guys, I have a .csv file wich has the following information (exactly like this): List Name: User Format Version:1.2.5.0 Date:12/11/2012 12:00:34...

Problem With AdventureWorks - Hello: I am new to this forum and would like some help with SQL Server 2008 R2 Express. I downloaded SQL...

SQL Server 2008 : SQL Server 2008 High Availability

Is database mirroring used much in the industry? - I'm curious because some features of SQL Server are not used that frequently in businesses. What types of business environments...

SQL Server 2008 : SQL Server 2008 Administration

Resource database is read-only - Even though the resource database is read-only, it is updated by SQL Server, right? Does sys.dm_db_missing_index_details have information that results in...

Profiler capturing certain events for performance tuning - I read that a typical trace to tune the SQL Server's performance is to include SQL:BatchCompleted and RPC:Completed events. Is...

Large objects in SQL Server - I know large objects aren't stored in rows (e.g., varchar(max) and BLOB data). Filestream data is stored directly on the...

MAXDOP setting - I know that this is slighty a 'depends' question but our server is heaver user transactional server. Our SQL 2008R2 server...

JobName Not found error - HI All, I'm seeing a intresting error on one of my SQL Instance. Below is the script I'm running,, connecting to...

Using ::fn_dblog() to find who deleted the rows in a table. - Hi All, Recently some one deleted some rows from a table. I was asked to find out who did it. Since...

Programming : Service Broker

Conversation group and message queue. Plus some industry questions. - How does a message queue relate to a conversation group and the service broker? Is Service Broker used much in the...

SQLServerCentral.com : Anything that is NOT about SQL!

What are you planning to do in 2013 in the database domain? - 2013 is on the way. Warm greetings to all of you first. I am posting the questions here to collect and...

Are the posted questions getting worse? - Is it me, or are the posted questions getting worse these days? I just read a post by someone apparently in...

Reporting Services : Reporting Services

Reporting services FAQ - Hi, Anyone give me the links for FAQ in reporting services. Thanks in advance.

Database Design : Hardware

Different RAID controllers for performance and SANs - I hear it is best to have at least three disk controllers for these items: -SQL Server main installation (master database...