SQLServerCentral - www.sqlservercentral.com

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

Featured Contents

The Voice of the DBA

Bad Days

This editorial was originally published on Mar 21, 2014. It is being re-run as Steve is on vacation.

We all have them. As DBAs, there could be many bad days in our career. We poke fun at one of them with our first humorous DBA Team story this year. Hopefully you enjoy that one and smile. I know I got a kick out of reading it when got the first draft.

However that's not a really bad day for me. I've had some bad days at work involving corruption, missing backups, hardware failures, viruses, and more. Typically they involve fewer car crashes and political games than the DBA Team deals with, but they're almost as stressful and more than a few have stretched well into the night.

This week, I'd like to commiserate with you. I'd like to hear about the hard stories that you can now look back on with a smile (or grimace), having managed to move beyond the situation.

What's been a really bad day in your DBA career?

Or perhaps you've got a bad development story, an administrator story or something else. What was a time when you thought your career might be over, or you might lose your job? When did you feel a high level of stress over a situation that you thought might overwhelm you? Was there a time you might leave this industry?

I'm not looking to bring up bad memories, and please remember to be professional with your stories. However I've found writing things down can be cathartic. Perhaps you've held onto some anxiety for years, or fear about a repeat. Perhaps a little sharing, and empathy from the community, will help you feel better about the situation. 

As always, if you'd like to share anonymously, feel free to send a note to sjones at this domain and I'll post your story without your name.

Steve Jones from SQLServerCentral.com

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

Database DevOps

Benchmark your Database DevOps maturity level

Get a better understanding of how advanced your current processes are, receive recommendations for improvements, and see how your maturity level compares with that of your peers. Complete the Database DevOps Maturity Assessment

SQL Prompt

Write, format, analyze, and refactor SQL fast with SQL Prompt

Writing SQL is 50% faster with SQL Prompt. Your SQL code can be formatted just the way you like it, you can create and share snippets with your team, and with code analysis you get suggestions to improve your SQL as you type. Download your free trial

Featured Contents


Liberating the DBA from SQL Authentication with AD Groups

John F. Tamburo from SQLServerCentral.com

It's 15 years after the beginning of the century. Time to eliminate the security exposure of SQL logins, and implement integrated security. Active Directory Groups make this easy for the DBA. More »


Install and Configure SQL Server 2017 Availability Groups on Linux - Part 3

Additional Articles from MSSQLTips.com

In this tip, Edwin Sarmiento looks at how to create the Always On Availability Group with a listener name when using SQL Server on Linux. More »


From the SQLServerCentral Blogs - WIT: A Quick Thought

Brian Kelley from SQLServerCentral Blogs

I recently had the opportunity to be a Dungeon Master (DM) at a gaming convention. It was my first time.... More »


From the SQLServerCentral Blogs - My Favorite SQL Prompt Features

MarlonRibunal from SQLServerCentral Blogs

SQL Prompt from Redgate Software is one of the tools that I cannot live without. Well, that’s probably an exaggeration... More »


From the SQLServerCentral Blogs - Creating a SQL Server Test Lab On Your Workstation – Part Three, Creating a Windows Failover Cluster and a SQL Server Availability Group

david.fowler 42596 from SQLServerCentral Blogs

Welcome along to the third part of our series ‘Creating a SQL Server Test Lab On Your Workstation’.  If you’ve... More »

Question of the Day

Today's Question (by Steve Jones):

I've got this table and data:

    intcol INT
    , charcol CHAR(10)
	, varcharcol VARCHAR(100)
	, datecol datetime2
INSERT TheCounts 
 VALUES (1, 'West', 'Denver Broncos', '2018-01-01')
 , (2, 'West', 'Oakland Raiders', '2018-01-01')
 , (3, 'West', 'Los Angeles Chargers', '2018-01-01')
 , (4, 'West', 'Kansas City Chiefs', '2018-01-01')
 , (5, 'South', 'Jacksonville Jaguars', NULL)
 , (5, 'South', NULL, '2018-01-02')
 , (6, NULL, 'Indianapolis Colts', NULL)
 , (7, NULL, 'Houston Texans', NULL)
 , (NULL, 'North', 'Pittsburgh Steelers', NULL)
 , (NULL, 'North', 'Baltimore Ravens', '2018-01-03')
 , (NULL, 'North', 'Cincinnati Bengals', NULL)
 , (NULL, 'North', 'Cleveland Browns', NULL)
 , (13, 'East', 'Cleveland Browns', '2018-01-04')
 , (13, 'East', 'Cleveland Browns', '2018-01-04')
 , (14, 'East', 'Cleveland Browns', '2018-01-04')
 , (14, NULL, 'Cleveland Browns', NULL)

What do I get when running this code?

FROM dbo.TheCounts AS tc

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: count().

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

Yesterday's Question of the Day

Yesterday's Question (by Steve Jones):

I've got a developer that is working on a query that contains a view. The developer tries to get the actual execution plan for the query, but receives a permission error. What permission needs to be granted to the JoeDev user in the development database for the ActiveCustomer view to allow him to view the execution plan?



The permission to view plans is GRANT SHOWPLAN to <user>.

Ref: Granting, Denying, and Revoking the SHOWPLAN Permission - click here

» Discuss this question and answer on the forums

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

Metldown and Spectre - Has anyone deployed any of the patches released for SQL 2016 and SQL 2017 to any of their environments.  Is anyone...

SSMS 17.3 Start Powershell give s error - No SQL Server cmdlets found on this computer - This is a Win 10 desktop and I've installed the sqlserver module via install-module sqlserver -force. I can import it...

SQL Server 2017 : SQL Server 2017 - Development

Self Join Question - I've got a table with the following fields in it: UniqueID Sequence BeforeStatus AfterStatus HistoryStatusDate Sample data looks like : 08-40089445, 1, '','BNT',10/17/17 08-40089445, 2, 'BNT','VFD',1/18/18

Calendar table - I have been trying to find out the best way to design a Normalized table for

Is learning Python/R an advantage for SQL Server Developers? Need an expert advice. - Hello Guys, Is it time for SQL Server Developers to start learning R/Python to excel in their career? Expert advice needed.

SQL Server 2016 : SQL Server 2016 - Administration

I need a opinion - Hello, i have a discussion with a co-worker about normal code or dynamic code in a OLTP. The example is: create table...

Replication error - when non DB owner ALTER object - I have transactional replication in place. Our support staff have ALTER permissions, but when they attempt to ALTER an object (like...

SQL Server 2016 : SQL Server 2016 - Development and T-SQL

Remove article from replication with script - I have multiple tables with the same name but different schemas. I want to script out the drop of one...

Result truncation bug - Here's an interesting riddle.  I'm building a code generator, so the SELECT clause is just one great big concatenation of...

When is too many columns too many columns? - I know you can have some insane number of columns in SQL server... but just because you could, doesn't mean...

SQL Server 2014 : Administration - SQL Server 2014

Does denormalizing the data enhance performance? - We have a sales tracker report which uses a view and that view was created from 15+ tables. I have...

Diff backups every 2 hours. - I have a DB which I am in the process of inheriting and it has a DB backup schedule. Full...

SQL Server 2014 : Development - SQL Server 2014

Format of result - Hi all, im trying to do something, but have no idea how to acief this. Here part OF the DATA i'm...

Looking to sort two queries by Date, Time - SELECT LTRIM(RIGHT(CONVERT(varchar(6), .,100),7)) AS --, FORMAT(., 'MM-dd-yyyy')       AS , CONVERT(varchar(10),REPLACE(CONVERT(varchar(10), .,101),'/','-')) AS , LTRIM(RIGHT(CONVERT(varchar(20),

SQL Server 2012 : SQL 2012 - General

Connection Failed:: The target principal name is incorrect. Cannot generate SSPI context - Dear MVPs I migrated a database from SQL Server 2008 running on windows 2008 R2 to a new SQL Server...

SQL Server 2008 : SQL Server 2008 - General

Query performs poorly on prod server, works well when run against a restored copy of DB - Hi all,  I have an query that has been set up and running as part of a sql job in prod...

SSMS connect to another server => How to ? - Hello all, before where i worked, it's was possible in sql server management studio to connect to a sql server by...

SQL Server 2008 : SQL Server Newbies

Displaying a week numbers as a rows for given date range - Hi, I would like to display a week number as a row for given date range. After all I want to...

Reporting Services : Reporting Services

Getting SSRS 2016 installed properly (so all the pieces work) - I'm trying to install SSRS on my laptop (Win 10, if it matters), but if I customize at all, things...

SQL Server 7,2000 : General

Which certificate will help me earn a job in IT? - Hello I am new graduate from university with Business Information System major. I am thinking about to study one of...

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 ©2018 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
Contact: webmaster@sqlservercentral.com