SQLServerCentral - www.sqlservercentral.com

A community of more than 1,600,000 database professionals and growing

Featured Contents

Featured Script

The Voice of the DBA

Job Worries over Automation

There was a report recently where the NSA noted that they are reducing the number of system administrators by 90%. If the report is true, that would certainly worry many of the people in the technology industry. However I'm not sure that the quote given in the article means what it looks like at first.

Much of the technology reports that we see aren't completely true since many of the reporters aren't that familiar with the details of how computer technology works. In this case, however, we have a quote: “What we’re in the process of doing – not fast enough – is reducing our system administrators by about 90 percent,” It might be hard to interpret this remark in any way other than the NSA is looking to reduce the number of people, but if you read further, the piece notes that the NSA is concerned about contractors, not necessarily FTEs. I suspect that any reduction in contractors employed by other companies will be made up by increased internal headcount.

However even if the NSA can reduce the number of people needed to administer their systems, I'd suspect that means that they had too many people to begin with. The various reports of this story all talk about automation being used increasingly to handle the load of system work, but the idea that automation replaces people is a myth. Automation usually results in less growth of people, but rarely a reduction in staff.

I've heard the concerns over automation replacing technology workers for decades (literally) and I've yet to see it happen. We have more technology workers than ever before, and no sign of there being less in the future. Your department might change, you might hire less, but there will be lots of jobs in technology for the foreseeable future. In other departments that might not be the case, but I bet you we'll have system administrators, DBAs, and developers for a long, long time in most companies that have them today.

Steve Jones from SQLServerCentral.com

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


Video and Audio versions

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.

Follow Steve Jones on Twitter to find links and database related items and announcements.

Steve Jones

Windows Media Video ( 16.4MB) feed

MP4 iPod Video ( 19.1MB) feed

MP3 Audio ( 4.0MB) feed

Feeds are available at iTunes and Mevio

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

ADVERTISEMENT
Deployment Manager

Easy release management

Deploy your .NET apps, services, and SQL Server databases in a single, repeatable process with Red Gate’s Deployment Manager. Get started now.

SQL in the City

SQL in the City – Free SQL Server training in the US

Don’t miss out on learning about best practices for SQL Server database development and administration from top SQL Server MVPs. These free seminars and events are coming to San Diego, Denver, Pasadena, Atlanta and Charlotte. Find out more and register.

SQL Toolbelt

Want to work faster with SQL Server?

If you want to work faster try out the SQL Toolbelt. "The SQL Toolbelt provides tools that database developers as well as DBAs should not live without." William Van Orden. Download the SQL Toolbelt here.

Featured Contents

 

Stairway to Database Design Level 3: Building Tables

Joe Celko from SQLServerCentral.com

There are several types of tables, each with their special requirements for rules and integrity constraints. Whatever the requirement, table-level constraints will ensure that the rules are enforced and data integrity is maintained. More »


 

SQL Saturday #190 Denver

Press Release from SQLServerCentral.com

Join us at SQL Saturday Denver on September 28. SQL Saturday is a training event for SQL Server professionals and those wanting to learn about SQL Server. This SQL Saturday includes a number of options for pre-conference training in Denver, including a free session presented by Steve Jones. More »


 

Installing SQL Server 2014 CTP1

Additional Articles from Database Journal

If you are interested in learning firsthand what new features are available, then you should download and install the new SQL Server bits. In this article Greg Larsen will walk you through preparing, downloading and the steps to install the SQL Server 2014 CTP1 release. More »

Question of the Day

Today's Question (by bitbucket-25253 ):

I have the following settings for my SQL Server 2012  2008R2

SET NUMERIC_ROUNDABORT, QUOTED_IDENTIFIER OFF;

SET ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT,ANSI_NULLS ON; 

I execute the following T-SQL:

IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[SomeTable]') AND TYPE IN (N'U'))
  DROP TABLE [dbo].[SomeTable]

CREATE TABLE DBO.SomeTable( [Case] char(3),
[Hours] int, [Type] int)

insert SomeTable
select 'xxx', 3, 1 union all
select 'xxx', 3, 2 union all
select 'xxx', 4, 1 union all
select 'xxx', 1, 1

I then execute the following T-SQL statement:

select SUM(Case 
            when [Type] = 2 then -1 * [Hours] 
            else [Hours] 
           end) as TotalHours
 from SomeTable

The Questions are:

  1. Does the create table statement fail or succeed?
  2. If the create table statement succeeds what value of TotalHours is returned by the Select statement?
  3. If the create table statement fails what error msg number is returned when the Select statement is executed?

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


We keep track of your score to give you bragging rights against your peers.
This question is worth 2 points in this category: Reserved Words.

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

ADVERTISEMENT

SQL Server Execution Plans

SQL Server Execution Plans shows you what's going on behind the scenes in SQL Server. They can provide you with a wealth of information on how your queries are being executed by SQL Server, including: Which indexes are being used, and where no indexes are being used at all. How the data is being retrieved, and joined, from the tables defined in your query. How aggregations in GROUP BY queries are put together. Grab your copy today from Amazon!

Yesterday's Question of the Day

Yesterday's Question (by Steve Jones):

What does the visibility attribute control for assemblies?

Answer: If set to off, the assembly is intended to only be called by other assemblies and not used in functions, procedures, etc.

Explanation: The visibility controls whether or not the assembly is visible for creating functions, stored procedures, or other objects using this assembly. When set to off, the assembly is intended to be called only by other assemblies.

Ref: ALTER ASSEMBLY - http://msdn.microsoft.com/en-us/library/ms186711.aspx


» Discuss this question and answer on the forums

Featured Script

Primary Keys which are not Clustered Indexes in a database

Bodhisatya Mookherjee from SQLServerCentral.com

Recently I was asked to find all the Primary keys that are not clustered Indexes in the database.I constructed this script which will help us to locate the primary keys in the database which are not clustered index.

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 2014 : Administration - SQL Server 2014

Linked Server Distributed transaction Error - Hi, I am trying to execute procedure through linked server , but after executing the same it is giving me following error. OLE...


SQL Server 2012 : SQL 2012 - General

Since Text and NText are being deprecated, what is the best data type to use for a Full text Index ? - I know varchar and nvarchar are the obvious ones, but i have noticed some developers using Varbinary and XML. Would there...

Sql 2012 AlwaysOn Backups on All Servers? - I'm setting up a VM development environment and was wondering if it's possible with Sql 2012 AlwaysOn to get backups...

Why logs so big - I have a small db at my client site (SS2012,MS Server 2008) with an Access front end. It does some...

excluding a range in a query - Hi All Can someone perhaps put this in an example query please? exclude all "BA" items except BA00044 Many thanks

Microsoft's Data Virtualization Strategy - It seems to me that SSAS tabular models have some similar features when compared to data virtualization software, but the...

SQL Alerts and WMI - I'm trying to create an alert disk % free space left using: SELECT * from __InstanceModificationEvent WITHIN 30 WHERE TargetInstance ISA 'Win32_LogicalDisk' AND...


SQL Server 2012 : SQL Server 2012 - T-SQL

Help On Query - CREATE TABLE [dbo].[tmp]([msisdn] varchar(20) ) DECLARE @intFlag bigINT SET @intFlag = 15210000000 WHILE (@intFlag <=15219999999) BEGIN PRINT @intFlag insert into tmp select @intFlag set @intFlag= @intFlag + 1...

EST TO UTC - Hi I have to create offset to convert my EST Datetime columns to UTC to compare with Utc datetime columns.The server...

send_dbmail recipients from table - Hi All, my first post here maybe a newby one. Well, i have a table with data as from example below. statuscd|ordernum|name|date|email|sent| OK|22112233|john|17/09/2013|john@john.com|N| OK|56489161|mike|16/09/2013|mike@mike.com|N| ... ... Idea is that...

Can't we rely on execution plan for performance !!! - Hi all, I have a heap table [b]USER_COUNT_MONITOR[/b] with a single column [b]ID[/b] and DISTINCT values from 1 to 100000...

Trigger Issue... - Hi, I've a table that has a trigger for insert that executes the flowing statement: [code="sql"] UPDATE ArtigoArmazem SET QtReservada = 0 FROM INSERTED...


SQL Server 2008 : SQL Server 2008 - General

Remote Access Connection Manager Service In SSIS - I need create package to check whether the Remote Access Connection Manager Service is running or not and execute message...

LOG_REUSE_WAIT_DESC is ACTIVE_TRANSACTION but dbcc opentran shows nothing - I was trying to shrink the log on a database in simple recovery. It shrunk by about 10Gb, and then wouldn't...

DBA Roles and Responsibilties - All, I am in kind of bad situation here at work. I just took a new job less than 3...

openquery: "DBTYPE" of 130 at compile time and 129 at run time - Hi guys, I want to add a SQLAgent check into my hourly job, alerting if it's down as long as its...

active active sql cluster - Hi All, We need to install active active SQL cluster 2008 r2 as per the client requirement Can any one tell me...

Help with Excel (Un)pivot Import - This is probably really simple but I just can't see it this morning. I have an Excel table like this [code="other"] |...

Job steps - Data sources - Hi, Within a SQL job I would like to to get the information from the Data sources tab, so for each...

Temporary table created in parent SP persists in child SP - Many of you may know this but I found below observation today and though of posting it: I have creted One...

error in mirroring - am getting the following error, when i start executing mirroring after the endpoints configured TITLE: Database Properties An error occurred while starting...

IO stalls --very high in PROD - Hi, I'm using the below query to find out the IO stalls on my SharePoint databases and the values are...

Lots of awaiting command with status sleeping in SQL Server 2008R2 - Hi All, In my SQL Server 2008R2; if i run SP_WHO2 i see lots of SPID(Awaiting Command) with sleeping status. I...

how to find staled statistics? - I'm using the below query to find when was my statistics last updated. [b]But I wanted to know how stale...

can i apply SP3 on Microsoft SQL Server 2008 (RTM)? - SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition') 10.0.1600.22 RTM Standard Edition (64-bit) select @@version Microsoft SQL Server 2008 (RTM) - 10.0.1600.22 (X64) Jul 9 2008 14:17:44 Copyright...

SQL Query (Powerpivot) – for Excel Headers - Hi, Today I’m using a connection to an excel file using PowerPivot and I’m using a sql query to return just...

Need help in building a SQL query? - Hi Experts, I have table called "Entries" having general information of Employees as... TableName: Entries [code="sql"]Select * from Entries where mskey = 1234[/code] MSKEY, ATTRNAME, AVALUE 1234,...

Query with One Column Changing by Month - Hello all, I "inherited" the following code as part of a query for a report: [code="sql"]-- January if @MonthUnits = 1 begin insert into...

Merge with more then one insert statement - Table1 : id, Name Table2: id, name1,name2,name3,name4,name5 MERGE Table1 t1 USING table2 t2 ON t1.id = t2.id WHEN NOT MATCHED THEN INSERT(name) values(t2.name1) values(t2.name2) values(t2.name3) values(t2.name4) values(t2.name5) as like this i have 16 names...

DELETE Duplicates - Hello, I did a check in my table and I found these duplicates: Key Month Usage 45 Sept 464 45 Sept 471 28 Sept 762 28...

Lookup tables - when too ude them - Hi All, I need to create an attribute table for say a product. Each of the attributes for a product can...

Second Highest - Could anyone know how to write the query fro fetching the second highest salary without using top, rowcount and rank...

trim column values - Hi Professionals I have a varchar column in my table with pricing information in it that has up to 4 decimal...

I Can’t Connect to Analysis Services in SSMS 2008R2 - Installed SQL Server 2008 R2 and chose to install SSIS, SSRS and SSAS. now I am unable to connect SSRS...

Import Text File to SQL Database - I have a text file with no delimiters and fixed width fields that I need to import into a SQL...

Why is my logon trigger blocking logons? - I've created the following trigger to track logons: [code="other"] Use master Go Create database AuditDB Go USE [AuditDb] GO CREATE TABLE [dbo].[ServerLogonHistory]( [SystemUser] [varchar](512) NULL, [DBUser] [varchar](512)...

Executing Scribe packages with stored procedure in SQL - Hi, Is there anybody that has any experience launching a scribe package (dts) with in a stored procedure on a SQL...


SQL Server 2008 : T-SQL (SS2K8)

converting nvarchar to decimal - Hi, i am trying to convert a nvarchar column to a decimal value. the nvarchar column has empty records as well...

How do I remove the Nulls in my output? - CREATE TABLE #Total_Count (NUM_DEATHS_1870 numeric (8,0), NUM_DEATHS_1880 numeric(8,0)) INSERT INTO #Total_Count (NUM_DEATHS_1870) (SELECT COUNT (*) COD FROM [dbo].[1870_1880_DAT] WHERE YR_Died = '1870') INSERT INTO #Total_Count...

Advice on complex logic with embedded functions. - Hi, I have a scenario were under certain circumstances I need to use the earliest start date and then the latest...

UTC Conversion problem - Have this query that if you run it past the 16 hour it throughs this error....I"m stumped?? If you run...

cursor question - Hi guys, Can i load a cursor from a procedure? Like DECLARE cursor_importedPatients CURSOR FOR EXEC procedure Thanks!

The working of PIVOT - Can you please explain how PIVOT is used in this query? i.e. logic behind the working of PIVOT in the...


SQL Server 2008 : Working with Oracle

Making SSIS work for extraction from Oracle11g to Sql Server 2008 on a 64bit server. - Hi, I am trying to execute a sql agent job (ETL from Oracle 11g to Sql Server 2008) on a 64bit...


SQL Server 2008 : SQL Server Newbies

New dba - Hi Guys, I've recently been appointed to maintain my companies internal DB's. Must also stress the point that the DB's are...

Log file backup growth (how long's a piece of string...) - If your log backup file was as follows: 2,176 KB at 10 this morning 10,617 KB at 11 this morning 18,615 KB at...

Update Table - By Looping Through Field Name - HI, Is it possible to achieve the following ; I have a table with say ... 200 Fields and I want to check...


SQL Server 2008 : Security (SS2K8)

SQL Agent Job task - Hey All, I have been tasked to copy a sql agent job from prod instance to dev instance but I keep...


SQL Server 2008 : SQL Server 2008 High Availability

"Could not find a log backup file that could be applied to secondary database" - Hello all, I'm running into some trouble setting up log shipping (on a 2008 R2 installation) and I'm hoping someone can...

Future: Mirroring going away in favor of Availability groups? - I heard that Database Mirroring is going away in SQL Server and Availability groups will be used instead. My only issue...

How to find cause of failover in clustering? - Hi All, I have a 2 node cluster with active/passive configuration and I have 2 instances running on active node. However, for...

Mirroring and big transaction log file - Hi All I have mirrored database with 2 Databases Motor and one witness. Size of one Database is 467 Mb, but...

Timeout errors on cluster - We have upgraded our production server to cluster environment couple of months back. We are seeing timeout issues while connecting...

Backup jobs (FULL or DIFFs) bring the Cluster down - OK, So ... let me give a brief description of the problem, before going into details. Three weeks ago, I just got a...


SQL Server 2008 : SQL Server 2008 Administration

Finding cluster nodes (powershell or sql) - Hi, I am looking to find cluster and it's nodes, actually we have bulk of servers and we don't know which...

creating table on all sql servers in the environment - Hi, I have a requirement to create a table in database on all sql server instances in our environment. We have a...

Validating large tables replicated - Hello, I am working with large tables (many millions of records) in SQL Server that are replicated from one server to...

Copy File Across Servers Failing - I have 2 servers that are in the same rack, but not on a domain. Ultimately, I want a SQL...

SQL Server Upgradation from 2005 to 2008 - Can you please any one clarify my below doubts, because we are going to Upgrade SQL 2005 to 2008 1) Can...

Looking for powershell script - Hi, i am looking to find powershell expert, so that can help on my query.below script does return sql installed...


SQL Server 2008 : SQL Server 2008 Performance Tuning

Server Side trace for Blockings not working as expected!! - Hi All, I wanted to check if there has been any blockings on my database and I am using the below...


SQL Server 2005 : Administering

Create Views issue - The user account has dbo permissions on the database but couldnt create the views not sure what is the issue....

Linked Server error - Dear All, When I tried to create a Linked Server I get the following error message would you please let me...

Among other errors: SQL Server failed with error code 0xc0000000 to spawn a thread to process a new login or connection. - My SQL Server instance has crashed 2ce in the last week now with the same symptoms. My monitoring software shows nothing...

Getting an error "Exception of type 'System.OutOfMemoryException' was thrown." during stored procedure execution - Hi I am running a stored procedure that have lacs of select command but query is showing this error. "An error occurred...


SQL Server 2005 : Business Intelligence

SSAS - How do I handle dimensions with valid duplicates? - I'm new to SSAS and I got a problem I'm not able to resolve. Let's start with two tables, this...

SSIS dynamic mapping of columns - Can any body let me know how to map the columns dynamically in ssis .... Suppose I have some 10 tables...


SQL Server 2005 : SQL Server 2005 General Discussion

msdb.dbo.sp_send_dbmail Not working with SQL JOB - Hi All, i have a SP, which will do some update operations and send mail to respective users to send mail i'm...


SQL Server 2005 : SS2K5 Replication

sql server merge replication issue mini dumpsql - hello all, I am getting an error while I am trying to replicate data. below is the output from the error...


SQL Server 2005 : SQL Server Express

SQLCMD capture output from :ServerList to a file? - Is there a way to have the output from :ServerList redirected to a file? I tried :ServerList -o C:\Test.txt and :serverlist :Out C:\Test.txt Tks.


SQL Server 2005 : SQL Server 2005 Integration Services

Dynamic Table to Excel 2005 Sql - I have a script task which has 100 predefined output columns I have a source table whose column count changes I am...


SQL Server 2005 : SQL Server Newbies

Use Excel to input data to SQL Server 2005 - Hi all, My first post here on SSC. Some of the core systems where I work use Oracle databases and...

How to query same table with 2 WHERE clause onto 1 row - I have the following two queries but how do I combine them to return the results into one row as...


Reporting Services : Reporting Services

Hidden Column in Excel on Export - Hello, I have created a new report in SSRS. The report has two tables. The first table has columns Sales Price, Difference, Commission,...

SQL Book Questions - Couple of SQL realted Book Questions I am seeking a book on SSRS 2012 and am considering the recently published title...

ABOUT REPORT IN REPORT BUILDER - HOW TO GET parameter value as null when we keep as null and show the text what we enter in...


Reporting Services : Reporting Services 2008 Administration

401 Errors on report builder - Standalone - No IIS or Sharepoint - Hi, I have been attempting to sort a security issue out on SSRS 2008 - After several days of searching online I...


Reporting Services : Reporting Services 2008 Development

Custom Assemblies - I don't know if this question belongs in here but I thought i'd try - I'm starting to experiment with custom...

Pass Parameter for two different Datasets - I have two seperate datasets : Dataset1 and Dataset 2 and want to display results from both of them for the...

SUM values only for distinct ID's - Hello, I have the following report: ID Time 311793 3:12 312184 3:13 312184 3:13 312373 3:04 Is there a way to sum...

"Tax Detail" report - I need to structure the report by: SALES/PURCHASE MONTH TAX CODE I also need to show Totals after each TAX CODE set and after...

Group is split to 2 pages - I have tablix1 where I group by ClientName and ProjectName. But sometimes the group is split into two pages. Is there any...

Matrix Tool - When I display the Date field in a table it comes in the same order in SQL (SMS). But when I...


Data Warehousing : Integration Services

Web services accessing - Hello, I need some help in getting this web services working from SSIS. I figured out that the only way, we...

Setting up a new SSIS 2012 development team - Hi guys, First the challenge, then some background, then a request for advice. I am working as a contractor for a...

Converting float to decimal - In a derived column transformation, I have this LEN([Glbl Amt]) > 0 ? (DT_NUMERIC, 18, 7) [Glbl Amt] : NULL(DT_NUMERIC,18,7). The error I'm...

Get parent container name? - I've been searching the net for a few hours trying to answer how to get the name of the parent...

Unable to Schedule SSIS Package execution using Sql Agent in SSMS - Hi All, We have created a simple SSIS package on our servers and the Packge can be executed Manually. It gives...

Using OLEDB Command task Update records in Source table once they are loaded in Destination. - Hi All, I have a SSIS package which dumps Data from a SQL table to, say, a Oracle table. Once the...

Null records being Inserted during Import of CSV file - I know very little about SSIS, so bear with me. I have a SSIS package that inserts records into a 'staging'...

Connecting to Excel via Agent job Issues - Hi all, Im guessing this is a simple one but im missing it somehow. We are trying to import data...


Database Design : Design Ideas and Questions

Indexes on tables with a high churn rate - Are there any recommendations for indexing a table with a very high churn rate? I have a table (in an inherited...


Database Design : Hardware

San & Sql Server - Hi, I understand it's best practice to seperate log, data and temp files over seperate drives, however is this still being...


SQLServerCentral.com : Anything that is NOT about SQL!

Talking baseball - Okay, a topic that has NOTHING to do with SQL . . . Came across [url=http://www.sqlservercentral.com/Forums/Topic447796-4-1.aspx]this link[/url] describing the SSC point scoring descriptions,...

Today's Random Word! - HI When you woke up today, or logged-onto Opera Forums, you may have had a dream, a thought, a scene...

LearnItFirst.com Tutorials - Has anyone ever used the tutorials at LearnItFirst.com? What was your impression? Thanks!

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...


SQL Server 7,2000 : General

Command to execute Copy,Delete etc instead of XP_cmdShell - Dear All, We are having legacy Sql server data in Sql 2000 and moving to Sql 2012.Have found usage of XP_cmdshell...


SQL Server 7,2000 : T-SQL

Getting Transaction ID - How can I get the Transaction ID inside "BEGIN...COMMIT" commands? Thank you. Felipe Melo


Career : Certification

Online in-depth SQL courses - Hi all, wonder if you can help. I really want to study SQL and eventually have a career in in it,...

To be removed from this list, please click here.
If you have any problems leaving the list, please contact the webmaster@sqlservercentral.com.
This newsletter was sent to you because you signed up at SQLServerCentral.com.
Feel free to forward this to any colleagues that you think might be interested.
If you have received this email from a colleague, you can register to receive it here.
This transmission is ©2013 Red Gate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
Contact: webmaster@sqlservercentral.com