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

Detecting Issues

Here's a simple question: how are more of your application issues detected, by people or systems? I bet most of you initially think of your monitoring systems and the automated messages or pages that are sent out regularly as detecting most, or even all, of your problems. Have you stopped to think how many times a phone call lets you know about an issue? Do you consider the ways in which a code review or human tester brings up a concern?

I try to think about all software problems, both the ones that reach production and the ones that are prevented early. If I catch a SELECT * in a view during development, I can prevent a problem months later when a table adds a column and no one refreshes the view in production. Those potential issues that never get to the customer are wins for me, and I think this is something we should be proud of as software engineers and testers.

Can you move the numbers, though? Is there a way to find problems before people find them? I think there is, and it's with better monitoring and better testing. For monitoring, we need better, and more, instrumentation that measures what we expect, looks for deviations, and (low level) alerts someone. This is an area where I think machine learning and better analysis will help. Those ML models can be hard to setup, so I'm hoping that some individuals or projects will start some work here. Microsoft is doing some of this in Azure, and I hope they share some knowledge with us.

Testing is really the way to catch more issues before humans do. We've known this for decades in software development, but so many developers have been resistant to the idea of building some sort of formal test for their code. It's not fun, it's hard to maintain, and really, it's just hard for most people to start writing tests.

I think things are getting better with testing frameworks that make building and executing tests easier. We have frameworks for all major application languages, and even quite a few for T-SQL. We've also learned more about the types of tests to write, which type to ignore, and how to avoid building so many brittle tests that testing is more work than coding features. If you know nothing about testing, you owe it to yourself to spend a little time learning about unit testing and practicing writing tests.

Now that we are collecting more and more data about our applications, we have the opportunity to really build software that better meets the goals and needs of our customers. However, we have to take advantage of this data, and the advances in testing, to ensure that we build the best software we can.

Steve Jones from SQLServerCentral.com

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


The Voice of the DBA Podcast

Listen to the MP3 Audio ( 4.0MB) podcast or subscribe to the feed at iTunes and Libsyn. feed

The Voice of the DBA podcast features music by Everyday Jones. No relation, but I stumbled on to them and really like the music.

ADVERTISEMENT
SQL Clone

NEW SQL Clone - version 1 now available!

Create copies of production databases and SQL backups in seconds and save up to 99% of disk space using SQL Clone. Redgate’s new tool removes much of the time and resource needed to create and manage database copies, allowing teams to work on local environments to develop, test and diagnose issues faster. Try it free.

Featured Contents

 

Stairway to U-SQL Level 13: SQL.MAP

Mike McQuillan from SQLServerCentral.com

We met SQL.ARRAY in the last step. Now say hello to SQL.MAP, which can store pairs of values. More »


 

DevOps and “Shift Left” for Databases

Additional Articles from SimpleTalk

The easiest way of explaining how a DevOps approach to database deployment can dramatically speed up the process is to use the term ‘shift-left’. By performing, or at least preparing for, all the processes and tasks that are necessary for deployment as soon as possible in the development cycle, it is possible to move from big, infrequent releases to “little and often”. Stephanie Herr explains how ‘shifting left’ can get deployment pipelines moving. More »


 

From the SQLServerCentral Blogs - Upgrading SQL Server on Linux

Steve Jones from SQLServerCentral Blogs

I saw this week that there was a new CTP (v1.3) of SQL Server v.Next. I haven’t had a lot... More »

Question of the Day

Today's Question (by Steve Jones):

I want to copy a set of data from my results with the headers.  For example, I have selected three columns for two rows. I want to copy just these 6 cells with the header  names.

What keystroke combination will allow me to do this?

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 1 point in this category: Management Studio (SSMS).

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

ADVERTISEMENT

SQL Server T-SQL Recipes

SQL Server T-SQL Recipes is an example-based guide to the Transact-SQL language that is at the core of SQL Server. This edition has been lightly updated for SQL Server 2014 and provides ready-to-implement solutions to common programming and database administration tasks. Learn to create databases, create in-memory tables and stored procedures, insert and update data, generate reports, secure your data, and more. Get your copy from Amazon today.

Yesterday's Question of the Day

Yesterday's Question (by Steve Jones):

What does this code return:

DECLARE @t TIME = GETDATE();
SELECT DATEDIFF(MINUTE, 0, @t)

Answer: The number of minutes since midnight

Explanation:

This code returns the number of minutes since midnight, when the day started.

Ref: Datediff - click here


» Discuss this question and answer on the forums

Featured Script

Missing index with change impact percentage

Arun Kumar from SQLServerCentral.com

script can be used for any database. 

script lists all missing index with create statement.

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

SSIS 2016 unable to connect from SSMS 2016 - Hello, I have an issue where I'm unable to connect to SSIS 2016 SP1 with Integration Services version #13 Below is...


SQL Server 2014 : Administration - SQL Server 2014

SQL Server 2014 Patching (on Cumulatives updates) and Rolling Updates - Need advice - Hi all, As most of of you already know, MS recommends to patch CUs as the same as SPs. I have generally...

Performance improves after reboot - I am an ETL Developer who was asked to look at SQL Server performance problem. We have two DBA's but they're...

DBA without sa rights??? - Our network administrator, whom I'll affectionately refer to as DCD (Data Center _ick), has decided that I no longer deserve...


SQL Server 2014 : Development - SQL Server 2014

Indexing Small Temp Tables used to JOIN based on a value being in a range... - Just wondering if there's much I can do to improve a query that has to join about 70K rows to...

Worst execution times with indexes than without ?!? - Hello, I get this surprising result with indexes: they don't help to improve performances. My environment (DEVelopment) : # 1 VM :  MS WS 2012...


SQL Server 2012 : SQL 2012 - General

get date / only sql - Hi how do I use the only clause and date together as follows a customer can  many orders from departments in one...

Count(*) output blank but required Zero - HI All,  I had an requirement to create count of numbers  for every 30 min with few filter condition on where...

Memory Problem: Low buffer cache,low PLE, but High free page - Hello All, Our database server is currently having a strange memory issue.  Our database is about 800G, memory is 120G, and it...

SQL Sever 2012 identity bug? - Hi all, I have the prove that SQL Server sometimes generate the same identity value. I insert a row in a...


SQL Server 2012 : SQL Server 2012 - T-SQL

Roll from lowest level child to it's subsequent parent - Hi, I want to roll Duration field from it's lowest level to it's immediate level parents , then from it's parent's to...

XML Shred skips around if node is missing expected elements - Hello,  I have bulk imported xml to a local table  called CAQH_Return_XML. as a blob so that I can then shred it.....


SQL Server 2008 : SQL Server 2008 - General

Best way to automate running adhoc scripts? - Hello, Just started a new DBA position. I am seeing things that seriously need some attention. I would rather not do...


SQL Server 2008 : T-SQL (SS2K8)

Active Directory -> SQL (Convert) - I have extract certain data/fields from Active Directory into a table (sql) and some of the columns are such as  AccountExpires,...


SQL Server 2008 : SQL Server 2008 Administration

Restore Recovered Database ?!! Please Help!!!!! - Hi and Thanks everybody for helping me and read this topic ,  i have huge problem , my server lost all files...


Reporting Services : Reporting Services

Filter based on a condition - Hello, I need to filter out a group when condition Sum(Fee) = 0 is met (the one with the dark blue background...


Reporting Services : Reporting Services 2005 Development

Excel Export Fail when Number of rows in the Excel sheet exceeded the limit of 65536 rows. - Hi, I have ran into the below error because of bulk and huge data. The error is given below: "Error: System.Exception: Excel...


Data Warehousing : Integration Services

Help with reading files in subfolders - Hi, I am having mutiple subfolders in a folder .Each subfolder contains multiple files.I have to read two files(Names N1111,N2222) from...

How to retrieve Error column name in SSIS 2012 - How to retrieve Error column name in SSIS 2012 I am having 90 columns how to find for which column what...


SQL Server 2005 : Administering

Linked Server - I am having error on my linked server. from x to y. OLE DB provider "SQLNCLI" for linked server "x" returned...

This email has been sent to {user_email}. 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 ©2015 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
Contact: webmaster@sqlservercentral.com